NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
MemoryManager Class Reference

This class represents the central memory managing instance. It will handle all tables and clusters, which have been created during the runtime. More...

#include <memorymanager.hpp>

Inheritance diagram for MemoryManager:
Collaboration diagram for MemoryManager:

Public Types

enum  AppDir { LINES = Memory::LINES , COLS = Memory::COLS , GRID = Memory::GRID , ALL = Memory::ALL }
 

Public Member Functions

 MemoryManager ()
 Default MemoryManager constructor. Creates the default table and initializes the list of predefined commands. More...
 
 ~MemoryManager ()
 MemoryManager destructor. Clears all created tables. More...
 
bool updateDimensionVariables (StringView sTableName)
 This member function updates the dimension variables for the selected table to be used in expressions. More...
 
void setPredefinedFuncs (const std::string &sFuncs)
 
void setUserdefinedFuncs (const std::string &sUserFuncs)
 
void setPluginCommands (const std::string &sPluginCmds)
 
void setPredefinedCommands (const std::string &sCommands)
 
bool isValid () const
 Evaluates, whether there's at least a single non-empty table. More...
 
bool isTable (const std::string &sTable) const
 This member function returns, whether the passed table name corresponds to a known table. More...
 
bool isEmpty (const std::string &sTable) const
 
bool isValidElement (long long int _nLine, long long int _nCol, const std::string &_sTable) const
 
bool containsTables (const std::string &sExpression)
 This member function detects, whether a table is used in the current expression. More...
 
bool containsTablesOrClusters (const std::string &sCmdLine)
 This member function evaluates, whether the passed command line contains tables or clusters. More...
 
std::string matchTableAsParameter (const std::string &sExpression, char cFollowing=' ')
 
bool addTable (const std::string &sCache, const Settings &_option)
 This member function creates a new table. It is checked, whether its name is valid and not already used elsewhere. More...
 
bool deleteTable (const std::string &sCache)
 This member function removes the selected table. More...
 
void removeData (bool bAutoSave=false)
 Removes the "data()" table, if it is available. More...
 
void removeTablesFromMemory ()
 Removes all tables in memory and re- initializes the MemoryManager with the default table. More...
 
bool resizeTable (int _nCols, const std::string &_sTable)
 
void deleteEntry (int _nLine, int _nCol, const std::string &_sCache)
 
void deleteBulk (const std::string &_sCache, int i1, int i2, int j1=0, int j2=0)
 
void deleteBulk (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol)
 
void shrink (const std::string &_sCache)
 
bool getSaveStatus () const
 Returns, whether there's at least a single table in memory, which has not been saved yet. More...
 
void setSaveStatus (bool _bIsSaved)
 Changes the save status of all tables in memory. More...
 
long long int getLastSaved () const
 Returns the earliest time-point, when a table was saved. This value is used to determine the elapsed time for the autosave interval. More...
 
void setCacheFileName (std::string _sFileName)
 This member function updates the name of the cache file. More...
 
bool saveToCacheFile ()
 This member function saves the contents of this class to the cache file so that they may be restored after a restart. More...
 
bool loadFromCacheFile ()
 This member function wraps the loading of the tables from the cache file. It will automatically detect the type of the cache file. More...
 
unsigned int getNumberOfTables () const
 
const std::map< std::string, std::pair< size_t, size_t > > & getTableMap () const
 
std::string getTableNames () const
 
MemorygetTable (const std::string &sTable)
 This member function returns a pointer to an existing Memory instance representing the selected table or a nullpointer, if the table does not exist. More...
 
virtual void melt (Memory *_mem, const std::string &sTable, bool overrideTarget=false) override
 This member function either combines the contents of the passed Memory instance with an existing one with the passed table name, or simply appends it to the list of known tables. More...
 
void renameTable (const std::string &sCache, const std::string &sNewName, bool bForceRenaming=false)
 
void swapTables (std::string sTable1, std::string sTable2)
 
void addReference (const std::string &sTable, const std::string &sReference)
 
void copyTable (const std::string &source, const std::string &target)
 Copy one table to another one (and create the missing table automatically, if needed). More...
 
NumeRe::Table extractTable (const std::string &_sTable, const VectorIndex &lines=VectorIndex(0, VectorIndex::OPEN_END), const VectorIndex &cols=VectorIndex(0, VectorIndex::OPEN_END))
 
NumeRe::Table extractTable (int _nLayer, const std::string &_sTable="", const VectorIndex &lines=VectorIndex(0, VectorIndex::OPEN_END), const VectorIndex &cols=VectorIndex(0, VectorIndex::OPEN_END))
 
void importTable (NumeRe::Table _table, const std::string &_sTable, const VectorIndex &lines=VectorIndex(0, VectorIndex::OPEN_END), const VectorIndex &cols=VectorIndex(0, VectorIndex::OPEN_END))
 
void importTable (NumeRe::Table _table, int _nLayer, const VectorIndex &lines=VectorIndex(0, VectorIndex::OPEN_END), const VectorIndex &cols=VectorIndex(0, VectorIndex::OPEN_END))
 
std::vector< int > sortElements (const std::string &sLine)
 This member function wraps the sorting functionality and evaluates the passed parameter string before delegating to the actual implementation. More...
 
std::vector< int > sortElements (const std::string &sCache, int i1, int i2, int j1=0, int j2=0, const std::string &sSortingExpression="")
 This member function informs the selected table to sort its contents according the passed parameter set. More...
 
bool smooth (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, const NumeRe::FilterSettings &_settings, AppDir Direction=ALL)
 
bool retouch (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, AppDir Direction=ALL)
 
bool resample (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, std::pair< size_t, size_t > samples, AppDir Direction=ALL, std::string sFilter="lanczos3")
 
bool convertColumns (const std::string &_sTable, const VectorIndex &_vCol, const std::string &_sType)
 
bool setCategories (const std::string &_sTable, const VectorIndex &_vCol, const std::vector< std::string > &vCategories)
 
std::vector< mu::value_typefindCols (const std::string &sTable, const std::vector< std::string > &vCols) const
 
std::vector< mu::value_typecountIfEqual (const std::string &sTable, const VectorIndex &_vCols, const std::vector< mu::value_type > &vValues, const std::vector< std::string > &vStringValues) const
 
std::vector< mu::value_typegetIndex (const std::string &sTable, size_t nCol, const std::vector< mu::value_type > &vValues, const std::vector< std::string > &vStringValues) const
 
AnovaResult getOneWayAnova (const std::string &sTable, size_t colCategories, size_t colValues, const VectorIndex &_vIndex, double significance) const
 
mu::value_type getCovariance (const std::string &sTable, size_t col1, const VectorIndex &_vIndex1, size_t col2, const VectorIndex &_vIndex2) const
 
mu::value_type getPearsonCorr (const std::string &sTable, size_t col1, const VectorIndex &_vIndex1, size_t col2, const VectorIndex &_vIndex2) const
 
mu::value_type getSpearmanCorr (const std::string &sTable, size_t col1, const VectorIndex &_vIndex1, size_t col2, const VectorIndex &_vIndex2) const
 
std::vector< mu::value_typegetRank (const std::string &sTable, size_t col, const VectorIndex &_vIndex, Memory::RankingStrategy _strat) const
 
std::vector< mu::value_typegetZScore (const std::string &sTable, size_t col, const VectorIndex &_vIndex) const
 
std::vector< mu::value_typegetBins (const std::string &sTable, size_t col, size_t nBins) const
 
int getLines (StringView sTable, bool _bFull=false) const
 
int getLines (const std::string &sTable, bool _bFull=false) const
 
int getCols (StringView sTable, bool _bFull=false) const
 
int getCols (const std::string &sTable, bool _bFull=false) const
 
int getBytes (const std::string &sTable) const
 
int getSize (int _nLayer) const
 
mu::value_type getElement (int _nLine, int _nCol, const std::string &_sTable) const
 
