NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <string>
#include <vector>
#include "../ParserLib/muParser.h"
#include "../datamanagement/memorymanager.hpp"
#include "define.hpp"
#include "../settings.hpp"
#include "matdatastructures.hpp"
Go to the source code of this file.
Functions | |
bool | performMatrixOperation (std::string &sCmd, mu::Parser &_parser, MemoryManager &_data, FunctionDefinitionManager &_functions, const Settings &_option) |
This function is the main interface to the matrix operations. More... | |
Matrix | createZeroesMatrix (unsigned int nLines, unsigned int nCols) |
This function returns a matrix filled with zeros with the defined lines and columns. More... | |
Matrix | transposeMatrix (const Matrix &_mMatrix) |
This static function will transpose the passed matrix (exchange rows with columns). More... | |
Indices | getIndices (const std::string &sCmd, const Matrix &_mMatrix, mu::Parser &_parser, MemoryManager &_data, const Settings &_option) |
This function creates an Indices object, which is filled with the indices specified by the index equation. More... | |
void | showMatrix (const std::vector< std::vector< mu::value_type > > &) |
Simple wrapper for the function parser_ShowMatrixResult() to be accessible from the outside. More... | |
Matrix createZeroesMatrix | ( | unsigned int | nLines, |
unsigned int | nCols | ||
) |
This function returns a matrix filled with zeros with the defined lines and columns.
nLines | unsigned int |
nCols | unsigned int |
This function is not static, because it is used from somewhere else.
Definition at line 951 of file matrixoperations.cpp.
References createFilledMatrix(), SyntaxError::invalid_position, and SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE.
Referenced by evalMatOp(), and getMatrixElements().
Indices getIndices | ( | const string & | sCmd, |
const Matrix & | _mMatrix, | ||
Parser & | _parser, | ||
MemoryManager & | _data, | ||
const Settings & | _option | ||
) |
This function creates an Indices object, which is filled with the indices specified by the index equation.
sCmd | const string& |
_mMatrix | const Matrix& |
_parser | Parser& |
_data | Datafile& |
_option | const Settings& |
Definition at line 1337 of file matrixoperations.cpp.
References VectorIndex::back(), Indices::col, Matrix::cols(), MemoryManager::containsTablesOrClusters(), mu::ParserBase::Eval(), VectorIndex::front(), getDataElements(), intCast(), SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, mu::isinf(), mu::isnan(), Indices::row, Matrix::rows(), mu::ParserBase::SetExpr(), VectorIndex::setIndex(), and StripSpaces().
Referenced by getIndicesForMatrix(), getMatrixElements(), and performMatrixOperation().
bool performMatrixOperation | ( | string & | sCmd, |
Parser & | _parser, | ||
MemoryManager & | _data, | ||
FunctionDefinitionManager & | _functions, | ||
const Settings & | _option | ||
) |
This function is the main interface to the matrix operations.
sCmd | string& |
_parser | Parser& |
_data | Datafile& |
_functions | Define& |
_option | const Settings& |
Definition at line 86 of file matrixoperations.cpp.
References _assertionHandler, MemoryManager::addTable(), FunctionDefinitionManager::call(), Assertion::checkAssertion(), NumeRe::Cluster::clear(), Indices::col, Matrix::cols(), containsMatrices(), DetachedLogger::debug(), MemoryManager::deleteBulk(), evalMatOp(), evalRecursiveExpressions(), findCommand(), VectorIndex::front(), SyntaxError::FUNCTION_ERROR, g_logger, NumeRe::ClusterManager::getCluster(), MemoryManager::getCols(), getIndices(), MemoryManager::getLines(), MemoryManager::getTable(), VectorIndex::INVALID, SyntaxError::INVALID_DATA_ACCESS, SyntaxError::INVALID_INDEX, SyntaxError::invalid_position, NumeRe::ClusterManager::isCluster(), Matrix::isEmpty(), MemoryManager::isTable(), isValidIndexSet(), Memory::markModified(), VectorIndex::max(), NumeRe::ClusterManager::newCluster(), SyntaxError::NO_MATRIX_FOR_MATOP, VectorIndex::OPEN_END, MemoryManager::resizeTable(), Indices::row, Matrix::rows(), NumeRe::Cluster::setDouble(), showMatrixResult(), StripSpaces(), VectorIndex::subidx(), VectorIndex::to_string(), Memory::writeData(), and Memory::writeDataDirectUnsafe().
Referenced by cmd_matop().
void showMatrix | ( | const vector< vector< mu::value_type > > & | _mMatrix | ) |
Simple wrapper for the function parser_ShowMatrixResult() to be accessible from the outside.
_mMatrix | const vector<vector<mu::value_type>>& |
Definition at line 1524 of file matrixoperations.cpp.
References NumeReKernel::getInstance(), and showMatrixResult().
This static function will transpose the passed matrix (exchange rows with columns).
_mMatrix | const Matrix& |
Definition at line 934 of file matrixoperations.cpp.
References SyntaxError::invalid_position, and transposeMatrix().
Referenced by createMatFromCols(), createMatFromColsFilled(), and transposeMatrix().