NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
dataaccess.cpp File Reference
#include "dataaccess.hpp"
#include "../utils/tools.hpp"
#include "../../kernel.hpp"
#include <vector>
Include dependency graph for dataaccess.cpp:

Go to the source code of this file.

Typedefs

typedef std::string(* TableMethod) (const std::string &, std::string)
 Typedef for a table method. More...
 

Functions

static void resolveTablesAndClusters (string &sLine, Parser &_parser, MemoryManager &_data, const Settings &_option, int options)
 Resolves every call to a cluster or a table. More...
 
static const string handleCachedDataAccess (string &sLine, Parser &_parser, MemoryManager &_data, const Settings &_option)
 This function handles cached data access strings, which may be available in the parser. More...
 
static void replaceEntityStringOccurence (string &sLine, const string &sEntityOccurence, const string &sEntityStringReplacement)
 This function simply replaces every occurences of the entity with its replacement. More...
 
static void replaceEntityOccurence (string &sLine, const string &sEntityOccurence, const string &sEntityName, const string &sEntityReplacement, const Indices &_idx, MemoryManager &_data, Parser &_parser, const Settings &_option, bool isCluster)
 This function replaces every occurence of the entity with either the vector name for the parser or with its statistics value. More...
 
static string createMafDataAccessString (const string &sAccessString, Parser &_parser)
 This function returns the modifier list obtained from the method string. More...
 
static string createEveryDefinition (const string &sLine, Parser &_parser)
 This function creates an every definition from the methods, which the Datafile class is able to parse. More...
 
static string createMafVectorName (string sAccessString)
 This function simply returns the vector name obtained from the MAF method string. More...
 
static vector< mu::value_typeMafDataAccess (MemoryManager &_data, const string &sMafname, const string &sCache, const string &sMafAccess)
 This function simply performs the MAF access and returns the vector of the results. More...
 
static string getMafFromAccessString (const std::string &sAccessString)
 This function returns the name of the MAF. More...
 
static string getMafAccessString (const string &sLine, const string &sEntity)
 This function returns the first MAF access in the passed sLine string. More...
 
static void handleMafDataAccess (string &sLine, const string &sMafAccess, Parser &_parser, MemoryManager &_data)
 This function handles the MAF data access using methods. More...
 
static string getLastToken (const string &sLine)
 This function returns the last token of the current string, e.g. a function name, etc. More...
 
size_t findAssignmentOperator (StringView sCmd)
 
string getDataElements (string &sLine, Parser &_parser, MemoryManager &_data, const Settings &_option, int options)
 Searches the passed string for calls to any table or cluster and replaces them with internal vectors or their respective values. More...
 
void replaceDataEntities (string &sLine, const string &sEntity, MemoryManager &_data, Parser &_parser, const Settings &_option, int options)
 This function replaces all calls to a single data entity with an internal vector or its value, respectively. More...
 