std::vector< mu::value_typegetElement (const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
 
ValueVector getElementMixed (const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
 
ValueVector getElementAsString (const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
 
TableColumn::ColumnType getType (const VectorIndex &_vCol, const std::string &_sTable) const
 
ValueVector getCategoryList (const VectorIndex &_vCol, const std::string &_sTable) const
 
void copyElementsInto (std::vector< mu::value_type > *vTarget, const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
 
int getHeadlineCount (const std::string &_sTable) const
 
std::string getHeadLineElement (int _i, const std::string &_sTable) const
 
std::vector< std::string > getHeadLineElement (const VectorIndex &_vCol, const std::string &_sTable) const
 
std::string getTopHeadLineElement (int _i, const std::string &_sTable) const
 
int getAppendedZeroes (int _i, const std::string &_sTable) const
 
int getColElements (const VectorIndex &cols, const std::string &_sTable) const
 Returns the maximal number of elements in the selected column range. More...
 
std::string getComment (const std::string &_sTable) const
 
NumeRe::TableMetaData getMetaData (const std::string &_sTable) const
 
void writeToTable (int _nLine, int _nCol, const std::string &_sCache, const mu::value_type &_dData)
 
void writeToTable (int _nLine, int _nCol, const std::string &_sCache, const std::string &_sValue)
 
void writeToTable (Indices &_idx, const std::string &_sCache, mu::value_type *_dData, unsigned int _nNum)
 
void writeToTable (Indices &_idx, const std::string &_sCache, const ValueVector &_values)
 
bool setHeadLineElement (int _i, const std::string &_sTable, std::string _sHead)
 
void overwriteColumn (int col, const std::string &_sCache, TableColumn::ColumnType type)
 This member function converts the selected column to the needed type, if this column shall be overwritten by another than the current type. More...
 
void writeComment (const std::string &_sTable, const std::string &_comment)
 
void setMetaData (const std::string &_sTable, const NumeRe::TableMetaData &meta)
 
std::vector< mu::value_typestd (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typeavg (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typemax (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typemin (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typeprd (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typesum (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typenum (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typeand_func (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typeor_func (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typexor_func (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typecnt (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typenorm (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typemed (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typecmp (const std::string &sTable, std::string sDir, mu::value_type dRef=0.0, int nType=0) const
 
std::vector< mu::value_typepct (const std::string &sTable, std::string sDir, mu::value_type dPct=0.5) const
 
std::vector< mu::value_typesize (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typeminpos (const std::string &sTable, std::string sDir) const
 
std::vector< mu::value_typemaxpos (const std::string &sTable, std::string sDir) const
 
mu::value_type std (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type std (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type avg (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type avg (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type max (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type max (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type min (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type min (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type prd (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type prd (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type sum (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type sum (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type num (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type num (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type and_func (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type and_func (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type or_func (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type or_func (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type xor_func (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type xor_func (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type cnt (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type cnt (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type norm (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type norm (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type cmp (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, mu::value_type dRef=0.0, int nType=0) const
 
mu::value_type cmp (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1, mu::value_type dRef=0.0, int nType=0) const
 
mu::value_type med (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
 
mu::value_type med (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
 
mu::value_type pct (const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, mu::value_type dPct=0.5) const
 
mu::value_type pct (const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1, mu::value_type dPct=0.5) const
 
- Public Member Functions inherited from NumeRe::FileAdapter
 FileAdapter ()
 FileAdapted default constructor. More...
 
virtual ~FileAdapter ()
 
FileHeaderInfo openFile (std::string _sFile, bool loadToCache=false, bool overrideTarget=false, int _nHeadline=0, const std::string &sTargetTable="")
 This member function loads the contents of the selected file to a new Memory class instance. This instance is either appended to the already existing instances or melted with an existing one, if the existing one has the same name. More...
 
bool saveFile (const std::string &sTable, std::string _sFileName, unsigned short nPrecision=7)
 This member function wraps the saving functionality of the Memory class. The passed filename is evaluated here and a generic one is generated, if necessary. More...
 
std::string getDataFileName (const std::string &sTable) const
 This member function will return the file name of the selected table. Will default to the table name. More...
 
std::string getDataFileNameShort () const
 This member function will return a shortened version of the data file name, where each "/Path/" string part is transformed to "/../". More...
 
std::string getOutputFileName () const
 This member function will return the output file name, which was used for saving the last table. More...
 
void setSavePath (const std::string &_sPath)
 This function may be used to update the target saving path of this class. More...
 
void setPrefix (const std::string &_sPrefix)
 This function is used to set a file prefix for the saving file name. More...
 
void setbLoadEmptyCols (bool _bLoadEmptyCols)
 Set, whether empty columns shall be loaded. More...
 
void setbLoadEmptyColsInNextFile (bool _bLoadEmptyCols)
 Set, whether empty columns shall be loaded in the next file. More...
 
std::string generateFileName (const std::string &sExtension=".ndat")
 This member function creates a file name from the file prefix and the time stamp. More...
 
virtual void melt (Memory *_mem, const std::string &sTable, bool overrideTarget=false)=0
 
- Public Member Functions inherited from FileSystem
 FileSystem ()
 Default constructor. More...
 
FileSystemassign (const FileSystem &_fSys)
 Assignment member function to copy the settings from another FileSystem instance. More...
 
std::string ValidFileName (std::string _sFileName, const std::string sExtension=".dat", bool checkExtension=true, bool doCleanPath=true) const
 This member function evaluates, whether the passed filename is a valid filename. One may supply a preferred filename extension. More...
 
std::string ValidFolderName (std::string _sFileName, bool doCleanPath=true, bool appendTrailingSeparator=true) const
 This member function evaluates, whether the passed foldername is a valid foldername. More...
 
std::string ValidizeAndPrepareName (const std::string &_sFileName, const std::string &sExtension=".dat") const
 This member function validizes the passed file name and creates the needed folders on-the-fly. More...
 
int setPath (std::string _sPath, bool bMkDir, std::string _sExePath)
 This member function may be used to set the preferred file path of the current FileSystem instance. More...
 
void createRevisionsFolder ()
 This member function creates the hidden revisions folders for the version control system. More...
 
std::string getPath () const
 Returns the default path of this FileSystem instance. More...
 
std::vector< std::string > getFileParts (const std::string &sFilePath) const
 This member function separates all path parts into single strings: the drive letter, the path, the name and the extension. This function may also handle folder paths and network paths. More...
 
FileInfo getFileInfo (const std::string &sFilePath) const
 Return the file information about the passed file path. More...
 
void setTokens (std::string _sTokens)
 This member function may be used to update the path placeholders of the current FileSystem instance. More...
 
bool isFile (const std::string &_sPath) const
 This function determines, whether a path name indicates a file or a folder. More...
 
void initializeFromKernel ()
 Member function to remote-initialize the class from the kernel. Cannot be used during kernel start-up. More...
 
void setProgramPath (std::string _sExePath)
 
std::string getProgramPath () const
 
void declareFileType (const std::string &sFileType)
 
- Public Member Functions inherited from StringMemory
bool writeString (const std::string &_sString, unsigned int _nthString=std::string::npos, unsigned int nCol=0)
 
std::string readString (unsigned int _nthString=std::string::npos, unsigned int nCol=0)
 
std::string maxString (unsigned int i1=0, unsigned int i2=std::string::npos, unsigned int nCol=0)
 
std::string maxString (VectorIndex _vLine, VectorIndex _vCol)
 
std::string minString (unsigned int i1=0, unsigned int i2=std::string::npos, unsigned int nCol=0)
 
std::string minString (VectorIndex _vLine, VectorIndex _vCol)
 
std::string sumString (unsigned int i1=0, unsigned int i2=std::string::npos, unsigned int nCol=0)
 
std::string sumString (VectorIndex _vLine, VectorIndex _vCol)
 
unsigned int getStringElements (unsigned int nCol=std::string::npos) const
 
unsigned int getStringCols () const
 
bool removeStringElements (unsigned int nCol=0)
 
bool clearStringElements ()
 
int getStringSize (unsigned int nCol=std::string::npos) const
 
std::vector< int > sortStringElements (long long int i1, long long int i2, long long int j1, long long int j2, const std::string &sSortingExpression)
 
- Public Member Functions inherited from NumeRe::ClusterManager
 ClusterManager ()
 
 ~ClusterManager ()
 
bool containsClusters (const std::string &sCmdLine) const
 This member function detects, whether any cluster is used in the current expression. More...
 
bool isCluster (StringView sCluster) const
 This member function returns true, if the passed cluster identifier can be found in the internal map. More...
 
bool isCluster (const std::string &sCluster) const
 This member function returns true, if the passed cluster identifier can be found in the internal map. More...
 
ClustergetCluster (StringView sCluster)
 This member function returns a reference to the cluster indicated by the passed cluster identifier. More...
 
ClustergetCluster (const std::string &sCluster)
 This member function returns a reference to the cluster indicated by the passed cluster identifier. More...
 
const ClustergetCluster (const std::string &sCluster) const
 This member function returns a const reference to the cluster indicated by the passed cluster identifier. Used in context when this object is passed as const reference. More...
 
ClusternewCluster (const std::string &sCluster)
 This member function creates a new cluster from the passed cluster identifier and returns a reference to this new object. More...
 
void appendCluster (const std::string &sCluster, const Cluster &cluster)
 This member function appends the passed cluster to the internal cluster map using the passed string as the identifier. More...
 
void removeCluster (const std::string &sCluster)
 This member function removes the cluster from memory, which corresponds to the passed cluster identifier. More...
 
std::string createTemporaryCluster (const std::string &suffix="")
 This member function creates a temporary cluster with a unique name and returns this name to the calling function. More...
 
void removeTemporaryClusters ()
 This member function returns all temporary clusters from the internal map. Temporary clusters are indicated by their name. More...
 
void clearAllClusters ()
 Clear all clusters currently in memory. More...
 
bool updateClusterSizeVariables (StringView sCluster)
 This member function updates the dimension variable reserved for cluster accesses with the size of the current accessed cluster. More...
 
const std::map< std::string, Cluster > & getClusterMap () const
 

Public Attributes

mu::value_type tableLinesCount
 
mu::value_type tableColumnsCount
 
- Public Attributes inherited from NumeRe::ClusterManager
mu::value_type dClusterElementsCount
 

Private Member Functions

void reorderColumn (size_t _nLayer, const std::vector< int > &vIndex, long long int i1, long long int i2, long long int j1=0)
 
bool loadFromNewCacheFile ()
 This member function tries to load the contents of the cache file in the new cache file format. If it does not succeed, false is returned. More...
 
bool loadFromLegacyCacheFile ()
 This member function loads the contents of the cache file assuming the legacy format. More...
 
VectorIndex parseEvery (std::string &sDir, const std::string &sTableName) const
 This member function extracts and parses the every expression part of a MAF call. More...
 
std::vector< mu::value_typeresolveMAF (const std::string &sTableName, std::string sDir, mu::value_type(MemoryManager::*MAF)(const std::string &, long long int, long long int, long long int, long long int) const) const
 This member function is the abstract implementation of a MAF function call. Most of the MAFs use this abstraction (except cmp and pct). More...
 
virtual bool saveLayer (std::string _sFileName, const std::string &_sTable, unsigned short nPrecision) override
 
bool exists (const std::string &sTable) const
 
size_t mapStringViewFind (StringView view) const
 
size_t findTable (const std::string &sTable) const
 

Private Attributes

std::vector< Memory * > vMemory
 
std::map< std::string, std::pair< size_t, size_t > > mCachesMap
 
bool bSaveMutex
 
std::fstream cache_file
 
std::string sCache_file
 
std::string sPredefinedFuncs
 
std::string sUserdefinedFuncs
 
std::string sPredefinedCommands
 
std::string sPluginCommands
 

Additional Inherited Members

- Protected Member Functions inherited from NumeRe::FileAdapter
std::string getDate ()
 This private member function will return the current date as a timestamp for the file name. More...
 
void condenseDataSet (Memory *_mem)
 This member function will condense the data set in the passed Memory instance, i.e. it will remove unneeded empty columns in the table. More...
 
virtual bool saveLayer (std::string _sFileName, const std::string &_sCache, unsigned short nPrecision)=0
 
- Protected Member Functions inherited from FileSystem
int createFolders (const std::string &_sPath) const
 This member function creates all missing directories in the passed path. More...
 
- Protected Attributes inherited from NumeRe::FileAdapter
std::string sOutputFile
 
std::string sPrefix
 
std::string sSavePath
 
std::string sDataFile
 
bool bLoadEmptyCols
 
bool bLoadEmptyColsInNextFile
 
- Protected Attributes inherited from FileSystem
std::string sPath
 
std::string sExecutablePath
 
std::string sTokens [7][2]
 
std::string sValidExtensions
 

Detailed Description

This class represents the central memory managing instance. It will handle all tables and clusters, which have been created during the runtime.

Definition at line 44 of file memorymanager.hpp.

Member Enumeration Documentation

◆ AppDir

Enumerator
LINES 
COLS 
GRID 
ALL 

Definition at line 108 of file memorymanager.hpp.

Constructor & Destructor Documentation

◆ MemoryManager()

MemoryManager::MemoryManager ( )

Default MemoryManager constructor. Creates the default table and initializes the list of predefined commands.

Definition at line 43 of file memorymanager.cpp.

References bSaveMutex, mCachesMap, sCache_file, sPluginCommands, sPredefinedCommands, sPredefinedFuncs, sUserdefinedFuncs, tableColumnsCount, tableLinesCount, and vMemory.

◆ ~MemoryManager()

MemoryManager::~MemoryManager ( )

MemoryManager destructor. Clears all created tables.

Definition at line 63 of file memorymanager.cpp.

References cache_file, and vMemory.

Member Function Documentation

◆ addReference()

void MemoryManager::addReference ( const std::string &  sTable,
const std::string &  sReference 
)
inline

Definition at line 287 of file memorymanager.hpp.

References SyntaxError::CACHE_DOESNT_EXIST, SyntaxError::invalid_position, isTable(), and mCachesMap.

Referenced by tableMethod_aliasof().

Here is the call graph for this function:

◆ addTable()

bool MemoryManager::addTable ( const std::string &  sCache,
const Settings _option 
)

This member function creates a new table. It is checked, whether its name is valid and not already used elsewhere.

Parameters
sCacheconst string&
_optionconst Settings&
Returns
bool

Definition at line 1045 of file memorymanager.cpp.

References _lang, SyntaxError::CACHE_ALREADY_EXISTS, SyntaxError::FUNCTION_ALREADY_EXISTS, SyntaxError::FUNCTION_IS_PREDEFINED, Language::get(), SyntaxError::INVALID_CACHE_NAME, SyntaxError::invalid_position, LineBreak(), mCachesMap, NumeReKernel::print(), sPluginCommands, sPredefinedCommands, sPredefinedFuncs, sUserdefinedFuncs, and vMemory.

Referenced by copyTable(), ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::evaluateProcedureArguments(), evaluateTargetOptionInCommand(), newObject(), performMatrixOperation(), plugin_histogram(), and Odesolver::solve().

Here is the call graph for this function:

◆ and_func() [1/3]

mu::value_type MemoryManager::and_func ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 892 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ and_func() [2/3]

mu::value_type MemoryManager::and_func ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 887 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ and_func() [3/3]

std::vector< mu::value_type > MemoryManager::and_func ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 653 of file memorymanager.hpp.

References and_func(), and resolveMAF().

Referenced by and_func(), MafDataAccess(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ avg() [1/3]

mu::value_type MemoryManager::avg ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 832 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ avg() [2/3]

mu::value_type MemoryManager::avg ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 827 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ avg() [3/3]

std::vector< mu::value_type > MemoryManager::avg ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 623 of file memorymanager.hpp.

References avg(), and resolveMAF().

Referenced by avg(), calcStats(), MafDataAccess(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ cmp() [1/3]

mu::value_type MemoryManager::cmp ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol,
mu::value_type  dRef = 0.0,
int  nType = 0 
) const
inline

Definition at line 937 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ cmp() [2/3]

mu::value_type MemoryManager::cmp ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1,
mu::value_type  dRef = 0.0,
int  nType = 0 
) const
inline

Definition at line 942 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ cmp() [3/3]

std::vector< mu::value_type > MemoryManager::cmp ( const std::string &  sTable,
std::string  sDir,
mu::value_type  dRef = 0.0,
int  nType = 0 
) const
inline

Definition at line 683 of file memorymanager.hpp.

References cmp(), findTable(), getCols(), getLines(), GRID, parseEvery(), VectorIndex::size(), and vMemory.

Referenced by cmp(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ cnt() [1/3]

mu::value_type MemoryManager::cnt ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 917 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ cnt() [2/3]

mu::value_type MemoryManager::cnt ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 922 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ cnt() [3/3]

std::vector< mu::value_type > MemoryManager::cnt ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 668 of file memorymanager.hpp.

References cnt(), and resolveMAF().

Referenced by calcStats(), cnt(), getDataGridDimensions(), MafDataAccess(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ containsTables()

bool MemoryManager::containsTables ( const std::string &  sExpression)

This member function detects, whether a table is used in the current expression.

Parameters
sExpressionconst string&
Returns
bool

Definition at line 992 of file memorymanager.cpp.

References mCachesMap.

Referenced by cmd_clear(), cmd_remove(), containsTablesOrClusters(), Plot::createDataLegends(), editObject(), resolveTablesAndClusters(), and setParametersInWindow().

◆ containsTablesOrClusters()

bool MemoryManager::containsTablesOrClusters ( const std::string &  sCmdLine)

This member function evaluates, whether the passed command line contains tables or clusters.

Parameters
sCmdLineconst string&
Returns
bool

Definition at line 960 of file memorymanager.cpp.

References NumeRe::ClusterManager::containsClusters(), and containsTables().

Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), NumeRe::StringFuncHandler::argumentParser(), FlowCtrl::calc(), cmd_delete(), cmd_retouch(), FlowCtrl::compile(), containsMatrices(), Plot::createDataLegends(), ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::createLocalInlineVars(), ProcedureVarFactory::createLocalStrings(), ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::createLocalVars(), createMatFromLines(), createMatFromLinesFilled(), differentiate(), editObject(), NumeRe::StringParser::eval(), FlowCtrl::evalHeader(), evalPoints(), FlowCtrl::evalRangeBasedHeader(), evaluateExpression(), evaluateFittingParams(), evaluateNumerical(), evaluateParameterValues(), ProcedureVarFactory::evaluateProcedureArguments(), Plot::evaluateSubplot(), CommandLineParser::exprContainsDataObjects(), extractFirstParameterStringValue(), findExtrema(), findZeroes(), fitDataSet(), getDataElements(), CommandLineParser::getExprAsMathExpression(), getIndices(), NumeReKernel::MainLoop(), parseArg(), CommandLineParser::parseExprAsNumericalValues(), Procedure::ProcCalc(), readAndParseIntervals(), Interval::refresh(), replaceEntityOccurence(), Plot::separateFunctionsAndData(), Odesolver::solve(), NumeRe::StringParser::storeStringResults(), and FlowCtrl::while_loop().

Here is the call graph for this function:

◆ convertColumns()

bool MemoryManager::convertColumns ( const std::string &  _sTable,
const VectorIndex _vCol,
const std::string &  _sType 
)
inline

Definition at line 348 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ copyElementsInto()

void MemoryManager::copyElementsInto ( std::vector< mu::value_type > *  vTarget,
const VectorIndex _vLine,
const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 526 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by handleCachedDataAccess().

Here is the call graph for this function:

◆ copyTable()

void MemoryManager::copyTable ( const std::string &  source,
const std::string &  target 
)

Copy one table to another one (and create the missing table automatically, if needed).

Parameters
sourceconst std::string&
targetconst std::string&
Returns
void

Definition at line 845 of file memorymanager.cpp.

References addTable(), exists(), findTable(), NumeReKernel::getInstance(), and vMemory.

Referenced by ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::evaluateProcedureArguments(), NumeReKernel::executePlugins(), getDataElements(), Procedure::procedureInterface(), and Procedure::replaceReturnVal().

Here is the call graph for this function:

◆ countIfEqual()

std::vector< mu::value_type > MemoryManager::countIfEqual ( const std::string &  sTable,
const VectorIndex _vCols,
const std::vector< mu::value_type > &  vValues,
const std::vector< std::string > &  vStringValues 
) const
inline

Definition at line 363 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_counteq().

Here is the call graph for this function:

◆ deleteBulk() [1/2]

void MemoryManager::deleteBulk ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
)
inline

Definition at line 200 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ deleteBulk() [2/2]

void MemoryManager::deleteBulk ( const std::string &  _sCache,
int  i1,
int  i2,
int  j1 = 0,
int  j2 = 0 
)
inline

Definition at line 195 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by newObject(), performMatrixOperation(), searchAndDeleteTable(), and Odesolver::solve().

Here is the call graph for this function:

◆ deleteEntry()

void MemoryManager::deleteEntry ( int  _nLine,
int  _nCol,
const std::string &  _sCache 
)
inline

Definition at line 190 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by performDataOperation().

Here is the call graph for this function:

◆ deleteTable()

bool MemoryManager::deleteTable ( const std::string &  sCache)

This member function removes the selected table.

Parameters
sCacheconst string&
Returns
bool

Definition at line 1097 of file memorymanager.cpp.

References fileExists(), FileSystem::getProgramPath(), getSaveStatus(), isValid(), mCachesMap, setSaveStatus(), and vMemory.

Referenced by cmd_remove(), ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::evaluateProcedureArguments(), NumeReKernel::executePlugins(), Procedure::procedureInterface(), removeData(), Procedure::replaceReturnVal(), and ProcedureVarFactory::reset().

Here is the call graph for this function:

◆ exists()

bool MemoryManager::exists ( const std::string &  sTable) const
inlineprivate

◆ extractTable() [1/2]

NumeRe::Table MemoryManager::extractTable ( const std::string &  _sTable,
const VectorIndex lines = VectorIndex(0, VectorIndex::OPEN_END),
const VectorIndex cols = VectorIndex(0, VectorIndex::OPEN_END) 
)
inline

Definition at line 308 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by editObject(), NumeReKernel::getTable(), setParametersInWindow(), and show_data().

Here is the call graph for this function:

◆ extractTable() [2/2]

NumeRe::Table MemoryManager::extractTable ( int  _nLayer,
const std::string &  _sTable = "",
const VectorIndex lines = VectorIndex(0, VectorIndex::OPEN_END),
const VectorIndex cols = VectorIndex(0, VectorIndex::OPEN_END) 
)
inline

Definition at line 313 of file memorymanager.hpp.

References vMemory.

◆ findCols()

std::vector< mu::value_type > MemoryManager::findCols ( const std::string &  sTable,
const std::vector< std::string > &  vCols 
) const
inline

Definition at line 358 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_findCols().

Here is the call graph for this function:

◆ findTable()

◆ getAppendedZeroes()

int MemoryManager::getAppendedZeroes ( int  _i,
const std::string &  _sTable 
) const
inline

Definition at line 560 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by boneDetection().

Here is the call graph for this function:

◆ getBins()

std::vector< mu::value_type > MemoryManager::getBins ( const std::string &  sTable,
size_t  col,
size_t  nBins 
) const
inline

Definition at line 413 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_binsof().

Here is the call graph for this function:

◆ getBytes()

int MemoryManager::getBytes ( const std::string &  sTable) const
inline

Definition at line 462 of file memorymanager.hpp.

References findTable(), and getSize().

Referenced by NumeReKernel::getVariableList().

Here is the call graph for this function:

◆ getCategoryList()

ValueVector MemoryManager::getCategoryList ( const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 518 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by tableMethod_categories(), and tableMethod_categorize().

Here is the call graph for this function:

◆ getColElements()

int MemoryManager::getColElements ( const VectorIndex cols,
const std::string &  _sTable 
) const

Returns the maximal number of elements in the selected column range.

Parameters
colsconst VectorIndex&
_sTableconst std::string&
Returns
int

Definition at line 618 of file memorymanager.cpp.

References exists(), findTable(), Memory::getCols(), Memory::getElemsInColumn(), VectorIndex::isOpenEnd(), VectorIndex::setOpenEndIndex(), VectorIndex::size(), and vMemory.

Referenced by cmd_append(), createDatagrid(), Plot::extractDataValues(), getSamplesForDatagrid(), and replaceDataEntities().

Here is the call graph for this function:

◆ getCols() [1/2]

int MemoryManager::getCols ( const std::string &  sTable,
bool  _bFull = false 
) const
inline

Definition at line 452 of file memorymanager.hpp.

References findTable(), mCachesMap, and vMemory.

Here is the call graph for this function:

◆ getCols() [2/2]

◆ getComment()

std::string MemoryManager::getComment ( const std::string &  _sTable) const
inline

Definition at line 567 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by createMafVectorName().

Here is the call graph for this function:

◆ getCovariance()

mu::value_type MemoryManager::getCovariance ( const std::string &  sTable,
size_t  col1,
const VectorIndex _vIndex1,
size_t  col2,
const VectorIndex _vIndex2 
) const
inline

Definition at line 383 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_cov().

Here is the call graph for this function:

◆ getElement() [1/2]

std::vector< mu::value_type > MemoryManager::getElement ( const VectorIndex _vLine,
const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 486 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Here is the call graph for this function:

◆ getElement() [2/2]

mu::value_type MemoryManager::getElement ( int  _nLine,
int  _nCol,
const std::string &  _sTable 
) const
inline

◆ getElementAsString()

ValueVector MemoryManager::getElementAsString ( const VectorIndex _vLine,
const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 502 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by replaceDataEntities().

Here is the call graph for this function:

◆ getElementMixed()

ValueVector MemoryManager::getElementMixed ( const VectorIndex _vLine,
const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 494 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by replaceDataEntities().

Here is the call graph for this function:

◆ getHeadlineCount()

int MemoryManager::getHeadlineCount ( const std::string &  _sTable) const
inline

Definition at line 531 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by createStatsFile(), createStatsOutput(), and make_stringmatrix().

Here is the call graph for this function:

◆ getHeadLineElement() [1/2]

std::vector< std::string > MemoryManager::getHeadLineElement ( const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 547 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Here is the call graph for this function:

◆ getHeadLineElement() [2/2]

std::string MemoryManager::getHeadLineElement ( int  _i,
const std::string &  _sTable 
) const
inline

Definition at line 539 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), createHist1D(), createStatsFile(), createStatsOutput(), evaluateFittingParams(), getTopHeadLineElement(), make_stringmatrix(), performDataOperation(), plugin_statistics(), replaceDataEntities(), and shortTimeFourierAnalysis().

Here is the call graph for this function:

◆ getIndex()

std::vector< mu::value_type > MemoryManager::getIndex ( const std::string &  sTable,
size_t  nCol,
const std::vector< mu::value_type > &  vValues,
const std::vector< std::string > &  vStringValues 
) const
inline

Definition at line 370 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_index().

Here is the call graph for this function:

◆ getLastSaved()

long long int MemoryManager::getLastSaved ( ) const

Returns the earliest time-point, when a table was saved. This value is used to determine the elapsed time for the autosave interval.

Returns
long long int

Definition at line 175 of file memorymanager.cpp.

References getLastSaved(), and vMemory.

Referenced by getLastSaved(), and NumeReKernel::getLastSavedTime().

Here is the call graph for this function:

◆ getLines() [1/2]

int MemoryManager::getLines ( const std::string &  sTable,
bool  _bFull = false 
) const
inline

Definition at line 432 of file memorymanager.hpp.

References findTable(), mCachesMap, and vMemory.

Here is the call graph for this function:

◆ getLines() [2/2]

◆ getMetaData()

NumeRe::TableMetaData MemoryManager::getMetaData ( const std::string &  _sTable) const
inline

Definition at line 572 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by searchAndDeleteTable().

Here is the call graph for this function:

◆ getNumberOfTables()

unsigned int MemoryManager::getNumberOfTables ( ) const
inline

Definition at line 219 of file memorymanager.hpp.

References mCachesMap.

◆ getOneWayAnova()

AnovaResult MemoryManager::getOneWayAnova ( const std::string &  sTable,
size_t  colCategories,
size_t  colValues,
const VectorIndex _vIndex,
double  significance 
) const
inline

Definition at line 377 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_anova().

Here is the call graph for this function:

◆ getPearsonCorr()

mu::value_type MemoryManager::getPearsonCorr ( const std::string &  sTable,
size_t  col1,
const VectorIndex _vIndex1,
size_t  col2,
const VectorIndex _vIndex2 
) const
inline

Definition at line 389 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_pcorr().

Here is the call graph for this function:

◆ getRank()

std::vector< mu::value_type > MemoryManager::getRank ( const std::string &  sTable,
size_t  col,
const VectorIndex _vIndex,
Memory::RankingStrategy  _strat 
) const
inline

Definition at line 401 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_rank().

Here is the call graph for this function:

◆ getSaveStatus()

bool MemoryManager::getSaveStatus ( ) const

Returns, whether there's at least a single table in memory, which has not been saved yet.

Returns
bool

Definition at line 134 of file memorymanager.cpp.

References getSaveStatus(), and vMemory.

Referenced by NumeReKernel::Autosave(), autoSave(), clear_cache(), deleteTable(), getSaveStatus(), NumeReKernel::MainLoop(), and NumeReKernel::saveData().

Here is the call graph for this function:

◆ getSize()

int MemoryManager::getSize ( int  _nLayer) const
inline

Definition at line 467 of file memorymanager.hpp.

References vMemory.

Referenced by getBytes(), and listDeclaredVariables().

◆ getSpearmanCorr()

mu::value_type MemoryManager::getSpearmanCorr ( const std::string &  sTable,
size_t  col1,
const VectorIndex _vIndex1,
size_t  col2,
const VectorIndex _vIndex2 
) const
inline

Definition at line 395 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_scorr().

Here is the call graph for this function:

◆ getTable()

Memory * MemoryManager::getTable ( const std::string &  sTable)

This member function returns a pointer to an existing Memory instance representing the selected table or a nullpointer, if the table does not exist.

Parameters
sTableconst string&
Returns
Memory*

Definition at line 826 of file memorymanager.cpp.

References findTable(), mCachesMap, and vMemory.

Referenced by copyDataToTemporaryTable(), evalMatOp(), extractRange(), performMatrixOperation(), readAudioFile(), readImage(), rotateTable(), and seekInAudioFile().

Here is the call graph for this function:

◆ getTableMap()

const std::map< std::string, std::pair< size_t, size_t > > & MemoryManager::getTableMap ( ) const
inline

◆ getTableNames()

std::string MemoryManager::getTableNames ( ) const
inline

Definition at line 229 of file memorymanager.hpp.

References mCachesMap.

Referenced by cmd_define().

◆ getTopHeadLineElement()

std::string MemoryManager::getTopHeadLineElement ( int  _i,
const std::string &  _sTable 
) const
inline

Definition at line 555 of file memorymanager.hpp.

References getHeadLineElement().

Referenced by calculateHist1dData(), Plot::constructDataLegendElement(), Plot::createDataLegends(), createOutputForHist1D(), and make_stringmatrix().

Here is the call graph for this function:

◆ getType()

TableColumn::ColumnType MemoryManager::getType ( const VectorIndex _vCol,
const std::string &  _sTable 
) const
inline

Definition at line 510 of file memorymanager.hpp.

References exists(), findTable(), TableColumn::TYPE_NONE, and vMemory.

Referenced by handleCachedDataAccess(), replaceDataEntities(), NumeRe::StringParser::storeStringToDataObjects(), and tableMethod_typeof().

Here is the call graph for this function:

◆ getZScore()

std::vector< mu::value_type > MemoryManager::getZScore ( const std::string &  sTable,
size_t  col,
const VectorIndex _vIndex 
) const
inline

Definition at line 407 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_zscore().

Here is the call graph for this function:

◆ importTable() [1/2]

void MemoryManager::importTable ( NumeRe::Table  _table,
const std::string &  _sTable,
const VectorIndex lines = VectorIndex(0, VectorIndex::OPEN_END),
const VectorIndex cols = VectorIndex(0, VectorIndex::OPEN_END) 
)
inline

Definition at line 318 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by editObject(), and getParametersFromWindow().

Here is the call graph for this function:

◆ importTable() [2/2]

void MemoryManager::importTable ( NumeRe::Table  _table,
int  _nLayer,
const VectorIndex lines = VectorIndex(0, VectorIndex::OPEN_END),
const VectorIndex cols = VectorIndex(0, VectorIndex::OPEN_END) 
)
inline

Definition at line 323 of file memorymanager.hpp.

References vMemory.

◆ isEmpty()

bool MemoryManager::isEmpty ( const std::string &  sTable) const
inline

Definition at line 143 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by append_data(), cmd_load(), NumeReKernel::executePlugins(), load_data(), plugin_histogram(), plugin_statistics(), Procedure::procedureInterface(), Procedure::replaceReturnVal(), and searchAndDeleteTable().

Here is the call graph for this function:

◆ isTable()

◆ isValid()

bool MemoryManager::isValid ( ) const

Evaluates, whether there's at least a single non-empty table.

Returns
bool

Definition at line 111 of file memorymanager.cpp.

References getCols(), and vMemory.

Referenced by autoSave(), clear_cache(), cmd_fit(), Plot::createDataLegends(), deleteTable(), listDeclaredVariables(), loadFromLegacyCacheFile(), plugin_histogram(), plugin_statistics(), removeTablesFromMemory(), show_data(), and sortElements().

Here is the call graph for this function:

◆ isValidElement()

bool MemoryManager::isValidElement ( long long int  _nLine,
long long int  _nCol,
const std::string &  _sTable 
) const
inline

Definition at line 151 of file memorymanager.hpp.

References exists(), findTable(), and vMemory.

Referenced by calcStats(), calculateChiMap(), calculateDataForCenterPlot(), calculateXYHist(), createHist1D(), createHist2D(), createStatsFile(), differentiate(), getDataForFit(), integrateSingleDimensionData(), make_stringmatrix(), and performDataOperation().

Here is the call graph for this function:

◆ loadFromCacheFile()

bool MemoryManager::loadFromCacheFile ( )

This member function wraps the loading of the tables from the cache file. It will automatically detect the type of the cache file.

Returns
bool

Definition at line 348 of file memorymanager.cpp.

References bSaveMutex, loadFromLegacyCacheFile(), loadFromNewCacheFile(), sCache_file, and FileSystem::ValidFileName().

Referenced by NumeReKernel::StartUp().

Here is the call graph for this function:

◆ loadFromLegacyCacheFile()

bool MemoryManager::loadFromLegacyCacheFile ( )
private

This member function loads the contents of the cache file assuming the legacy format.

Returns
bool

Definition at line 424 of file memorymanager.cpp.

References bSaveMutex, cache_file, isValid(), mCachesMap, sCache_file, setSaveStatus(), and vMemory.

Referenced by loadFromCacheFile().

Here is the call graph for this function:

◆ loadFromNewCacheFile()

bool MemoryManager::loadFromNewCacheFile ( )
private

This member function tries to load the contents of the cache file in the new cache file format. If it does not succeed, false is returned.

Returns
bool

Definition at line 372 of file memorymanager.cpp.

References bSaveMutex, NumeRe::GenericFile::close(), NumeRe::GenericFile::getCols(), NumeRe::GenericFile::getComment(), NumeRe::GenericFile::getData(), NumeRe::CacheFile::getNumberOfTables(), NumeRe::GenericFile::getRows(), NumeRe::GenericFile::getTableName(), mCachesMap, NumeRe::CacheFile::read(), NumeRe::CacheFile::readCacheHeader(), sCache_file, and vMemory.

Referenced by loadFromCacheFile().

Here is the call graph for this function:

◆ mapStringViewFind()

size_t MemoryManager::mapStringViewFind ( StringView  view) const
inlineprivate

Definition at line 73 of file memorymanager.hpp.

References mCachesMap, SyntaxError::TABLE_DOESNT_EXIST, and StringViewBase::to_string().

Referenced by getCols(), and getLines().

Here is the call graph for this function:

◆ matchTableAsParameter()

std::string MemoryManager::matchTableAsParameter ( const std::string &  sExpression,
char  cFollowing = ' ' 
)
inline

Definition at line 165 of file memorymanager.hpp.

References findParameter(), and mCachesMap.

Referenced by cmd_rename(), plugin_histogram(), plugin_statistics(), and swapTables().

Here is the call graph for this function:

◆ max() [1/3]

mu::value_type MemoryManager::max ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 842 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ max() [2/3]

mu::value_type MemoryManager::max ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 837 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ max() [3/3]

std::vector< mu::value_type > MemoryManager::max ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 628 of file memorymanager.hpp.

References max(), and resolveMAF().

Referenced by calcStats(), createHist1D(), createHist2D(), NumeReDebugger::decodeType(), getDataForFit(), NumeReDebugger::getGlobals(), NumeReKernel::getVariableList(), MafDataAccess(), max(), replaceEntityOccurence(), shortTimeFourierAnalysis(), and writeAudioFile().

Here is the call graph for this function:

◆ maxpos()

std::vector< mu::value_type > MemoryManager::maxpos ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 803 of file memorymanager.hpp.

References ALL, COLS, findTable(), GRID, LINES, VectorIndex::OPEN_END, parseEvery(), and vMemory.

Referenced by MafDataAccess().

Here is the call graph for this function:

◆ med() [1/3]

mu::value_type MemoryManager::med ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 947 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ med() [2/3]

mu::value_type MemoryManager::med ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 952 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ med() [3/3]

std::vector< mu::value_type > MemoryManager::med ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 678 of file memorymanager.hpp.

References med(), and resolveMAF().

Referenced by calcStats(), MafDataAccess(), med(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ melt()

void MemoryManager::melt ( Memory _mem,
const std::string &  sTable,
bool  overrideTarget = false 
)
overridevirtual

This member function either combines the contents of the passed Memory instance with an existing one with the passed table name, or simply appends it to the list of known tables.

Parameters
_memMemory*
sTableconst string&
overrideTargetbool
Returns
void

Implements NumeRe::FileAdapter.

Definition at line 872 of file memorymanager.cpp.

References Memory::getMetaData(), mCachesMap, NumeRe::TableMetaData::melt(), Memory::memArray, Memory::nCalcLines, Memory::resizeMemory(), Memory::setMetaData(), Memory::setSaveStatus(), and vMemory.

Referenced by copyDataToTemporaryTable().

Here is the call graph for this function:

◆ min() [1/3]

mu::value_type MemoryManager::min ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 852 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ min() [2/3]

mu::value_type MemoryManager::min ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 847 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ min() [3/3]

std::vector< mu::value_type > MemoryManager::min ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 633 of file memorymanager.hpp.

References min(), and resolveMAF().

Referenced by calcStats(), createHist1D(), createHist2D(), NumeReDebugger::decodeType(), getDataForFit(), NumeReDebugger::getGlobals(), NumeReKernel::getVariableList(), MafDataAccess(), min(), replaceEntityOccurence(), shortTimeFourierAnalysis(), and writeAudioFile().

Here is the call graph for this function:

◆ minpos()

std::vector< mu::value_type > MemoryManager::minpos ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 791 of file memorymanager.hpp.

References ALL, COLS, findTable(), GRID, LINES, VectorIndex::OPEN_END, parseEvery(), and vMemory.

Referenced by MafDataAccess().

Here is the call graph for this function:

◆ norm() [1/3]

mu::value_type MemoryManager::norm ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 927 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ norm() [2/3]

mu::value_type MemoryManager::norm ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 932 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ norm() [3/3]

std::vector< mu::value_type > MemoryManager::norm ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 673 of file memorymanager.hpp.

References norm(), and resolveMAF().

Referenced by calcStats(), MafDataAccess(), norm(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ num() [1/3]

mu::value_type MemoryManager::num ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 877 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ num() [2/3]

mu::value_type MemoryManager::num ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 882 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ num() [3/3]

std::vector< mu::value_type > MemoryManager::num ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 648 of file memorymanager.hpp.

References num(), and resolveMAF().

Referenced by calcStats(), getDataForFit(), MafDataAccess(), num(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ or_func() [1/3]

mu::value_type MemoryManager::or_func ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 902 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ or_func() [2/3]

mu::value_type MemoryManager::or_func ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 897 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ or_func() [3/3]

std::vector< mu::value_type > MemoryManager::or_func ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 658 of file memorymanager.hpp.

References or_func(), and resolveMAF().

Referenced by MafDataAccess(), or_func(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ overwriteColumn()

void MemoryManager::overwriteColumn ( int  col,
const std::string &  _sCache,
TableColumn::ColumnType  type 
)

This member function converts the selected column to the needed type, if this column shall be overwritten by another than the current type.

Parameters
colint
_sCacheconst std::string&
typeTableColumn::ColumnType
Returns
void

Definition at line 652 of file memorymanager.cpp.

References convert_for_overwrite(), findTable(), getCols(), and vMemory.

Referenced by NumeRe::StringParser::storeStringToDataObjects().

Here is the call graph for this function:

◆ parseEvery()

VectorIndex MemoryManager::parseEvery ( std::string &  sDir,
const std::string &  sTableName 
) const
private

This member function extracts and parses the every expression part of a MAF call.

Parameters
sDirstring&
sTableNameconst string&
Returns
VectorIndex

Definition at line 671 of file memorymanager.cpp.

References mu::ParserBase::DisableAccessCaching(), mu::ParserBase::Eval(), getArgAtPos(), getCols(), NumeReKernel::getInstance(), getLines(), NumeReKernel::getParser(), intCast(), mu::ParserBase::SetExpr(), and StripSpaces().

Referenced by cmp(), maxpos(), minpos(), pct(), resolveMAF(), and size().

Here is the call graph for this function:

◆ pct() [1/3]

mu::value_type MemoryManager::pct ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol,
mu::value_type  dPct = 0.5 
) const
inline

Definition at line 957 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ pct() [2/3]

mu::value_type MemoryManager::pct ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1,
mu::value_type  dPct = 0.5 
) const
inline

Definition at line 962 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ pct() [3/3]

std::vector< mu::value_type > MemoryManager::pct ( const std::string &  sTable,
std::string  sDir,
mu::value_type  dPct = 0.5 
) const
inline

Definition at line 731 of file memorymanager.hpp.

References findTable(), getCols(), getLines(), GRID, parseEvery(), pct(), VectorIndex::size(), and vMemory.

Referenced by calcStats(), createHist1D(), createHist2D(), pct(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ prd() [1/3]

mu::value_type MemoryManager::prd ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 857 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ prd() [2/3]

mu::value_type MemoryManager::prd ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 862 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ prd() [3/3]

std::vector< mu::value_type > MemoryManager::prd ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 638 of file memorymanager.hpp.

References prd(), and resolveMAF().

Referenced by MafDataAccess(), prd(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ removeData()

void MemoryManager::removeData ( bool  bAutoSave = false)

Removes the "data()" table, if it is available.

Parameters
bAutoSavebool
Returns
void

Definition at line 806 of file memorymanager.cpp.

References deleteTable(), mCachesMap, NumeRe::FileAdapter::sDataFile, and vMemory.

Referenced by cmd_load(), cmd_reload(), and load_data().

Here is the call graph for this function:

◆ removeTablesFromMemory()

void MemoryManager::removeTablesFromMemory ( )

Removes all tables in memory and re- initializes the MemoryManager with the default table.

Returns
void

Definition at line 81 of file memorymanager.cpp.

References bSaveMutex, isValid(), mCachesMap, NumeRe::FileAdapter::sDataFile, and vMemory.

Referenced by clear_cache(), NumeReKernel::CloseSession(), and NumeReKernel::MainLoop().

Here is the call graph for this function:

◆ renameTable()

void MemoryManager::renameTable ( const std::string &  sCache,
const std::string &  sNewName,
bool  bForceRenaming = false 
)
inline

Definition at line 246 of file memorymanager.hpp.

References SyntaxError::CACHE_ALREADY_EXISTS, SyntaxError::CACHE_CANNOT_BE_RENAMED, SyntaxError::CACHE_DOESNT_EXIST, SyntaxError::invalid_position, isTable(), mCachesMap, and setSaveStatus().

Referenced by cmd_rename(), cmd_show(), cmd_stats(), NumeReKernel::executePlugins(), Procedure::procedureInterface(), Procedure::replaceReturnVal(), and saveDataObject().

Here is the call graph for this function:

◆ reorderColumn()

void MemoryManager::reorderColumn ( size_t  _nLayer,
const std::vector< int > &  vIndex,
long long int  i1,
long long int  i2,
long long int  j1 = 0 
)
private

◆ resample()

bool MemoryManager::resample ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol,
std::pair< size_t, size_t >  samples,
AppDir  Direction = ALL,
std::string  sFilter = "lanczos3" 
)
inline

Definition at line 343 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by cmd_resample().

Here is the call graph for this function:

◆ resizeTable()

bool MemoryManager::resizeTable ( int  _nCols,
const std::string &  _sTable 
)
inline

Definition at line 185 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by performMatrixOperation(), readAudioFile(), seekInAudioFile(), and shortTimeFourierAnalysis().

Here is the call graph for this function:

◆ resolveMAF()

vector< mu::value_type > MemoryManager::resolveMAF ( const std::string &  sTableName,
std::string  sDir,
mu::value_type(MemoryManager::*)(const std::string &, long long int, long long int, long long int, long long int) const  MAF 
) const
private

This member function is the abstract implementation of a MAF function call. Most of the MAFs use this abstraction (except cmp and pct).

Parameters
sTableNamestring& const
sDirstring
MAF(mu::value_type*)
Returns
vector<mu::value_type>

Definition at line 745 of file memorymanager.cpp.

References findTable(), getCols(), getLines(), GRID, parseEvery(), VectorIndex::size(), and vMemory.

Referenced by and_func(), avg(), cnt(), max(), med(), min(), norm(), num(), or_func(), prd(), std(), sum(), and xor_func().

Here is the call graph for this function:

◆ retouch()

bool MemoryManager::retouch ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol,
AppDir  Direction = ALL 
)
inline

Definition at line 338 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by cmd_retouch().

Here is the call graph for this function:

◆ saveLayer()

virtual bool MemoryManager::saveLayer ( std::string  _sFileName,
const std::string &  _sTable,
unsigned short  nPrecision 
)
inlineoverrideprivatevirtual

Implements NumeRe::FileAdapter.

Definition at line 63 of file memorymanager.hpp.

References findTable(), FileSystem::ValidFileName(), and vMemory.

Here is the call graph for this function:

◆ saveToCacheFile()

bool MemoryManager::saveToCacheFile ( )

This member function saves the contents of this class to the cache file so that they may be restored after a restart.

Returns
bool

Definition at line 299 of file memorymanager.cpp.

References bSaveMutex, isTable(), mCachesMap, sCache_file, NumeRe::GenericFile::setComment(), NumeRe::GenericFile::setData(), NumeRe::GenericFile::setDimensions(), NumeRe::CacheFile::setNumberOfTables(), setSaveStatus(), NumeRe::GenericFile::setTableName(), FileSystem::ValidFileName(), vMemory, NumeRe::CacheFile::write(), and NumeRe::CacheFile::writeCacheHeader().

Referenced by NumeReKernel::Autosave(), autoSave(), NumeReKernel::MainLoop(), and NumeReKernel::saveData().

Here is the call graph for this function:

◆ setCacheFileName()

void MemoryManager::setCacheFileName ( std::string  _sFileName)

This member function updates the name of the cache file.

Parameters
_sFileNamestring
Returns
void

Definition at line 282 of file memorymanager.cpp.

References sCache_file, and FileSystem::ValidFileName().

Here is the call graph for this function:

◆ setCategories()

bool MemoryManager::setCategories ( const std::string &  _sTable,
const VectorIndex _vCol,
const std::vector< std::string > &  vCategories 
)
inline

Definition at line 353 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ setHeadLineElement()

bool MemoryManager::setHeadLineElement ( int  _i,
const std::string &  _sTable,
std::string  _sHead 
)
inline

Definition at line 598 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by boneDetection(), calculate1dFFT(), calculate2dFFT(), calculateChiMap(), createDatagrid(), createHist1D(), createOutputForHist2D(), fastWaveletTransform(), performDataOperation(), plugin_statistics(), readImage(), regularizeDataSet(), shortTimeFourierAnalysis(), Odesolver::solve(), and NumeRe::StringParser::storeStringToDataObjects().

Here is the call graph for this function:

◆ setMetaData()

void MemoryManager::setMetaData ( const std::string &  _sTable,
const NumeRe::TableMetaData meta 
)
inline

Definition at line 610 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by searchAndDeleteTable().

Here is the call graph for this function:

◆ setPluginCommands()

void MemoryManager::setPluginCommands ( const std::string &  sPluginCmds)
inline

◆ setPredefinedCommands()

void MemoryManager::setPredefinedCommands ( const std::string &  sCommands)
inline

Definition at line 132 of file memorymanager.hpp.

References sPredefinedCommands.

◆ setPredefinedFuncs()

void MemoryManager::setPredefinedFuncs ( const std::string &  sFuncs)
inline

Definition at line 117 of file memorymanager.hpp.

References sPredefinedFuncs.

Referenced by NumeReKernel::StartUp().

◆ setSaveStatus()

void MemoryManager::setSaveStatus ( bool  _bIsSaved)

Changes the save status of all tables in memory.

Parameters
_bIsSavedbool
Returns
void

Definition at line 157 of file memorymanager.cpp.

References vMemory.

Referenced by cmd_quit(), deleteTable(), loadFromLegacyCacheFile(), renameTable(), and saveToCacheFile().

◆ setUserdefinedFuncs()

void MemoryManager::setUserdefinedFuncs ( const std::string &  sUserFuncs)
inline

Definition at line 122 of file memorymanager.hpp.

References sUserdefinedFuncs.

Referenced by cmd_new().

◆ shrink()

void MemoryManager::shrink ( const std::string &  _sCache)
inline

Definition at line 205 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by rotateTable().

Here is the call graph for this function:

◆ size()

std::vector< mu::value_type > MemoryManager::size ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 779 of file memorymanager.hpp.

References ALL, COLS, findTable(), GRID, LINES, parseEvery(), and vMemory.

Referenced by MafDataAccess().

Here is the call graph for this function:

◆ smooth()

bool MemoryManager::smooth ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol,
const NumeRe::FilterSettings _settings,
AppDir  Direction = ALL 
)
inline

Definition at line 333 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by cmd_smooth().

Here is the call graph for this function:

◆ sortElements() [1/2]

vector< int > MemoryManager::sortElements ( const std::string &  sCache,
int  i1,
int  i2,
int  j1 = 0,
int  j2 = 0,
const std::string &  sSortingExpression = "" 
)

This member function informs the selected table to sort its contents according the passed parameter set.

Parameters
sCacheconst string&
i1int
i2int
j1int
j2int
sSortingExpressionconst string&
Returns
vector<int>

Definition at line 268 of file memorymanager.cpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ sortElements() [2/2]

vector< int > MemoryManager::sortElements ( const std::string &  sLine)

This member function wraps the sorting functionality and evaluates the passed parameter string before delegating to the actual implementation.

Parameters
sLineconst string&
Returns
vector<int>

Definition at line 204 of file memorymanager.cpp.

References findCommand(), findParameter(), findTable(), getArgAtPos(), getCols(), getLines(), isValid(), mCachesMap, Match::sString, and vMemory.

Referenced by differentiate(), findExtremaInMultiResult(), findZeroesInMultiResult(), integrateSingleDimensionData(), and sortData().

Here is the call graph for this function:

◆ std() [1/3]

mu::value_type MemoryManager::std ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 822 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ std() [2/3]

mu::value_type MemoryManager::std ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 817 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ std() [3/3]

std::vector< mu::value_type > MemoryManager::std ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 618 of file memorymanager.hpp.

References resolveMAF(), and std().

Referenced by calcStats(), createHist1D(), createHist2D(), MafDataAccess(), replaceEntityOccurence(), and std().

Here is the call graph for this function:

◆ sum() [1/3]

mu::value_type MemoryManager::sum ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 867 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ sum() [2/3]

mu::value_type MemoryManager::sum ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 872 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ sum() [3/3]

std::vector< mu::value_type > MemoryManager::sum ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 643 of file memorymanager.hpp.

References resolveMAF(), and sum().

Referenced by integrateSingleDimensionData(), MafDataAccess(), replaceEntityOccurence(), and sum().

Here is the call graph for this function:

◆ swapTables()

void MemoryManager::swapTables ( std::string  sTable1,
std::string  sTable2 
)
inline

Definition at line 262 of file memorymanager.hpp.

References SyntaxError::CACHE_DOESNT_EXIST, SyntaxError::invalid_position, isTable(), and mCachesMap.

Referenced by NumeReKernel::executePlugins(), Procedure::procedureInterface(), Procedure::replaceReturnVal(), and swapTables().

Here is the call graph for this function:

◆ updateDimensionVariables()

bool MemoryManager::updateDimensionVariables ( StringView  sTableName)

This member function updates the dimension variables for the selected table to be used in expressions.

Parameters
sTableNameStringView
Returns
bool

Definition at line 929 of file memorymanager.cpp.

References getCols(), getLines(), StringMemory::getStringCols(), StringMemory::getStringElements(), tableColumnsCount, and tableLinesCount.

Referenced by Plot::createDataLegends(), getIndices(), tableMethod_anova(), tableMethod_binsof(), tableMethod_categories(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_cov(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_typeof(), and tableMethod_zscore().

Here is the call graph for this function:

◆ writeComment()

void MemoryManager::writeComment ( const std::string &  _sTable,
const std::string &  _comment 
)
inline

Definition at line 605 of file memorymanager.hpp.

References findTable(), and vMemory.

Referenced by tableMethod_annotate().

Here is the call graph for this function:

◆ writeToTable() [1/4]

void MemoryManager::writeToTable ( Indices _idx,
const std::string &  _sCache,
const ValueVector _values 
)
inline

Definition at line 593 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ writeToTable() [2/4]

void MemoryManager::writeToTable ( Indices _idx,
const std::string &  _sCache,
mu::value_type _dData,
unsigned int  _nNum 
)
inline

Definition at line 588 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ writeToTable() [3/4]

◆ writeToTable() [4/4]

void MemoryManager::writeToTable ( int  _nLine,
int  _nCol,
const std::string &  _sCache,
const std::string &  _sValue 
)
inline

Definition at line 583 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ xor_func() [1/3]

mu::value_type MemoryManager::xor_func ( const std::string &  _sCache,
const VectorIndex _vLine,
const VectorIndex _vCol 
) const
inline

Definition at line 912 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ xor_func() [2/3]

mu::value_type MemoryManager::xor_func ( const std::string &  _sCache,
long long int  i1,
long long int  i2,
long long int  j1 = 0,
long long int  j2 = -1 
) const
inline

Definition at line 907 of file memorymanager.hpp.

References findTable(), and vMemory.

Here is the call graph for this function:

◆ xor_func() [3/3]

std::vector< mu::value_type > MemoryManager::xor_func ( const std::string &  sTable,
std::string  sDir 
) const
inline

Definition at line 663 of file memorymanager.hpp.

References resolveMAF(), and xor_func().

Referenced by MafDataAccess(), replaceEntityOccurence(), and xor_func().

Here is the call graph for this function:

Member Data Documentation

◆ bSaveMutex

bool MemoryManager::bSaveMutex
private

◆ cache_file

std::fstream MemoryManager::cache_file
private

Definition at line 50 of file memorymanager.hpp.

Referenced by loadFromLegacyCacheFile(), and ~MemoryManager().

◆ mCachesMap

◆ sCache_file

std::string MemoryManager::sCache_file
private

◆ sPluginCommands

std::string MemoryManager::sPluginCommands
private

Definition at line 55 of file memorymanager.hpp.

Referenced by addTable(), MemoryManager(), and setPluginCommands().

◆ sPredefinedCommands

std::string MemoryManager::sPredefinedCommands
private

Definition at line 54 of file memorymanager.hpp.

Referenced by addTable(), MemoryManager(), and setPredefinedCommands().

◆ sPredefinedFuncs

std::string MemoryManager::sPredefinedFuncs
private

Definition at line 52 of file memorymanager.hpp.

Referenced by addTable(), MemoryManager(), and setPredefinedFuncs().

◆ sUserdefinedFuncs

std::string MemoryManager::sUserdefinedFuncs
private

Definition at line 53 of file memorymanager.hpp.

Referenced by addTable(), MemoryManager(), and setUserdefinedFuncs().

◆ tableColumnsCount

mu::value_type MemoryManager::tableColumnsCount

◆ tableLinesCount

mu::value_type MemoryManager::tableLinesCount

◆ vMemory


The documentation for this class was generated from the following files: