NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
matrixoperations.hpp File Reference
#include <string>
#include <vector>
#include "../ParserLib/muParser.h"
#include "../datamanagement/memorymanager.hpp"
#include "define.hpp"
#include "../settings.hpp"
#include "matdatastructures.hpp"
Include dependency graph for matrixoperations.hpp:
This graph shows which files directly or indirectly include this file:

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...
 

Function Documentation

◆ createZeroesMatrix()

Matrix createZeroesMatrix ( unsigned int  nLines,
unsigned int  nCols 
)

This function returns a matrix filled with zeros with the defined lines and columns.

Parameters
nLinesunsigned int
nColsunsigned int
Returns
Matrix

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().

Here is the call graph for this function:

◆ getIndices()

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.

Parameters
sCmdconst string&
_mMatrixconst Matrix&
_parserParser&
_dataDatafile&
_optionconst Settings&
Returns
Indices

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().

Here is the call graph for this function:

◆ performMatrixOperation()

bool performMatrixOperation ( string &  sCmd,
Parser _parser,
MemoryManager _data,
FunctionDefinitionManager _functions,
const Settings _option 
)

◆ showMatrix()

void showMatrix ( const vector< vector< mu::value_type > > &  _mMatrix)

Simple wrapper for the function parser_ShowMatrixResult() to be accessible from the outside.

Parameters
_mMatrixconst vector<vector<mu::value_type>>&
Returns
void

Definition at line 1524 of file matrixoperations.cpp.

References NumeReKernel::getInstance(), and showMatrixResult().

Here is the call graph for this function:

◆ transposeMatrix()

Matrix transposeMatrix ( const Matrix _mMatrix)

This static function will transpose the passed matrix (exchange rows with columns).

Parameters
_mMatrixconst Matrix&
Returns
Matrix

Definition at line 934 of file matrixoperations.cpp.

References SyntaxError::invalid_position, and transposeMatrix().

Referenced by createMatFromCols(), createMatFromColsFilled(), and transposeMatrix().

Here is the call graph for this function: