NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
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>
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 |
Memory * | 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. 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_type > | findCols (const std::string &sTable, const std::vector< std::string > &vCols) const |
std::vector< mu::value_type > | countIfEqual (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_type > | getIndex (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_type > | getRank (const std::string &sTable, size_t col, const VectorIndex &_vIndex, Memory::RankingStrategy _strat) const |
std::vector< mu::value_type > | getZScore (const std::string &sTable, size_t col, const VectorIndex &_vIndex) const |
std::vector< mu::value_type > | getBins (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_type > | getElement (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_type > | std (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | avg (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | max (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | min (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | prd (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | sum (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | num (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | and_func (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | or_func (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | xor_func (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | cnt (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | norm (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | med (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | cmp (const std::string &sTable, std::string sDir, mu::value_type dRef=0.0, int nType=0) const |
std::vector< mu::value_type > | pct (const std::string &sTable, std::string sDir, mu::value_type dPct=0.5) const |
std::vector< mu::value_type > | size (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | minpos (const std::string &sTable, std::string sDir) const |
std::vector< mu::value_type > | maxpos (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... | |
FileSystem & | assign (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... | |
Cluster & | getCluster (StringView sCluster) |
This member function returns a reference to the cluster indicated by the passed cluster identifier. More... | |
Cluster & | getCluster (const std::string &sCluster) |
This member function returns a reference to the cluster indicated by the passed cluster identifier. More... | |
const Cluster & | getCluster (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... | |
Cluster & | newCluster (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_type > | resolveMAF (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 |
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.
Enumerator | |
---|---|
LINES | |
COLS | |
GRID | |
ALL |
Definition at line 108 of file memorymanager.hpp.
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 destructor. Clears all created tables.
Definition at line 63 of file memorymanager.cpp.
References cache_file, and vMemory.
|
inline |
Definition at line 287 of file memorymanager.hpp.
References SyntaxError::CACHE_DOESNT_EXIST, SyntaxError::invalid_position, isTable(), and mCachesMap.
Referenced by tableMethod_aliasof().
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.
sCache | const string& |
_option | const Settings& |
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().
|
inline |
Definition at line 892 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 887 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 653 of file memorymanager.hpp.
References and_func(), and resolveMAF().
Referenced by and_func(), MafDataAccess(), and replaceEntityOccurence().
|
inline |
Definition at line 832 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 827 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 623 of file memorymanager.hpp.
References avg(), and resolveMAF().
Referenced by avg(), calcStats(), MafDataAccess(), and replaceEntityOccurence().
|
inline |
Definition at line 937 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 942 of file memorymanager.hpp.
References findTable(), and vMemory.
|
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().
|
inline |
Definition at line 917 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 922 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 668 of file memorymanager.hpp.
References cnt(), and resolveMAF().
Referenced by calcStats(), cnt(), getDataGridDimensions(), MafDataAccess(), and replaceEntityOccurence().
bool MemoryManager::containsTables | ( | const std::string & | sExpression | ) |
This member function detects, whether a table is used in the current expression.
sExpression | const string& |
Definition at line 992 of file memorymanager.cpp.
References mCachesMap.
Referenced by cmd_clear(), cmd_remove(), containsTablesOrClusters(), Plot::createDataLegends(), editObject(), resolveTablesAndClusters(), and setParametersInWindow().
bool MemoryManager::containsTablesOrClusters | ( | const std::string & | sCmdLine | ) |
This member function evaluates, whether the passed command line contains tables or clusters.
sCmdLine | const string& |
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().
|
inline |
Definition at line 348 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 526 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by handleCachedDataAccess().
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).
source | const std::string& |
target | const std::string& |
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().
|
inline |
Definition at line 363 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_counteq().
|
inline |
Definition at line 200 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 195 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by newObject(), performMatrixOperation(), searchAndDeleteTable(), and Odesolver::solve().
|
inline |
Definition at line 190 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by performDataOperation().
bool MemoryManager::deleteTable | ( | const std::string & | sCache | ) |
This member function removes the selected table.
sCache | const string& |
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().
|
inlineprivate |
Definition at line 68 of file memorymanager.hpp.
References mCachesMap.
Referenced by copyTable(), getCategoryList(), getColElements(), getElement(), getElementAsString(), getElementMixed(), getHeadlineCount(), getHeadLineElement(), getType(), isEmpty(), and isValidElement().
|
inline |
Definition at line 308 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by editObject(), NumeReKernel::getTable(), setParametersInWindow(), and show_data().
|
inline |
Definition at line 313 of file memorymanager.hpp.
References vMemory.
|
inline |
Definition at line 358 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_findCols().
|
inlineprivate |
Definition at line 91 of file memorymanager.hpp.
References mCachesMap, and SyntaxError::TABLE_DOESNT_EXIST.
Referenced by and_func(), avg(), cmp(), cnt(), convertColumns(), copyElementsInto(), copyTable(), countIfEqual(), deleteBulk(), deleteEntry(), extractTable(), findCols(), getAppendedZeroes(), getBins(), getBytes(), getCategoryList(), getColElements(), getCols(), getComment(), getCovariance(), getElement(), getElementAsString(), getElementMixed(), getHeadlineCount(), getHeadLineElement(), getIndex(), getLines(), getMetaData(), getOneWayAnova(), getPearsonCorr(), getRank(), getSpearmanCorr(), getTable(), getType(), getZScore(), importTable(), isEmpty(), isValidElement(), max(), maxpos(), med(), min(), minpos(), norm(), num(), or_func(), overwriteColumn(), pct(), prd(), resample(), resizeTable(), resolveMAF(), retouch(), saveLayer(), setCategories(), setHeadLineElement(), setMetaData(), shrink(), size(), smooth(), sortElements(), std(), sum(), writeComment(), writeToTable(), and xor_func().
|
inline |
Definition at line 560 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by boneDetection().
|
inline |
Definition at line 413 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_binsof().
|
inline |
Definition at line 462 of file memorymanager.hpp.
References findTable(), and getSize().
Referenced by NumeReKernel::getVariableList().
|
inline |
Definition at line 518 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
Referenced by tableMethod_categories(), and tableMethod_categorize().
int MemoryManager::getColElements | ( | const VectorIndex & | cols, |
const std::string & | _sTable | ||
) | const |
Returns the maximal number of elements in the selected column range.
cols | const VectorIndex& |
_sTable | const std::string& |
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().
|
inline |
Definition at line 452 of file memorymanager.hpp.
References findTable(), mCachesMap, and vMemory.
|
inline |
Definition at line 442 of file memorymanager.hpp.
References mapStringViewFind(), and vMemory.
Referenced by append_data(), NumeRe::StringFuncHandler::applySpecialStringFuncs(), calcStats(), cmd_append(), cmd_load(), cmd_reload(), cmd_resample(), cmd_retouch(), cmp(), createDatagrid(), Plot::createDataLegends(), createStatsFile(), createStatsOutput(), NumeReDebugger::decodeType(), DataAccessParser::evalIndices(), evaluateIndices(), evaluateTargetOptionInCommand(), evaluateTransposeForDataOperation(), NumeReKernel::executePlugins(), Plot::extractDataValues(), getDataElements(), getDataForFit(), NumeReDebugger::getGlobals(), getSamplesForDatagrid(), NumeReKernel::getTable(), NumeReKernel::getVariableList(), handleCachedDataAccess(), isValid(), listDeclaredVariables(), make_stringmatrix(), newObject(), overwriteColumn(), parseEvery(), pct(), performDataOperation(), performMatrixOperation(), plugin_histogram(), Procedure::procedureInterface(), regularizeDataSet(), replaceDataEntities(), Procedure::replaceReturnVal(), resolveMAF(), rotateTable(), searchAndDeleteTable(), sortElements(), and updateDimensionVariables().
|
inline |
Definition at line 567 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by createMafVectorName().
|
inline |
Definition at line 383 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_cov().
|
inline |
Definition at line 486 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
|
inline |
Definition at line 478 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
Referenced by boneDetection(), calcStats(), calculateChiMap(), calculateDataForCenterPlot(), calculateHist1dData(), calculateXYHist(), createDatagrid(), createHist1D(), createHist2D(), createStatsFile(), differentiate(), findExtremaInMultiResult(), findZeroesInMultiResult(), getDataForFit(), getDataFromObject(), integrateSingleDimensionData(), make_stringmatrix(), parser_declareDataMatrixValuesForIndices(), performDataOperation(), replaceDataEntities(), rotateTable(), shortTimeFourierAnalysis(), and writeAudioFile().
|
inline |
Definition at line 502 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
Referenced by replaceDataEntities().
|
inline |
Definition at line 494 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
Referenced by replaceDataEntities().
|
inline |
Definition at line 531 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
Referenced by createStatsFile(), createStatsOutput(), and make_stringmatrix().
|
inline |
Definition at line 547 of file memorymanager.hpp.
References exists(), findTable(), and vMemory.
|
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().
|
inline |
Definition at line 370 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_index().
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.
Definition at line 175 of file memorymanager.cpp.
References getLastSaved(), and vMemory.
Referenced by getLastSaved(), and NumeReKernel::getLastSavedTime().
|
inline |
Definition at line 432 of file memorymanager.hpp.
References findTable(), mCachesMap, and vMemory.
|
inline |
Definition at line 422 of file memorymanager.hpp.
References mapStringViewFind(), and vMemory.
Referenced by append_data(), NumeRe::StringFuncHandler::applySpecialStringFuncs(), boneDetection(), calcStats(), cmd_load(), cmd_reload(), cmd_resample(), cmd_retouch(), cmp(), createStatsFile(), NumeReDebugger::decodeType(), differentiate(), DataAccessParser::evalIndices(), evaluateIndices(), NumeReKernel::executePlugins(), Plot::extractDataValues(), findExtremaInMultiResult(), findZeroesInMultiResult(), getDataElements(), getDataForFit(), NumeReDebugger::getGlobals(), NumeReKernel::getVariableList(), handleCachedDataAccess(), integrateSingleDimensionData(), listDeclaredVariables(), make_stringmatrix(), newObject(), parseEvery(), pct(), performDataOperation(), performMatrixOperation(), plugin_histogram(), Procedure::procedureInterface(), Procedure::replaceReturnVal(), resolveMAF(), rotateTable(), searchAndDeleteTable(), Odesolver::solve(), sortElements(), and updateDimensionVariables().
|
inline |
Definition at line 572 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by searchAndDeleteTable().
|
inline |
Definition at line 219 of file memorymanager.hpp.
References mCachesMap.
|
inline |
Definition at line 377 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_anova().
|
inline |
Definition at line 389 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_pcorr().
|
inline |
Definition at line 401 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_rank().
bool MemoryManager::getSaveStatus | ( | ) | const |
Returns, whether there's at least a single table in memory, which has not been saved yet.
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().
|
inline |
Definition at line 467 of file memorymanager.hpp.
References vMemory.
Referenced by getBytes(), and listDeclaredVariables().
|
inline |
Definition at line 395 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_scorr().
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.
sTable | const string& |
Definition at line 826 of file memorymanager.cpp.
References findTable(), mCachesMap, and vMemory.
Referenced by copyDataToTemporaryTable(), evalMatOp(), extractRange(), performMatrixOperation(), readAudioFile(), readImage(), rotateTable(), and seekInAudioFile().
|
inline |
Definition at line 224 of file memorymanager.hpp.
References mCachesMap.
Referenced by cmd_remove(), NumeReKernel::evalDebuggerBreakPoint(), evalMatOp(), NumeRe::StringParser::getDataForString(), NumeReDebugger::getGlobals(), NumeReKernel::getVariableList(), listDeclaredVariables(), resolveTablesAndClusters(), and searchAndDeleteTable().
|
inline |
Definition at line 229 of file memorymanager.hpp.
References mCachesMap.
Referenced by cmd_define().
|
inline |
Definition at line 555 of file memorymanager.hpp.
References getHeadLineElement().
Referenced by calculateHist1dData(), Plot::constructDataLegendElement(), Plot::createDataLegends(), createOutputForHist1D(), and make_stringmatrix().
|
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().
|
inline |
Definition at line 407 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_zscore().
|
inline |
Definition at line 318 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by editObject(), and getParametersFromWindow().
|
inline |
Definition at line 323 of file memorymanager.hpp.
References vMemory.
|
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().
bool MemoryManager::isTable | ( | const std::string & | sTable | ) | const |
This member function returns, whether the passed table name corresponds to a known table.
sTable | const string& |
Definition at line 975 of file memorymanager.cpp.
References mCachesMap.
Referenced by addReference(), NumeRe::StringFuncHandler::applySpecialStringFuncs(), FlowCtrl::calc(), FlowCtrl::compile(), ProcedureVarFactory::createLocalTables(), DataAccessParser::DataAccessParser(), NumeReDebugger::decodeType(), ProcedureVarFactory::evaluateProcedureArguments(), evaluateTargetOptionInCommand(), Procedure::execute(), NumeReKernel::executePlugins(), expandIndexVectors(), getDataElements(), getDataGridDimensions(), NumeReKernel::getTable(), integrate(), isCompleteTable(), newObject(), performMatrixOperation(), plugin_histogram(), Procedure::procedureInterface(), renameTable(), Procedure::replaceReturnVal(), saveToCacheFile(), Plot::separateFunctionsAndData(), Odesolver::solve(), and swapTables().
bool MemoryManager::isValid | ( | ) | const |
Evaluates, whether there's at least a single non-empty table.
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().
|
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().
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.
Definition at line 348 of file memorymanager.cpp.
References bSaveMutex, loadFromLegacyCacheFile(), loadFromNewCacheFile(), sCache_file, and FileSystem::ValidFileName().
Referenced by NumeReKernel::StartUp().
|
private |
This member function loads the contents of the cache file assuming the legacy format.
Definition at line 424 of file memorymanager.cpp.
References bSaveMutex, cache_file, isValid(), mCachesMap, sCache_file, setSaveStatus(), and vMemory.
Referenced by loadFromCacheFile().
|
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.
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().
|
inlineprivate |
Definition at line 73 of file memorymanager.hpp.
References mCachesMap, SyntaxError::TABLE_DOESNT_EXIST, and StringViewBase::to_string().
Referenced by getCols(), and getLines().
|
inline |
Definition at line 165 of file memorymanager.hpp.
References findParameter(), and mCachesMap.
Referenced by cmd_rename(), plugin_histogram(), plugin_statistics(), and swapTables().
|
inline |
Definition at line 842 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 837 of file memorymanager.hpp.
References findTable(), and vMemory.
|
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().
|
inline |
Definition at line 803 of file memorymanager.hpp.
References ALL, COLS, findTable(), GRID, LINES, VectorIndex::OPEN_END, parseEvery(), and vMemory.
Referenced by MafDataAccess().
|
inline |
Definition at line 947 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 952 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 678 of file memorymanager.hpp.
References med(), and resolveMAF().
Referenced by calcStats(), MafDataAccess(), med(), and replaceEntityOccurence().
|
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.
_mem | Memory* |
sTable | const string& |
overrideTarget | bool |
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().
|
inline |
Definition at line 852 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 847 of file memorymanager.hpp.
References findTable(), and vMemory.
|
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().
|
inline |
Definition at line 791 of file memorymanager.hpp.
References ALL, COLS, findTable(), GRID, LINES, VectorIndex::OPEN_END, parseEvery(), and vMemory.
Referenced by MafDataAccess().
|
inline |
Definition at line 927 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 932 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 673 of file memorymanager.hpp.
References norm(), and resolveMAF().
Referenced by calcStats(), MafDataAccess(), norm(), and replaceEntityOccurence().
|
inline |
Definition at line 877 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 882 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 648 of file memorymanager.hpp.
References num(), and resolveMAF().
Referenced by calcStats(), getDataForFit(), MafDataAccess(), num(), and replaceEntityOccurence().
|
inline |
Definition at line 902 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 897 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 658 of file memorymanager.hpp.
References or_func(), and resolveMAF().
Referenced by MafDataAccess(), or_func(), and replaceEntityOccurence().
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.
col | int |
_sCache | const std::string& |
type | TableColumn::ColumnType |
Definition at line 652 of file memorymanager.cpp.
References convert_for_overwrite(), findTable(), getCols(), and vMemory.
Referenced by NumeRe::StringParser::storeStringToDataObjects().
|
private |
This member function extracts and parses the every
expression part of a MAF call.
sDir | string& |
sTableName | const string& |
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().
|
inline |
Definition at line 957 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 962 of file memorymanager.hpp.
References findTable(), and vMemory.
|
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().
|
inline |
Definition at line 857 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 862 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 638 of file memorymanager.hpp.
References prd(), and resolveMAF().
Referenced by MafDataAccess(), prd(), and replaceEntityOccurence().
void MemoryManager::removeData | ( | bool | bAutoSave = false | ) |
Removes the "data()" table, if it is available.
bAutoSave | bool |
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().
void MemoryManager::removeTablesFromMemory | ( | ) |
Removes all tables in memory and re- initializes the MemoryManager with the default table.
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().
|
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().
|
private |
|
inline |
Definition at line 343 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by cmd_resample().
|
inline |
Definition at line 185 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by performMatrixOperation(), readAudioFile(), seekInAudioFile(), and shortTimeFourierAnalysis().
|
private |
This member function is the abstract implementation of a MAF function call. Most of the MAFs use this abstraction (except cmp
and pct
).
sTableName | string& const |
sDir | string |
MAF | (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().
|
inline |
Definition at line 338 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by cmd_retouch().
|
inlineoverrideprivatevirtual |
Implements NumeRe::FileAdapter.
Definition at line 63 of file memorymanager.hpp.
References findTable(), FileSystem::ValidFileName(), and vMemory.
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.
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().
void MemoryManager::setCacheFileName | ( | std::string | _sFileName | ) |
This member function updates the name of the cache file.
_sFileName | string |
Definition at line 282 of file memorymanager.cpp.
References sCache_file, and FileSystem::ValidFileName().
|
inline |
Definition at line 353 of file memorymanager.hpp.
References findTable(), and vMemory.
|
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().
|
inline |
Definition at line 610 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by searchAndDeleteTable().
|
inline |
Definition at line 127 of file memorymanager.hpp.
References sPluginCommands.
Referenced by NumeReKernel::evaluateStrings(), NumeReKernel::handleFlowControls(), NumeReKernel::MainLoop(), and NumeReKernel::StartUp().
|
inline |
Definition at line 132 of file memorymanager.hpp.
References sPredefinedCommands.
|
inline |
Definition at line 117 of file memorymanager.hpp.
References sPredefinedFuncs.
Referenced by NumeReKernel::StartUp().
void MemoryManager::setSaveStatus | ( | bool | _bIsSaved | ) |
Changes the save status of all tables in memory.
_bIsSaved | bool |
Definition at line 157 of file memorymanager.cpp.
References vMemory.
Referenced by cmd_quit(), deleteTable(), loadFromLegacyCacheFile(), renameTable(), and saveToCacheFile().
|
inline |
Definition at line 122 of file memorymanager.hpp.
References sUserdefinedFuncs.
Referenced by cmd_new().
|
inline |
Definition at line 205 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by rotateTable().
|
inline |
Definition at line 779 of file memorymanager.hpp.
References ALL, COLS, findTable(), GRID, LINES, parseEvery(), and vMemory.
Referenced by MafDataAccess().
|
inline |
Definition at line 333 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by cmd_smooth().
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.
sCache | const string& |
i1 | int |
i2 | int |
j1 | int |
j2 | int |
sSortingExpression | const string& |
Definition at line 268 of file memorymanager.cpp.
References findTable(), and vMemory.
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.
sLine | const string& |
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().
|
inline |
Definition at line 822 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 817 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 618 of file memorymanager.hpp.
References resolveMAF(), and std().
Referenced by calcStats(), createHist1D(), createHist2D(), MafDataAccess(), replaceEntityOccurence(), and std().
|
inline |
Definition at line 867 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 872 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 643 of file memorymanager.hpp.
References resolveMAF(), and sum().
Referenced by integrateSingleDimensionData(), MafDataAccess(), replaceEntityOccurence(), and sum().
|
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().
bool MemoryManager::updateDimensionVariables | ( | StringView | sTableName | ) |
This member function updates the dimension variables for the selected table to be used in expressions.
sTableName | StringView |
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().
|
inline |
Definition at line 605 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by tableMethod_annotate().
|
inline |
Definition at line 593 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 588 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 578 of file memorymanager.hpp.
References findTable(), and vMemory.
Referenced by boneDetection(), FlowCtrl::calc(), calculate1dFFT(), calculate2dFFT(), calculateChiMap(), FlowCtrl::compile(), createDatagrid(), createHist1D(), ProcedureVarFactory::createLocalTables(), createOutputForHist2D(), differentiate(), ProcedureVarFactory::evaluateProcedureArguments(), fastWaveletTransform(), findExtremaInMultiResult(), findZeroesInMultiResult(), integrateSingleDimensionData(), NumeReKernel::MainLoop(), performDataOperation(), plugin_random(), plugin_statistics(), Procedure::ProcCalc(), regularizeDataSet(), rotateTable(), shortTimeFourierAnalysis(), Odesolver::solve(), and NumeRe::StringParser::storeStringToDataObjects().
|
inline |
Definition at line 583 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 912 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 907 of file memorymanager.hpp.
References findTable(), and vMemory.
|
inline |
Definition at line 663 of file memorymanager.hpp.
References resolveMAF(), and xor_func().
Referenced by MafDataAccess(), replaceEntityOccurence(), and xor_func().
|
private |
Definition at line 49 of file memorymanager.hpp.
Referenced by loadFromCacheFile(), loadFromLegacyCacheFile(), loadFromNewCacheFile(), MemoryManager(), removeTablesFromMemory(), and saveToCacheFile().
|
private |
Definition at line 50 of file memorymanager.hpp.
Referenced by loadFromLegacyCacheFile(), and ~MemoryManager().
|
private |
Definition at line 48 of file memorymanager.hpp.
Referenced by addReference(), addTable(), containsTables(), deleteTable(), exists(), findTable(), getCols(), getLines(), getNumberOfTables(), getTable(), getTableMap(), getTableNames(), isTable(), loadFromLegacyCacheFile(), loadFromNewCacheFile(), mapStringViewFind(), matchTableAsParameter(), melt(), MemoryManager(), removeData(), removeTablesFromMemory(), renameTable(), saveToCacheFile(), sortElements(), and swapTables().
|
private |
Definition at line 51 of file memorymanager.hpp.
Referenced by loadFromCacheFile(), loadFromLegacyCacheFile(), loadFromNewCacheFile(), MemoryManager(), saveToCacheFile(), and setCacheFileName().
|
private |
Definition at line 55 of file memorymanager.hpp.
Referenced by addTable(), MemoryManager(), and setPluginCommands().
|
private |
Definition at line 54 of file memorymanager.hpp.
Referenced by addTable(), MemoryManager(), and setPredefinedCommands().
|
private |
Definition at line 52 of file memorymanager.hpp.
Referenced by addTable(), MemoryManager(), and setPredefinedFuncs().
|
private |
Definition at line 53 of file memorymanager.hpp.
Referenced by addTable(), MemoryManager(), and setUserdefinedFuncs().
mu::value_type MemoryManager::tableColumnsCount |
Definition at line 112 of file memorymanager.hpp.
Referenced by MemoryManager(), NumeReKernel::StartUp(), and updateDimensionVariables().
mu::value_type MemoryManager::tableLinesCount |
Definition at line 111 of file memorymanager.hpp.
Referenced by MemoryManager(), NumeReKernel::StartUp(), and updateDimensionVariables().
|
private |
Definition at line 47 of file memorymanager.hpp.
Referenced by addTable(), and_func(), avg(), cmp(), cnt(), convertColumns(), copyElementsInto(), copyTable(), countIfEqual(), deleteBulk(), deleteEntry(), deleteTable(), extractTable(), findCols(), getAppendedZeroes(), getBins(), getCategoryList(), getColElements(), getCols(), getComment(), getCovariance(), getElement(), getElementAsString(), getElementMixed(), getHeadlineCount(), getHeadLineElement(), getIndex(), getLastSaved(), getLines(), getMetaData(), getOneWayAnova(), getPearsonCorr(), getRank(), getSaveStatus(), getSize(), getSpearmanCorr(), getTable(), getType(), getZScore(), importTable(), isEmpty(), isValid(), isValidElement(), loadFromLegacyCacheFile(), loadFromNewCacheFile(), max(), maxpos(), med(), melt(), MemoryManager(), min(), minpos(), norm(), num(), or_func(), overwriteColumn(), pct(), prd(), removeData(), removeTablesFromMemory(), resample(), resizeTable(), resolveMAF(), retouch(), saveLayer(), saveToCacheFile(), setCategories(), setHeadLineElement(), setMetaData(), setSaveStatus(), shrink(), size(), smooth(), sortElements(), std(), sum(), writeComment(), writeToTable(), xor_func(), and ~MemoryManager().