24#include "../ui/error.hpp"
25#include "../settings.hpp"
26#include "../structures.hpp"
34#ifndef MEMORYMANAGER_HPP
35#define MEMORYMANAGER_HPP
48 std::map<std::string, std::pair<size_t, size_t>>
mCachesMap;
57 void reorderColumn(
size_t _nLayer,
const std::vector<int>& vIndex,
long long int i1,
long long int i2,
long long int j1 = 0);
61 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;
63 virtual bool saveLayer(std::string _sFileName,
const std::string& _sTable,
unsigned short nPrecision)
override
68 inline bool exists(
const std::string& sTable)
const
77 if (view == iter->first)
79 if (iter->second.first != iter->second.second)
80 return iter->second.second;
82 return iter->second.first;
84 else if (view < iter->first)
98 if (iter->second.first != iter->second.second)
99 return iter->second.second;
101 return iter->second.first;
141 bool isTable(
const std::string& sTable)
const;
151 bool isValidElement(
long long int _nLine,
long long int _nCol,
const std::string& _sTable)
const
190 void deleteEntry(
int _nLine,
int _nCol,
const std::string& _sCache)
195 void deleteBulk(
const std::string& _sCache,
int i1,
int i2,
int j1 = 0,
int j2 = 0)
224 inline const std::map<std::string, std::pair<size_t, size_t>>&
getTableMap()
const
231 std::string sReturn =
";";
235 sReturn += iter->first +
";";
244 virtual void melt(
Memory* _mem,
const std::string& sTable,
bool overrideTarget =
false)
override;
246 inline void renameTable(
const std::string& sCache,
const std::string& sNewName,
bool bForceRenaming =
false)
254 if (sCache ==
"table" && !bForceRenaming)
262 inline void swapTables(std::string sTable1, std::string sTable2)
275 if (iter.second.first == tab1)
276 iter.second.first = tab2;
277 else if (iter.second.first == tab2)
278 iter.second.first = tab1;
280 if (iter.second.second == tab1)
281 iter.second.second = tab2;
282 else if (iter.second.second == tab2)
283 iter.second.second = tab1;
287 void addReference(
const std::string& sTable,
const std::string& sReference)
292 if (!sReference.length())
300 auto iter =
mCachesMap.find(sReference.substr(0, sReference.find(
'(')));
301 mCachesMap[sTable].second = iter->second.first;
304 void copyTable(
const std::string& source,
const std::string& target);
315 return vMemory[_nLayer]->extractTable(_sTable, lines, cols);
325 return vMemory[_nLayer]->importTable(_table, lines, cols);
330 std::vector<int>
sortElements(
const std::string& sLine);
331 std::vector<int>
sortElements(
const std::string& sCache,
int i1,
int i2,
int j1 = 0,
int j2 = 0,
const std::string& sSortingExpression =
"");
358 std::vector<mu::value_type>
findCols(
const std::string& sTable,
const std::vector<std::string>& vCols)
const
364 const std::vector<mu::value_type>& vValues,
365 const std::vector<std::string>& vStringValues)
const
367 return vMemory[
findTable(sTable)]->countIfEqual(_vCols, vValues, vStringValues);
370 std::vector<mu::value_type>
getIndex(
const std::string& sTable,
size_t nCol,
371 const std::vector<mu::value_type>& vValues,
372 const std::vector<std::string>& vStringValues)
const
378 size_t colCategories,
size_t colValues,
const VectorIndex& _vIndex,
double significance)
const
380 return vMemory[
findTable(sTable)]->getOneWayAnova(colCategories, colValues, _vIndex, significance);
386 return vMemory[
findTable(sTable)]->getCovariance(col1, _vIndex1, col2, _vIndex2);
392 return vMemory[
findTable(sTable)]->getPearsonCorr(col1, _vIndex1, col2, _vIndex2);
398 return vMemory[
findTable(sTable)]->getSpearmanCorr(col1, _vIndex1, col2, _vIndex2);
401 std::vector<mu::value_type>
getRank(
const std::string& sTable,
407 std::vector<mu::value_type>
getZScore(
const std::string& sTable,
413 std::vector<mu::value_type>
getBins(
const std::string& sTable,
414 size_t col,
size_t nBins)
const
426 if (idx != (
size_t)-1)
427 return vMemory[idx]->getLines(_bFull);
432 inline int getLines(
const std::string& sTable,
bool _bFull =
false)
const
446 if (idx != (
size_t)-1)
447 return vMemory[idx]->getCols(_bFull);
452 inline int getCols(
const std::string& sTable,
bool _bFull =
false)
const
462 inline int getBytes(
const std::string& sTable)
const
470 return vMemory[_nLayer]->getSize();
491 return std::vector<mu::value_type>();
552 return std::vector<std::string>();
583 inline void writeToTable(
int _nLine,
int _nCol,
const std::string& _sCache,
const std::string& _sValue)
605 void writeComment(
const std::string& _sTable,
const std::string& _comment)
618 std::vector<mu::value_type>
std(
const std::string& sTable, std::string sDir)
const
623 std::vector<mu::value_type>
avg(
const std::string& sTable, std::string sDir)
const
628 std::vector<mu::value_type>
max(
const std::string& sTable, std::string sDir)
const
633 std::vector<mu::value_type>
min(
const std::string& sTable, std::string sDir)
const
638 std::vector<mu::value_type>
prd(
const std::string& sTable, std::string sDir)
const
643 std::vector<mu::value_type>
sum(
const std::string& sTable, std::string sDir)
const
648 std::vector<mu::value_type>
num(
const std::string& sTable, std::string sDir)
const
653 std::vector<mu::value_type>
and_func(
const std::string& sTable, std::string sDir)
const
658 std::vector<mu::value_type>
or_func(
const std::string& sTable, std::string sDir)
const
663 std::vector<mu::value_type>
xor_func(
const std::string& sTable, std::string sDir)
const
668 std::vector<mu::value_type>
cnt(
const std::string& sTable, std::string sDir)
const
673 std::vector<mu::value_type>
norm(
const std::string& sTable, std::string sDir)
const
678 std::vector<mu::value_type>
med(
const std::string& sTable, std::string sDir)
const
683 std::vector<mu::value_type>
cmp(
const std::string& sTable, std::string sDir,
mu::value_type dRef = 0.0,
int nType = 0)
const
685 std::vector<mu::value_type> vResults;
686 long long int nlines =
getLines(sTable,
false);
687 long long int ncols =
getCols(sTable,
false);
689 long long int nGridOffset = sDir.find(
"grid") != std::string::npos ? 2 : 0;
696 nlines = vSize.front().real();
697 ncols = vSize.back().real()+nGridOffset;
702 if (sDir.find(
"cols") != std::string::npos)
704 for (
size_t i = 0; i < _idx.
size(); i++)
706 if (_idx[i]+nGridOffset < 0 || _idx[i]+nGridOffset >= ncols)
709 vResults.push_back(
cmp(sTable, 0, nlines-1, _idx[i]+nGridOffset, -1, dRef.real(), nType));
712 else if (sDir.find(
"lines") != std::string::npos)
714 for (
size_t i = 0; i < _idx.
size(); i++)
716 if (_idx[i]+nGridOffset < 0 || _idx[i]+nGridOffset >= nlines)
719 vResults.push_back(
cmp(sTable, _idx[i]+nGridOffset, -1, 0, ncols-1, dRef.real(), nType));
723 vResults.push_back(
cmp(sTable, 0, nlines-1, nGridOffset, ncols-1, dRef.real(), nType));
725 if (!vResults.size())
726 vResults.push_back(NAN);
731 std::vector<mu::value_type>
pct(
const std::string& sTable, std::string sDir,
mu::value_type dPct = 0.5)
const
733 std::vector<mu::value_type> vResults;
734 long long int nlines =
getLines(sTable,
false);
735 long long int ncols =
getCols(sTable,
false);
737 long long int nGridOffset = sDir.find(
"grid") != std::string::npos ? 2 : 0;
744 nlines = vSize.front().real();
745 ncols = vSize.back().real()+nGridOffset;
750 if (sDir.find(
"cols") != std::string::npos)
752 for (
size_t i = 0; i < _idx.
size(); i++)
754 if (_idx[i]+nGridOffset < 0 || _idx[i]+nGridOffset >= ncols)
757 vResults.push_back(
pct(sTable, 0, nlines-1, _idx[i]+nGridOffset, -1, dPct.real()));
760 else if (sDir.find(
"lines") != std::string::npos)
762 for (
size_t i = 0; i < _idx.
size(); i++)
764 if (_idx[i]+nGridOffset < 0 || _idx[i]+nGridOffset >= nlines)
767 vResults.push_back(
pct(sTable, _idx[i]+nGridOffset, -1, 0, ncols-1, dPct.real()));
771 vResults.push_back(
pct(sTable, 0, nlines-1, nGridOffset, ncols-1, dPct.real()));
773 if (!vResults.size())
774 vResults.push_back(NAN);
779 std::vector<mu::value_type>
size(
const std::string& sTable, std::string sDir)
const
783 if (sDir.find(
"cols") != std::string::npos)
785 else if (sDir.find(
"lines") != std::string::npos)
791 std::vector<mu::value_type>
minpos(
const std::string& sTable, std::string sDir)
const
795 if (sDir.find(
"cols") != std::string::npos)
797 else if (sDir.find(
"lines") != std::string::npos)
803 std::vector<mu::value_type>
maxpos(
const std::string& sTable, std::string sDir)
const
807 if (sDir.find(
"cols") != std::string::npos)
809 else if (sDir.find(
"lines") != std::string::npos)
817 inline 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
827 inline 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
837 inline 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
847 inline 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
862 inline 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
872 inline 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
882 inline 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
887 inline 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
897 inline 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
907 inline 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
922 inline 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
932 inline 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
942 inline 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
952 inline 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
962 inline 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
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 pre...
This class represents a single table in memory, or a - so to say - single memory page to be handled b...
This class represents the central memory managing instance. It will handle all tables and clusters,...
std::string matchTableAsParameter(const std::string &sExpression, char cFollowing=' ')
TableColumn::ColumnType getType(const VectorIndex &_vCol, const std::string &_sTable) 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
void removeData(bool bAutoSave=false)
Removes the "data()" table, if it is available.
mu::value_type and_func(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
bool loadFromNewCacheFile()
This member function tries to load the contents of the cache file in the new cache file format....
std::vector< mu::value_type > getElement(const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
std::vector< mu::value_type > med(const std::string &sTable, std::string sDir) const
void reorderColumn(size_t _nLayer, const std::vector< int > &vIndex, long long int i1, long long int i2, long long int j1=0)
size_t mapStringViewFind(StringView view) const
std::vector< mu::value_type > xor_func(const std::string &sTable, std::string sDir) const
std::vector< mu::value_type > avg(const std::string &sTable, std::string sDir) const
mu::value_type getElement(int _nLine, int _nCol, const std::string &_sTable) const
int getHeadlineCount(const std::string &_sTable) const
mu::value_type std(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
bool smooth(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, const NumeRe::FilterSettings &_settings, AppDir Direction=ALL)
std::string sPluginCommands
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
bool saveToCacheFile()
This member function saves the contents of this class to the cache file so that they may be restored ...
std::string getComment(const std::string &_sTable) 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 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
std::vector< mu::value_type > findCols(const std::string &sTable, const std::vector< std::string > &vCols) const
std::string sUserdefinedFuncs
mu::value_type pct(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, mu::value_type dPct=0.5) const
mu::value_type tableLinesCount
bool getSaveStatus() const
Returns, whether there's at least a single table in memory, which has not been saved yet.
mu::value_type num(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
ValueVector getElementAsString(const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
int getAppendedZeroes(int _i, const std::string &_sTable) 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
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
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
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 tableColumnsCount
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...
bool isValidElement(long long int _nLine, long long int _nCol, const std::string &_sTable) const
std::vector< mu::value_type > min(const std::string &sTable, std::string sDir) const
long long int getLastSaved() const
Returns the earliest time-point, when a table was saved. This value is used to determine the elapsed ...
std::vector< mu::value_type > norm(const std::string &sTable, std::string sDir) 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
std::string getTopHeadLineElement(int _i, const std::string &_sTable) const
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 ...
std::vector< mu::value_type > pct(const std::string &sTable, std::string sDir, mu::value_type dPct=0.5) const
void deleteBulk(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol)
void removeTablesFromMemory()
Removes all tables in memory and re- initializes the MemoryManager with the default table.
void deleteBulk(const std::string &_sCache, int i1, int i2, int j1=0, int j2=0)
NumeRe::TableMetaData getMetaData(const std::string &_sTable) const
mu::value_type cnt(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
void copyTable(const std::string &source, const std::string &target)
Copy one table to another one (and create the missing table automatically, if needed).
int getLines(StringView sTable, bool _bFull=false) const
mu::value_type xor_func(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
void shrink(const std::string &_sCache)
bool exists(const std::string &sTable) 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 sum(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
mu::value_type min(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
const std::map< std::string, std::pair< size_t, size_t > > & getTableMap() 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 norm(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
void setPredefinedCommands(const std::string &sCommands)
mu::value_type max(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
std::vector< Memory * > vMemory
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))
mu::value_type med(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
std::vector< mu::value_type > cmp(const std::string &sTable, std::string sDir, mu::value_type dRef=0.0, int nType=0) const
virtual bool saveLayer(std::string _sFileName, const std::string &_sTable, unsigned short nPrecision) override
bool setCategories(const std::string &_sTable, const VectorIndex &_vCol, const std::vector< std::string > &vCategories)
bool isEmpty(const std::string &sTable) const
std::vector< mu::value_type > getRank(const std::string &sTable, size_t col, const VectorIndex &_vIndex, Memory::RankingStrategy _strat) const
bool isTable(const std::string &sTable) const
This member function returns, whether the passed table name corresponds to a known table.
mu::value_type prd(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
size_t findTable(const std::string &sTable) const
void setUserdefinedFuncs(const std::string &sUserFuncs)
void swapTables(std::string sTable1, std::string sTable2)
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 > getBins(const std::string &sTable, size_t col, size_t nBins) const
std::vector< mu::value_type > and_func(const std::string &sTable, std::string sDir) const
bool deleteTable(const std::string &sCache)
This member function removes the selected table.
void setMetaData(const std::string &_sTable, const NumeRe::TableMetaData &meta)
NumeRe::Table extractTable(const std::string &_sTable, const VectorIndex &lines=VectorIndex(0, VectorIndex::OPEN_END), const VectorIndex &cols=VectorIndex(0, VectorIndex::OPEN_END))
void copyElementsInto(std::vector< mu::value_type > *vTarget, const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
std::vector< mu::value_type > cnt(const std::string &sTable, std::string sDir) const
void writeComment(const std::string &_sTable, const std::string &_comment)
void writeToTable(Indices &_idx, const std::string &_sCache, mu::value_type *_dData, unsigned int _nNum)
void addReference(const std::string &sTable, const std::string &sReference)
std::vector< mu::value_type > num(const std::string &sTable, std::string sDir) const
mu::value_type getPearsonCorr(const std::string &sTable, size_t col1, const VectorIndex &_vIndex1, size_t col2, const VectorIndex &_vIndex2) const
ValueVector getElementMixed(const VectorIndex &_vLine, const VectorIndex &_vCol, const std::string &_sTable) const
void setCacheFileName(std::string _sFileName)
This member function updates the name of the cache file.
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 overwri...
void writeToTable(Indices &_idx, const std::string &_sCache, const ValueVector &_values)
unsigned int getNumberOfTables() const
void setPredefinedFuncs(const std::string &sFuncs)
bool retouch(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol, AppDir Direction=ALL)
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
std::string getHeadLineElement(int _i, const std::string &_sTable) const
std::vector< mu::value_type > max(const std::string &sTable, std::string sDir) const
int getCols(const std::string &sTable, bool _bFull=false) const
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")
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))
bool containsTables(const std::string &sExpression)
This member function detects, whether a table is used in the current expression.
std::vector< mu::value_type > sum(const std::string &sTable, std::string sDir) 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 max(const std::string &_sCache, long long int i1, long long int i2, long long int j1=0, long long int j2=-1) const
bool isValid() const
Evaluates, whether there's at least a single non-empty table.
std::vector< mu::value_type > std(const std::string &sTable, std::string sDir) const
void setSaveStatus(bool _bIsSaved)
Changes the save status of all tables in memory.
std::vector< mu::value_type > getZScore(const std::string &sTable, size_t col, const VectorIndex &_vIndex) const
bool loadFromLegacyCacheFile()
This member function loads the contents of the cache file assuming the legacy format.
std::vector< mu::value_type > or_func(const std::string &sTable, std::string sDir) const
ValueVector getCategoryList(const VectorIndex &_vCol, const std::string &_sTable) const
void deleteEntry(int _nLine, int _nCol, const std::string &_sCache)
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 us...
void renameTable(const std::string &sCache, const std::string &sNewName, bool bForceRenaming=false)
bool updateDimensionVariables(StringView sTableName)
This member function updates the dimension variables for the selected table to be used in expressions...
bool resizeTable(int _nCols, const std::string &_sTable)
Memory * getTable(const std::string &sTable)
This member function returns a pointer to an existing Memory instance representing the selected table...
VectorIndex parseEvery(std::string &sDir, const std::string &sTableName) const
This member function extracts and parses the every expression part of a MAF call.
AnovaResult getOneWayAnova(const std::string &sTable, size_t colCategories, size_t colValues, const VectorIndex &_vIndex, double significance) const
std::string getTableNames() const
mu::value_type avg(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
bool containsTablesOrClusters(const std::string &sCmdLine)
This member function evaluates, whether the passed command line contains tables or clusters.
~MemoryManager()
MemoryManager destructor. Clears all created tables.
int getLines(const std::string &sTable, bool _bFull=false) const
std::string sPredefinedFuncs
void writeToTable(int _nLine, int _nCol, const std::string &_sCache, const mu::value_type &_dData)
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...
std::string sPredefinedCommands
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
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
std::vector< mu::value_type > minpos(const std::string &sTable, std::string sDir) const
MemoryManager()
Default MemoryManager constructor. Creates the default table and initializes the list of predefined c...
bool convertColumns(const std::string &_sTable, const VectorIndex &_vCol, const std::string &_sType)
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 or_func(const std::string &_sCache, const VectorIndex &_vLine, const VectorIndex &_vCol) const
void writeToTable(int _nLine, int _nCol, const std::string &_sCache, const std::string &_sValue)
bool loadFromCacheFile()
This member function wraps the loading of the tables from the cache file. It will automatically detec...
int getBytes(const std::string &sTable) const
std::vector< mu::value_type > maxpos(const std::string &sTable, std::string sDir) const
int getSize(int _nLayer) const
std::map< std::string, std::pair< size_t, size_t > > mCachesMap
std::vector< mu::value_type > size(const std::string &sTable, std::string sDir) const
bool setHeadLineElement(int _i, const std::string &_sTable, std::string _sHead)
std::vector< std::string > getHeadLineElement(const VectorIndex &_vCol, const std::string &_sTable) const
int getCols(StringView sTable, bool _bFull=false) const
int getColElements(const VectorIndex &cols, const std::string &_sTable) const
Returns the maximal number of elements in the selected column range.
void setPluginCommands(const std::string &sPluginCmds)
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
std::vector< mu::value_type > prd(const std::string &sTable, std::string sDir) const
This class is the management class for the different clusters, which are currently available in memor...
This class represents the file input and output adapter for the MemoryManager class,...
This data container is a copy- efficient table to interchange data between Kernel and GUI.
This class manages the setting values of the internal (kernel) settings of this application.
std::string to_string() const
This member function returns a copy of the viewed section of the string (via std::string::substr)....
This class is the immutable (const) version of a string view. It can be constructed from a MutableStr...
Common exception class for all exceptions thrown in NumeRe.
@ TABLE_DOESNT_EXIST
INSERT HERE.
@ CACHE_CANNOT_BE_RENAMED
static size_t invalid_position
This class abstracts all the index logics, i.e. the logical differences between single indices and in...
size_t size() const
This member function returns the size of the indices stored in this class.
std::vector< std::string > ValueVector
This type defines a generic value vector.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
int findParameter(const std::string &sCmd, const std::string &sParam, const char cFollowing)
This function searches the passed parameter in the passed command string. If something is found,...
Contains the relevant results of the ANOVA F test.
This structure is central for managing the indices of a table or cluster read or write data access....
This structure contains the necessary information to create an instance of one of the following filte...