NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include "dataaccess.hpp"
#include "../utils/tools.hpp"
#include "../../kernel.hpp"
#include <vector>
Go to the source code of this file.
Functions | |
static void | handleArgumentForIndices (Indices &_idx, Parser &_parser, MemoryManager &_data, StringView sArgument, StringView sCmd) |
This static function is the main driver function for extracting the indices into VectorIndex representations. More... | |
static void | extractIndexList (StringView sCols, vector< StringView > &vLines, vector< StringView > &vCols) |
This static function separates the argument into its row and column parts and returns them as vectors of StringView instances. More... | |
static void | handleIndexVectors (Parser &_parser, VectorIndex &_vIdx, StringView sIndex) |
This static function will evaluate the indices and it tries to match it to a vector. More... | |
static void | handleCasualIndices (Parser &_parser, Indices &_idx, vector< StringView > &vLines, vector< StringView > &vCols, StringView sCmd) |
This function will evaluate all indices, which are interpreted as casual indices, at once and store them into the Indices object. More... | |
static void | handleSingleCasualIndex (VectorIndex &_vIdx, vector< StringView > &vIndex, string &sIndexExpressions, vector< int > &vIndexNumbers, int sign) |
This static function is a helper function for handleCasualIndices(), which will be applied to row and column indices separately. More... | |
static void | expandIndexVectors (Indices &_idx, MemoryManager &_data, StringView sCmd) |
This function will expand casual indices into vectors. Actually, it is only used for the special case of a string vector. More... | |
static void | expandStringIndexVectors (Indices &_idx, MemoryManager &_data) |
This static function expands the indices into vectors, if the current object is the string object. More... | |
Indices | getIndices (StringView sCmd, Parser &_parser, MemoryManager &_data, const Settings &_option) |
Wrapper for the new getIndices function interface. More... | |
void | getIndices (StringView sCmd, Indices &_idx, Parser &_parser, MemoryManager &_data, const Settings &_option) |
The new interface function to determine the used indices in the current expression part. More... | |
static std::string | convertToString (value_type *v, const vector< int > vIndexNumbers) |
This static function is a simple helper to convert the numerical results into a string, representing a parsed index expression. This function is used in case of an exception. More... | |
|
static |
This static function is a simple helper to convert the numerical results into a string, representing a parsed index expression. This function is used in case of an exception.
v | value_type* |
vIndexNumbers | const vector<int> |
Definition at line 369 of file indices.cpp.
References toString().
Referenced by handleCasualIndices().
|
static |
This function will expand casual indices into vectors. Actually, it is only used for the special case of a string vector.
_idx | Indices& |
_data | MemoryManager& |
sCmd | StringView |
Definition at line 475 of file indices.cpp.
References Indices::col, expandStringIndexVectors(), StringViewBase::find_first_of(), SyntaxError::INVALID_DATA_ACCESS, SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, MemoryManager::isTable(), VectorIndex::isValid(), StringViewBase::length(), Indices::row, StringViewBase::strip(), StringView::subview(), VectorIndex::to_string(), and StringViewBase::to_string().
Referenced by handleArgumentForIndices().
|
static |
This static function expands the indices into vectors, if the current object is the string object.
_idx | Indices& |
_data | MemoryManager& |
Definition at line 516 of file indices.cpp.
References Indices::col, StringMemory::getStringCols(), StringMemory::getStringElements(), VectorIndex::isOpenEnd(), Indices::row, and VectorIndex::setRange().
Referenced by expandIndexVectors().
|
static |
This static function separates the argument into its row and column parts and returns them as vectors of StringView instances.
sCols | StringView |
vLines | vector<StringView>& |
vCols | vector<StringView>& |
Definition at line 236 of file indices.cpp.
References StringViewBase::back(), getNextViewedArgument(), getNextViewedIndex(), StringViewBase::length(), and StringViewBase::strip().
Referenced by handleArgumentForIndices().
void getIndices | ( | StringView | sCmd, |
Indices & | _idx, | ||
Parser & | _parser, | ||
MemoryManager & | _data, | ||
const Settings & | _option | ||
) |
The new interface function to determine the used indices in the current expression part.
sCmd | StringView |
_idx | Indices& |
_parser | Parser& |
_data | MemoryManager& |
_option | const Settings& |
Definition at line 70 of file indices.cpp.
References StringViewBase::begin(), Indices::col, MemoryManager::containsTablesOrClusters(), DetachedLogger::debug(), StringViewBase::end(), NumeRe::StringParser::evalAndFormat(), StringViewBase::find_first_of(), g_logger, getAllArguments(), getDataElements(), NumeReKernel::getInstance(), getMatchingParenthesis(), NumeReKernel::getStringParser(), handleArgumentForIndices(), StringViewBase::length(), VectorIndex::OPEN_END, Indices::row, Indices::sCompiledAccessEquation, StringViewBase::strip(), StringView::subview(), StringViewBase::trim_front(), NumeRe::ClusterManager::updateClusterSizeVariables(), and MemoryManager::updateDimensionVariables().
Indices getIndices | ( | StringView | sCmd, |
Parser & | _parser, | ||
MemoryManager & | _data, | ||
const Settings & | _option | ||
) |
Wrapper for the new getIndices function interface.
sCmd | StringView |
_parser | Parser& |
_data | MemoryManager& |
_option | const Settings& |
Definition at line 49 of file indices.cpp.
References getIndices().
Referenced by FlowCtrl::calc(), FlowCtrl::compile(), evaluateFittingParams(), evaluateTargetOptionInCommand(), NumeRe::StringParser::getDataForString(), getIndices(), handleCachedDataAccess(), NumeReKernel::MainLoop(), Procedure::ProcCalc(), replaceDataEntities(), searchAndDeleteCluster(), searchAndDeleteTable(), Odesolver::solve(), and NumeRe::StringParser::storeStringToStringObject().
|
static |
This static function is the main driver function for extracting the indices into VectorIndex representations.
_idx | Indices& |
_parser | Parser& |
_data | MemoryManager& |
sArgument | StringView |
sCmd | StringView |
Definition at line 182 of file indices.cpp.
References Indices::col, expandIndexVectors(), extractIndexList(), VectorIndex::front(), handleCasualIndices(), handleIndexVectors(), VectorIndex::numberOfNodes(), and Indices::row.
Referenced by getIndices().
|
static |
This function will evaluate all indices, which are interpreted as casual indices, at once and store them into the Indices object.
_parser | Parser& |
_idx | Indices& |
vLines | vector<StringView>& |
vCols | vector<StringView>& |
sCmd | StringView |
Definition at line 404 of file indices.cpp.
References date::abs(), Indices::col, convertToString(), mu::ParserBase::Eval(), handleSingleCasualIndex(), intCast(), SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, mu::isinf(), mu::isnan(), VectorIndex::isValid(), mu::real(), Indices::row, mu::ParserBase::SetExpr(), VectorIndex::setIndex(), VectorIndex::to_string(), and StringViewBase::to_string().
Referenced by handleArgumentForIndices().
|
static |
This static function will evaluate the indices and it tries to match it to a vector.
_parser | Parser& |
_vIdx | VectorIndex& |
sIndex | StringView |
Definition at line 290 of file indices.cpp.
References mu::ParserBase::Eval(), VectorIndex::front(), intCast(), mu::isnan(), StringViewBase::length(), mu::real(), mu::ParserBase::SetExpr(), and VectorIndex::STRING.
Referenced by handleArgumentForIndices().
|
static |
This static function is a helper function for handleCasualIndices(), which will be applied to row and column indices separately.
_vIdx | VectorIndex& |
vIndex | vector<StringView>& |
sIndexExpressions | string& |
vIndexNumbers | vector<int>& |
sign | int |
Definition at line 329 of file indices.cpp.
References VectorIndex::front(), VectorIndex::OPEN_END, VectorIndex::setIndex(), and VectorIndex::STRING.
Referenced by handleCasualIndices().