static std::string tableMethod_aliasof (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "aliasof()" table method. More...
 
static std::string tableMethod_convert (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "convert()" table method. More...
 
static std::string tableMethod_typeof (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "typeof()" table method. More...
 
static std::string tableMethod_categories (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "categories()" table method. More...
 
static std::string tableMethod_categorize (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "categorize()" table method. More...
 
static std::string tableMethod_findCols (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "fndcols()" table method. More...
 
static std::string tableMethod_counteq (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "countif()" table method. More...
 
static std::string tableMethod_index (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "index()" table method. More...
 
static std::string tableMethod_cov (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "cov()" table method. More...
 
static std::string tableMethod_pcorr (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "pcorr()" table method. More...
 
static std::string tableMethod_scorr (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "scorr()" table method. More...
 
static std::string tableMethod_zscore (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "zscore()" table method. More...
 
static std::string tableMethod_anova (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "anova()" table method. More...
 
static std::string tableMethod_binsof (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "binsof()" table method. More...
 
static std::string tableMethod_rank (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "rankof()" table method. More...
 
static std::string tableMethod_annotate (const std::string &sTableName, std::string sMethodArguments)
 Realizes the "describe()" method. More...
 
static std::map< std::string, TableMethodgetInplaceTableMethods ()
 Returns the declared list of table methods. More...
 
MemoryextractRange (const std::string &sCmd, DataAccessParser &_accessParser, int nDesiredCols, bool bSort)
 This function extracts a portion of a table and returns it to the calling function. The returned pointer may as well be a nullptr, if the selectd table does not exist. More...
 
DataAccessParser getAccessParserForPlotAndFit (StringView sExpression)
 This function will return the access parser instance for the current expression validate, whether the expression is actual resolveable. More...
 
Indices getIndicesForPlotAndFit (const string &sExpression, string &sDataTable, int &nColumns, bool &openEnd, bool &isCluster)
 This function will calculate the indices from the passed data expression and return them optimized for the plotting and the fitting algorithm. More...
 
bool isNotEmptyExpression (const string &sExpr)
 This function checks, whether the passed expression is non-empty (i.e. it contains more than white spaces). More...
 
bool isClusterCandidate (string &sLine, string &sCluster, bool doCut)
 This function checks, whether the passed command line contains the syntax for a cluster candidate, splits up the command line (if selected using doCut) and declares the new cluster, if it is not known up to now. More...
 
mu::value_type getDataFromObject (const std::string &sObject, long long int i, long long int j, bool isCluster)
 This function returns the data from the selected object and switches automatically between tables and clusters. More...
 
std::vector< mu::value_typegetDataFromObject (const std::string &sObject, const VectorIndex &vRows, long long int j, bool isCluster)
 This function returns the data from the selected object and switches automatically between tables and clusters. More...
 
bool parser_CheckMultArgFunc (const string &sLeft, const string &sRight)
 This function checks, whether the argument located between sLeft and sRight is part of a multi-argument function. More...
 
std::vector< size_t > getDataGridDimensions (const Indices &_idx, const std::string &sTableName)
 Returns the accessed data grid dimensions. More...
 

Typedef Documentation

◆ TableMethod

typedef std::string(* TableMethod) (const std::string &, std::string)

Typedef for a table method.

Definition at line 2039 of file dataaccess.cpp.

Function Documentation

◆ createEveryDefinition()

static string createEveryDefinition ( const string &  sLine,
Parser _parser 
)
static

This function creates an every definition from the methods, which the Datafile class is able to parse.

Parameters
sLineconst string&
_parserParser&
Returns
string

Definition at line 1203 of file dataaccess.cpp.

References getDataElements(), NumeReKernel::getInstance(), and getMatchingParenthesis().

Referenced by createMafDataAccessString().

Here is the call graph for this function:

◆ createMafDataAccessString()

static string createMafDataAccessString ( const string &  sAccessString,
Parser _parser 
)
static

This function returns the modifier list obtained from the method string.

Parameters
sAccessStringconst string&
_parserParser&
Returns
string

Pass 'DATA().FNC().cols().rows().grid().every(a,b)'

Definition at line 1014 of file dataaccess.cpp.

References createEveryDefinition().

Referenced by handleCachedDataAccess(), and handleMafDataAccess().

Here is the call graph for this function:

◆ createMafVectorName()

static string createMafVectorName ( string  sAccessString)
static

This function simply returns the vector name obtained from the MAF method string.

Parameters
sAccessStringstring
Returns
string

Definition at line 2083 of file dataaccess.cpp.

References MemoryManager::getComment(), getInplaceTableMethods(), NumeReKernel::getInstance(), getMatchingParenthesis(), NumeReKernel::getMemoryManager(), and replaceToVectorname().

Referenced by handleMafDataAccess().

Here is the call graph for this function:

◆ extractRange()

Memory * extractRange ( const std::string &  sCmd,
DataAccessParser _accessParser,
int  nDesiredCols,
bool  bSort 
)

This function extracts a portion of a table and returns it to the calling function. The returned pointer may as well be a nullptr, if the selectd table does not exist.

Parameters
sCmdconst std::string&
_accessParserDataAccessParser&
nDesiredColsint
bSortbool
Returns
Memory*

Definition at line 2161 of file dataaccess.cpp.

References Indices::col, DataAccessParser::evalIndices(), Memory::extractRange(), VectorIndex::front(), Memory::getCols(), DataAccessParser::getDataObject(), DataAccessParser::getIndices(), NumeReKernel::getInstance(), Memory::getLines(), NumeReKernel::getMemoryManager(), MemoryManager::getTable(), VectorIndex::isOpenEnd(), isValidIndexSet(), VectorIndex::last(), VectorIndex::numberOfNodes(), Indices::row, VectorIndex::setRange(), Memory::sortElements(), and SyntaxError::TABLE_DOESNT_EXIST.

Referenced by analyzePulse(), boneDetection(), calculateSplines(), fastFourierTransform(), fastWaveletTransform(), and regularizeDataSet().

Here is the call graph for this function:

◆ findAssignmentOperator()

size_t findAssignmentOperator ( StringView  sCmd)

Definition at line 242 of file dataaccess.cpp.

References StringViewBase::find().

Referenced by getDataElements(), and isClusterCandidate().

Here is the call graph for this function:

◆ getAccessParserForPlotAndFit()

DataAccessParser getAccessParserForPlotAndFit ( StringView  sExpression)

This function will return the access parser instance for the current expression validate, whether the expression is actual resolveable.

Parameters
sExpressionStringView
Returns
DataAccessParser

Definition at line 2205 of file dataaccess.cpp.

References Indices::col, DataAccessParser::getDataObject(), DataAccessParser::getIndices(), SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, isValidIndexSet(), Indices::row, SyntaxError::TABLE_DOESNT_EXIST, VectorIndex::to_string(), and StringViewBase::to_string().

Referenced by Plot::extractDataValues(), and getIndicesForPlotAndFit().

Here is the call graph for this function:

◆ getDataElements()

string getDataElements ( string &  sLine,
Parser _parser,
MemoryManager _data,
const Settings _option,
int  options 
)

Searches the passed string for calls to any table or cluster and replaces them with internal vectors or their respective values.

Parameters
sLinestring&
_parserParser&
_dataDatafile&
_optionconst Settings&
optionsint
Returns
string

This function actually delegates the hard work to replaceDataEntities(), which is itself public and replaces all calls to a single data entity.

Definition at line 276 of file dataaccess.cpp.

References MemoryManager::containsTablesOrClusters(), MemoryManager::copyTable(), mu::ParserBase::CreateTempVectorVar(), findAssignmentOperator(), mu::ParserBase::GetCachedEquation(), MemoryManager::getCols(), MemoryManager::getLines(), handleCachedDataAccess(), mu::ParserBase::HasCachedAccess(), SyntaxError::invalid_position, isClusterCandidate(), mu::ParserBase::IsCompiling(), MemoryManager::isTable(), resolveTablesAndClusters(), StripSpaces(), SyntaxError::UNMATCHED_PARENTHESIS, and validateParenthesisNumber().

Referenced by NumeRe::StringFuncHandler::applySpecialStringFuncs(), NumeRe::StringFuncHandler::argumentParser(), FlowCtrl::calc(), FlowCtrl::compile(), Plot::constructDataLegendElement(), Plot::createDataLegends(), createEveryDefinition(), ProcedureVarFactory::createLocalClusters(), ProcedureVarFactory::createLocalInlineVars(), ProcedureVarFactory::createLocalStrings(), ProcedureVarFactory::createLocalTables(), ProcedureVarFactory::createLocalVars(), createMatFromLines(), createMatFromLinesFilled(), differentiate(), FlowCtrl::evalHeader(), evalPoints(), FlowCtrl::evalRangeBasedHeader(), evaluateExpression(), evaluateFittingParams(), evaluateNumerical(), evaluateParameterValues(), ProcedureVarFactory::evaluateProcedureArguments(), Plot::evaluateSubplot(), extractFirstParameterStringValue(), findExtrema(), findZeroes(), CommandLineParser::getExprAsFileName(), CommandLineParser::getExprAsMathExpression(), CommandLineParser::getFileParameterValue(), getIndices(), getWindow(), handleCachedDataAccess(), NumeReKernel::MainLoop(), parseArg(), CommandLineParser::parseExprAsNumericalValues(), Procedure::ProcCalc(), readAndParseIntervals(), Interval::refresh(), NumeRe::StringParser::replaceDataOccurence(), replaceEntityOccurence(), Odesolver::solve(), tableMethod_aliasof(), tableMethod_annotate(), tableMethod_anova(), tableMethod_binsof(), tableMethod_categories(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_cov(), tableMethod_findCols(), tableMethod_index(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_typeof(), and tableMethod_zscore().

Here is the call graph for this function:

◆ getDataFromObject() [1/2]

std::vector< mu::value_type > getDataFromObject ( const std::string &  sObject,
const VectorIndex vRows,
long long int  j,
bool  isCluster 
)

This function returns the data from the selected object and switches automatically between tables and clusters.

Parameters
sObjectconst std::string&
vRowsconst VectorIndex&
jlong longint
isClusterbool
Returns
std::vector<mu::value_type>

Definition at line 2405 of file dataaccess.cpp.

References VectorIndex::front(), NumeRe::ClusterManager::getCluster(), NumeRe::Cluster::getDouble(), MemoryManager::getElement(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), VectorIndex::INVALID, NumeRe::Cluster::push_back(), and VectorIndex::size().

Here is the call graph for this function:

◆ getDataFromObject() [2/2]

mu::value_type getDataFromObject ( const std::string &  sObject,
long long int  i,
long long int  j,
bool  isCluster 
)

This function returns the data from the selected object and switches automatically between tables and clusters.

Parameters
sObjectconst std::string&
ilong longint
jlong longint
isClusterbool
Returns
mu::value_type

Definition at line 2378 of file dataaccess.cpp.

References NumeRe::ClusterManager::getCluster(), NumeRe::Cluster::getDouble(), MemoryManager::getElement(), NumeReKernel::getInstance(), and NumeReKernel::getMemoryManager().

Referenced by Plot::extractDataValues(), and getDataForFit().

Here is the call graph for this function:

◆ getDataGridDimensions()

std::vector< size_t > getDataGridDimensions ( const Indices _idx,
const std::string &  sTableName 
)

Returns the accessed data grid dimensions.

Parameters
_idxconst Indices&
sTableNameconst std::string&
Returns
std::vector<size_t>

Definition at line 2519 of file dataaccess.cpp.

References MemoryManager::cnt(), Indices::col, NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), MemoryManager::isTable(), Indices::row, and VectorIndex::subidx().

Referenced by DataAccessParser::getDataGridDimensions().

Here is the call graph for this function:

◆ getIndicesForPlotAndFit()

Indices getIndicesForPlotAndFit ( const string &  sExpression,
string &  sDataTable,
int &  nColumns,
bool &  openEnd,
bool &  isCluster 
)

This function will calculate the indices from the passed data expression and return them optimized for the plotting and the fitting algorithm.

Parameters
sExpressionconst string&
sDataTablestring&
nColumnsint&
openEndbool&
isClusterbool&
Returns
Indices

Definition at line 2234 of file dataaccess.cpp.

References Indices::col, getAccessParserForPlotAndFit(), DataAccessParser::getDataObject(), DataAccessParser::getIndices(), DataAccessParser::isCluster(), VectorIndex::isOpenEnd(), and VectorIndex::numberOfNodes().

Referenced by getDataForFit().

Here is the call graph for this function:

◆ getInplaceTableMethods()

static std::map< std::string, TableMethod > getInplaceTableMethods ( )
static

Returns the declared list of table methods.

Returns
std::map<std::string, TableMethod>

Definition at line 2049 of file dataaccess.cpp.

References tableMethod_aliasof(), tableMethod_annotate(), tableMethod_anova(), tableMethod_binsof(), tableMethod_categories(), tableMethod_categorize(), tableMethod_convert(), tableMethod_counteq(), tableMethod_cov(), tableMethod_findCols(), tableMethod_index(), tableMethod_pcorr(), tableMethod_rank(), tableMethod_scorr(), tableMethod_typeof(), and tableMethod_zscore().

Referenced by createMafVectorName().

Here is the call graph for this function:

◆ getLastToken()

static string getLastToken ( const string &  sLine)
static

This function returns the last token of the current string, e.g. a function name, etc.

Parameters
sLineconst string&
Returns
string

Definition at line 2122 of file dataaccess.cpp.

References StripSpaces().

Referenced by parser_CheckMultArgFunc(), and replaceEntityOccurence().

Here is the call graph for this function:

◆ getMafAccessString()

static string getMafAccessString ( const string &  sLine,
const string &  sEntity 
)
static

This function returns the first MAF access in the passed sLine string.

Parameters
sLineconst string&
sEntityconst string&
Returns
string

Definition at line 1092 of file dataaccess.cpp.

References getMatchingParenthesis().

Referenced by replaceDataEntities().

Here is the call graph for this function:

◆ getMafFromAccessString()

static std::string getMafFromAccessString ( const std::string &  sAccessString)
static

This function returns the name of the MAF.

Parameters
sAccessStringconst std::string&
Returns
std::string

Definition at line 1045 of file dataaccess.cpp.

References isDelimiter().

Referenced by handleCachedDataAccess(), and handleMafDataAccess().

Here is the call graph for this function:

◆ handleCachedDataAccess()

static const string handleCachedDataAccess ( string &  sLine,
Parser _parser,
MemoryManager _data,
const Settings _option 
)
static

◆ handleMafDataAccess()

static void handleMafDataAccess ( string &  sLine,
const string &  sMafAccess,
Parser _parser,
MemoryManager _data 
)
static

This function handles the MAF data access using methods.

Parameters
sLinestring&
sMafAccessconst string&
_parserParser&
_dataDatafile&
Returns
void

Definition at line 953 of file dataaccess.cpp.

References mu::ParserBase::CacheCurrentAccess(), mu::ParserBase::ContainsVectorVars(), createMafDataAccessString(), createMafVectorName(), NumeRe::StringVarFactory::createTempStringVectorVar(), getAllArguments(), NumeReKernel::getInstance(), getMafFromAccessString(), NumeReKernel::getStringParser(), mu::CachedDataAccess::IS_TABLE_METHOD, isInQuotes(), MafDataAccess(), and mu::ParserBase::SetVectorVar().

Referenced by replaceDataEntities().

Here is the call graph for this function:

◆ isClusterCandidate()

bool isClusterCandidate ( string &  sLine,
string &  sCluster,
bool  doCut 
)

This function checks, whether the passed command line contains the syntax for a cluster candidate, splits up the command line (if selected using doCut) and declares the new cluster, if it is not known up to now.

Parameters
sLinestring&
sClusterstring&
doCutbool
Returns
bool

Definition at line 2296 of file dataaccess.cpp.

References findAssignmentOperator(), NumeReKernel::getInstance(), getMatchingParenthesis(), NumeReKernel::getMemoryManager(), NumeRe::ClusterManager::isCluster(), NumeRe::ClusterManager::newCluster(), and StripSpaces().

Referenced by FlowCtrl::calc(), FlowCtrl::compile(), getDataElements(), NumeReKernel::MainLoop(), and Procedure::ProcCalc().

Here is the call graph for this function:

◆ isNotEmptyExpression()

bool isNotEmptyExpression ( const string &  sExpr)

This function checks, whether the passed expression is non-empty (i.e. it contains more than white spaces).

Parameters
sExprconst string&
Returns
bool

Definition at line 2275 of file dataaccess.cpp.

Referenced by FlowCtrl::checkFlowControlArgument(), cmd_plotting(), Plot::createSubPlotSet(), differentiate(), evalPoints(), findExtrema(), findZeroes(), readAndParseIntervals(), and readAndParseLegacyIntervals().

◆ MafDataAccess()

static vector< mu::value_type > MafDataAccess ( MemoryManager _data,
const string &  sMafname,
const string &  sCache,
const string &  sMafAccess 
)
static

This function simply performs the MAF access and returns the vector of the results.

Parameters
_dataDatafile&
sMafnameconst string&
sCacheconst string&
sMafAccessconst string&
Returns
vector<mu::value_type>

Definition at line 1132 of file dataaccess.cpp.

References MemoryManager::and_func(), MemoryManager::avg(), MemoryManager::cnt(), MemoryManager::max(), MemoryManager::maxpos(), MemoryManager::med(), MemoryManager::min(), MemoryManager::minpos(), MemoryManager::norm(), MemoryManager::num(), MemoryManager::or_func(), MemoryManager::prd(), MemoryManager::size(), MemoryManager::std(), MemoryManager::sum(), and MemoryManager::xor_func().

Referenced by handleCachedDataAccess(), and handleMafDataAccess().

Here is the call graph for this function:

◆ parser_CheckMultArgFunc()

bool parser_CheckMultArgFunc ( const string &  sLeft,
const string &  sRight 
)

This function checks, whether the argument located between sLeft and sRight is part of a multi-argument function.

Parameters
sLeftconst string&
sRightconst string&
Returns
bool

Definition at line 2443 of file dataaccess.cpp.

References getLastToken().

Referenced by convertVectorToExpression(), NumeRe::StringParser::getDataForString(), and NumeRe::StringParser::replaceDataOccurence().

Here is the call graph for this function:

◆ replaceDataEntities()

void replaceDataEntities ( string &  sLine,
const string &  sEntity,
MemoryManager _data,
Parser _parser,
const Settings _option,
int  options 
)

This function replaces all calls to a single data entity with an internal vector or its value, respectively.

Parameters
sLinestring&
sEntityconst string&
_dataDatafile&
_parserParser&
_optionconst Settings&
optionsint
Returns
void

Because this function calls the index parser, it will automatically resolve all nested calls to any data entity included in the current call to the specified data entity.

Definition at line 436 of file dataaccess.cpp.

References mu::ParserBase::CacheCurrentAccess(), Indices::col, NumeRe::StringVarFactory::createTempStringVectorVar(), mu::ParserBase::DisableAccessCaching(), VectorIndex::front(), NumeRe::ClusterManager::getCluster(), MemoryManager::getColElements(), MemoryManager::getCols(), NumeRe::FileAdapter::getDataFileName(), NumeRe::Cluster::getDouble(), MemoryManager::getElement(), MemoryManager::getElementAsString(), MemoryManager::getElementMixed(), MemoryManager::getHeadLineElement(), getIndices(), NumeReKernel::getInstance(), getMafAccessString(), getMatchingParenthesis(), NumeRe::Cluster::getParserString(), NumeReKernel::getStringParser(), MemoryManager::getType(), NumeRe::Cluster::getType(), handleMafDataAccess(), INSERT_STRINGS, SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, mu::CachedDataAccess::IS_CLUSTER, isDelimiter(), NumeRe::Cluster::isDouble(), isInQuotes(), VectorIndex::isOpenEnd(), VectorIndex::isString(), isValidIndexSet(), NumeRe::ClusterItem::ITEMTYPE_DOUBLE, mu::CachedDataAccess::NO_FLAG, SyntaxError::NO_MATRIX, NumeRe::Cluster::push_back(), replaceEntityOccurence(), replaceEntityStringOccurence(), replaceToVectorname(), Indices::row, Indices::sCompiledAccessEquation, VectorIndex::setRange(), mu::ParserBase::SetVectorVar(), NumeRe::Cluster::size(), VectorIndex::size(), TableColumn::STRINGLIKE, VectorIndex::subidx(), VectorIndex::to_string(), and toCmdString().

Referenced by NumeRe::StringParser::replaceDataOccurence(), and resolveTablesAndClusters().

Here is the call graph for this function:

◆ replaceEntityOccurence()

static void replaceEntityOccurence ( string &  sLine,
const string &  sEntityOccurence,
const string &  sEntityName,
const string &  sEntityReplacement,
const Indices _idx,
MemoryManager _data,
Parser _parser,
const Settings _option,
bool  isCluster 
)
static

This function replaces every occurence of the entity with either the vector name for the parser or with its statistics value.

Parameters
sLinestring&
sEntityOccurenceconst string&
sEntityNameconst string&
sEntityReplacementconst string&
_idxconst Indices&
_dataDatafile&
_parserParser&
_optionconst Settings&
isClusterbool
Returns
void

Definition at line 765 of file dataaccess.cpp.

References MemoryManager::and_func(), NumeRe::Cluster::and_func(), MemoryManager::avg(), NumeRe::Cluster::avg(), MemoryManager::cmp(), NumeRe::Cluster::cmp(), MemoryManager::cnt(), NumeRe::Cluster::cnt(), Indices::col, MemoryManager::containsTablesOrClusters(), mu::ParserBase::DisableAccessCaching(), mu::ParserBase::Eval(), NumeRe::ClusterManager::getCluster(), getDataElements(), getLastToken(), getMatchingParenthesis(), getNextArgument(), intCast(), MemoryManager::max(), NumeRe::Cluster::max(), MemoryManager::med(), NumeRe::Cluster::med(), MemoryManager::min(), NumeRe::Cluster::min(), MemoryManager::norm(), NumeRe::Cluster::norm(), MemoryManager::num(), NumeRe::Cluster::num(), MemoryManager::or_func(), NumeRe::Cluster::or_func(), MemoryManager::pct(), NumeRe::Cluster::pct(), MemoryManager::prd(), NumeRe::Cluster::prd(), Indices::row, mu::ParserBase::SetExpr(), MemoryManager::std(), NumeRe::Cluster::std(), MemoryManager::sum(), NumeRe::Cluster::sum(), toCmdString(), MemoryManager::xor_func(), and NumeRe::Cluster::xor_func().

Referenced by replaceDataEntities().

Here is the call graph for this function:

◆ replaceEntityStringOccurence()

static void replaceEntityStringOccurence ( string &  sLine,
const string &  sEntityOccurence,
const string &  sEntityStringReplacement 
)
static

This function simply replaces every occurences of the entity with its replacement.

Parameters
sLinestring&
sEntityOccurenceconst string&
sEntityStringReplacementconst string&
Returns
void

Definition at line 738 of file dataaccess.cpp.

Referenced by replaceDataEntities().

◆ resolveTablesAndClusters()

static void resolveTablesAndClusters ( string &  sLine,
Parser _parser,
MemoryManager _data,
const Settings _option,
int  options 
)
static

Resolves every call to a cluster or a table.

Parameters
sLinestring&
_parserParser&
_dataDatafile&
_optionconst Settings&
optionsint
Returns
void

Definition at line 394 of file dataaccess.cpp.

References NumeRe::ClusterManager::containsClusters(), MemoryManager::containsTables(), NumeRe::ClusterManager::getClusterMap(), MemoryManager::getTableMap(), and replaceDataEntities().

Referenced by getDataElements().

Here is the call graph for this function:

◆ tableMethod_aliasof()

static std::string tableMethod_aliasof ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "aliasof()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1223 of file dataaccess.cpp.

References MemoryManager::addReference(), NumeRe::StringParser::evalAndFormat(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getStringParser(), and NumeRe::StringParser::STRING_NUMERICAL.

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_annotate()

static std::string tableMethod_annotate ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "describe()" method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 2013 of file dataaccess.cpp.

References NumeRe::StringParser::evalAndFormat(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getStringParser(), NumeRe::StringParser::STRING_NUMERICAL, and MemoryManager::writeComment().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_anova()

static std::string tableMethod_anova ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "anova()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1832 of file dataaccess.cpp.

References mu::ParserBase::Eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), MemoryManager::getOneWayAnova(), NumeReKernel::getParser(), NumeReKernel::getSettings(), intCast(), AnovaResult::m_FRatio, AnovaResult::m_isSignificant, AnovaResult::m_numCategories, AnovaResult::m_significance, AnovaResult::m_significanceVal, VectorIndex::OPEN_END, mu::ParserBase::SetExpr(), SyntaxError::TOO_FEW_COLS, toString(), and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_binsof()

static std::string tableMethod_binsof ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "binsof()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1906 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), mu::ParserBase::Eval(), MemoryManager::getBins(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getSettings(), intCast(), mu::ParserBase::SetExpr(), and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_categories()

static std::string tableMethod_categories ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "categories()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1339 of file dataaccess.cpp.

References mu::ParserBase::Eval(), MemoryManager::getCategoryList(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getParser(), mu::ParserBase::SetExpr(), and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_categorize()

static std::string tableMethod_categorize ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "categorize()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1380 of file dataaccess.cpp.

References mu::ParserBase::Eval(), NumeRe::StringParser::evalAndFormat(), NumeReKernel::getAns(), MemoryManager::getCategoryList(), getDataElements(), NumeReKernel::getInstance(), NumeRe::Cluster::getInternalStringArray(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getStringParser(), mu::ParserBase::SetExpr(), NumeRe::StringParser::STRING_NUMERICAL, and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_convert()

static std::string tableMethod_convert ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "convert()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1254 of file dataaccess.cpp.

References mu::ParserBase::Eval(), NumeRe::StringParser::evalAndFormat(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getStringParser(), mu::ParserBase::SetExpr(), NumeRe::StringParser::STRING_NUMERICAL, and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_counteq()

static std::string tableMethod_counteq ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

◆ tableMethod_cov()

static std::string tableMethod_cov ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "cov()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1599 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), mu::ParserBase::Eval(), MemoryManager::getCovariance(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getSettings(), intCast(), VectorIndex::OPEN_END, mu::ParserBase::SetExpr(), SyntaxError::TOO_FEW_COLS, and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_findCols()

static std::string tableMethod_findCols ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "fndcols()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1440 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), NumeRe::StringParser::evalAndFormat(), MemoryManager::findCols(), NumeReKernel::getAns(), getDataElements(), NumeReKernel::getInstance(), NumeRe::Cluster::getInternalStringArray(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getStringParser(), and NumeRe::StringParser::STRING_NUMERICAL.

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_index()

static std::string tableMethod_index ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "index()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1539 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), mu::ParserBase::Eval(), NumeRe::StringParser::evalAndFormat(), NumeReKernel::getAns(), getDataElements(), MemoryManager::getIndex(), NumeReKernel::getInstance(), NumeRe::Cluster::getInternalStringArray(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getSettings(), NumeReKernel::getStringParser(), intCast(), NumeRe::StringParser::isStringExpression(), mu::ParserBase::SetExpr(), and NumeRe::StringParser::STRING_NUMERICAL.

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_pcorr()

static std::string tableMethod_pcorr ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "pcorr()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1661 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), mu::ParserBase::Eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), MemoryManager::getPearsonCorr(), NumeReKernel::getSettings(), intCast(), VectorIndex::OPEN_END, mu::ParserBase::SetExpr(), SyntaxError::TOO_FEW_COLS, and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_rank()

static std::string tableMethod_rank ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

◆ tableMethod_scorr()

static std::string tableMethod_scorr ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "scorr()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1723 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), mu::ParserBase::Eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getSettings(), MemoryManager::getSpearmanCorr(), intCast(), VectorIndex::OPEN_END, mu::ParserBase::SetExpr(), SyntaxError::TOO_FEW_COLS, and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_typeof()

static std::string tableMethod_typeof ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "typeof()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1294 of file dataaccess.cpp.

References mu::ParserBase::Eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), NumeReKernel::getParser(), MemoryManager::getType(), intCast(), mu::ParserBase::SetExpr(), TableColumn::typeToString(), and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function:

◆ tableMethod_zscore()

static std::string tableMethod_zscore ( const std::string &  sTableName,
std::string  sMethodArguments 
)
static

Realizes the "zscore()" table method.

Parameters
sTableNameconst std::string&
sMethodArgumentsstd::string
Returns
std::string

Definition at line 1785 of file dataaccess.cpp.

References mu::ParserBase::CreateTempVectorVar(), mu::ParserBase::Eval(), getDataElements(), NumeReKernel::getInstance(), NumeReKernel::getMemoryManager(), getNextArgument(), NumeReKernel::getParser(), NumeReKernel::getSettings(), MemoryManager::getZScore(), intCast(), VectorIndex::OPEN_END, mu::ParserBase::SetExpr(), and MemoryManager::updateDimensionVariables().

Referenced by getInplaceTableMethods().

Here is the call graph for this function: