NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <Eigen/Dense>
#include <Eigen/Eigenvalues>
#include <random>
#include <map>
#include "matdatastructures.hpp"
#include "../ui/error.hpp"
#include "../../kernel.hpp"
#include "functionimplementation.hpp"
#include "statslogic.hpp"
Go to the source code of this file.
Macros | |
#define | EIGENVALUES 0 |
#define | EIGENVECTORS 1 |
#define | DIAGONALIZE 2 |
Functions | |
std::mt19937 & | getRandGenInstance () |
Returns a reference to the central random number generator instance, which is globally accessible by all random number functions. More... | |
static std::string | printMatrixDim (const Matrix &mat) |
Simple helper for printing the matrix dimensions to a string. More... | |
static Matrix | createFilledMatrix (size_t n, size_t m, const mu::value_type &val) |
This static function returns a matrix filled with the passed value of the defined size. More... | |
static Matrix | createZeroesMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function returns a matrix filled with zeros of the defined size. More... | |
static Matrix | createOnesMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function returns a matrix filled with ones of the defined size. More... | |
static Matrix | identityMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function returns an identity matrix of the defined size. More... | |
static Matrix | calcTrace (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function calculates the trace of the passed matrix. More... | |
static mu::value_type | calcDeterminant (const Matrix &_mMatrix, std::vector< int > vRemovedLines) |
This static function calculates the determinant of the passed matrix using the LaPlace algorithm. More... | |
static Matrix | getDeterminant (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function calculates the determinant of the passed matrix. More... | |
static Matrix | calcCrossProduct (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function calulates the n-dimensional cross product ("curl"). More... | |
__attribute__ ((force_align_arg_pointer)) static Matrix calcEigenVectsAndValues(const Matrix &_mMatrix | |
This static function does the whole eigenvalues, eigenvectors and diagonalizing stuff. More... | |
Eigen::MatrixXcd | mMatrix (_mMatrix.rows(), _mMatrix.rows()) |
for (unsigned int i=0;i< _mMatrix.rows();i++) | |
Eigen::ComplexEigenSolver< Eigen::MatrixXcd > | eSolver (mMatrix) |
if (nReturnType==EIGENVALUES) | |
static Matrix | calcEigenVects (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Calculates the eigenvectors of the passed matrix. More... | |
static Matrix | calcEigenValues (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Calculates the eigenvalues of the passed matrix. More... | |
static Matrix | diagonalize (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Diagonalizes the passed matrix using its eigenvalues. More... | |
static Matrix | createShuffledMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function creates a shuffled vector of nShuffle elements created from a 1:nBase vector. More... | |
static Matrix | invertMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Calculates the inverse matrix and checks in advance, whether the matrix is invertible. More... | |
static Matrix | transposeMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function transposes a matrix. More... | |
static Matrix | logToIndex (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function converts logical vectors into matrix indices. More... | |
static mu::value_type | calculateStats (const Matrix &mat, StatsLogic logic, int rowStart, size_t rowCount, int colStart, size_t colCount) |
Driver code to calculate some statistics from a matrix while being able to use moving windows. The calculation is switched to parallel mode, once the moving window is large enough. More... | |
static Matrix | matrixMax (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the max() function on the matrix elements. More... | |
static Matrix | matrixMovMax (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the max() function. More... | |
static Matrix | indexToLog (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function converts matrix indices into logical vectors. More... | |
static Matrix | matrixSize (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function returns the size of the passed matrix. More... | |
static Matrix | matrixAnd (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the and() function on the matrix elements. More... | |
static Matrix | matrixOr (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the or() function on the matrix elements. More... | |
static Matrix | matrixXor (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the xor() function on the matrix elements. More... | |
static Matrix | matrixSum (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the sum() function on the matrix elements. More... | |
static Matrix | matrixMovSum (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the sum() function. More... | |
static Matrix | matrixNum (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the num() function on the matrix elements. More... | |
static Matrix | matrixMovNum (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the num() function. More... | |
static Matrix | matrixAvg (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the avg() function on the matrix elements. More... | |
static Matrix | matrixMovAvg (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the avg() function. More... | |
static Matrix | matrixStd (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the std() function on the matrix elements. More... | |
static Matrix | matrixMovStd (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the std() function. More... | |
static Matrix | matrixPrd (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the prd() function on the matrix elements. More... | |
static Matrix | matrixMovPrd (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the prd() function. More... | |
static Matrix | matrixCnt (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the cnt() function on the matrix elements. More... | |
static Matrix | matrixCutoff (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies a threshold to the complete matrix as specified by the arguments. More... | |
static Matrix | matrixNorm (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the norm() function on the matrix elements. More... | |
static Matrix | matrixMovNorm (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the norm() function. More... | |
static Matrix | matrixMin (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the min() function on the matrix elements. More... | |
static Matrix | matrixMovMin (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the min() function. More... | |
static Matrix | matrixCmp (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the cmp() function on the matrix elements. More... | |
static Matrix | matrixMinPos (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the minpos() function on the matrix elements. More... | |
static Matrix | matrixMaxPos (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the maxpos() function on the matrix elements. More... | |
static Matrix | matrixMed (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the med() function on the matrix elements. More... | |
static Matrix | matrixMovMed (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Moving window version of the med() function. More... | |
static Matrix | matrixPct (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function applies the pct() function on the matrix elements. More... | |
static Matrix | matrixResize (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function changes the size of the passed matrix to fit the new size. More... | |
static Matrix | correlation (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the cross- and auto-correlation matrix calculation from the passed two matrices. More... | |
static Matrix | covariance (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the covariance calculation of the passed two matrices. More... | |
static Matrix | normalize (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the normalize function, which will normalize the (absolute) data range of the passed matrix into the range [0,1]. More... | |
static Matrix | matrixReshape (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function changes the number of rows and columns to fit the new shape. More... | |
static Matrix | matrixRepMat (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function repeats the passed matrix n and m times. More... | |
static bool | is_nan (const mu::value_type &value) |
Static helper function for std::list::remove_if() called in getUniqueList(). More... | |
static bool | isSmallerRealOnly (const mu::value_type &value1, const mu::value_type &value2) |
Static helper function for std::sort() called in getUniqueList(). Determines a real-only order. More... | |
static std::vector< mu::value_type > | getUniqueList (std::list< mu::value_type > &_list) |
This is a static helper function for the implementation of the unique() function. More... | |
static Matrix | matrixUnique (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the unique(MAT,nDim) function. More... | |
static Matrix | matrixCumSum (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the cumsum(MAT,nDim) function. More... | |
static Matrix | matrixCumPrd (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the cumprd(MAT,nDim) function. More... | |
static void | solveLGSSymbolic (const Matrix &_mMatrix, const MatFuncErrorInfo &errorInfo) |
This static function solves the system of linear equations symbolically. More... | |
static Matrix | solveLGS (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function will solve the system of linear equations passed as matrix using the Gauss elimination algorithm. More... | |
static Matrix | diagonalMatrix (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function implements the "diag()" function. More... | |
static Matrix | cartToCyl (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Converts cartesian to cylindrical coordinates. More... | |
static Matrix | cartToPolar (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Converts cartesian to polar coordinates. More... | |
static Matrix | cylToCart (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Converts cylindrical to cartesian coordinates. More... | |
static Matrix | cylToPolar (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Converts cylindrical to polar coordinates. More... | |
static Matrix | polarToCart (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Converts polar to cartesian coordinates. More... | |
static Matrix | polarToCyl (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Converts polar to cylindrical coordinates. More... | |
static size_t | findNearestLowerGridAxisValue (const Matrix &gaxes, size_t axis, double axisval) |
This static function finds the nearest lower grid axis value. More... | |
static Matrix | coordsToGrid (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function converts floating point coordinates to grid coordinates by using the grid axes as reference values. More... | |
static mu::value_type | readMat (const Matrix &mat, int row, int col) |
Static helper function for bilinearInterpolation(). More... | |
static mu::value_type | bilinearInterpolation (const Matrix &mat, double row, double col) |
Performs the bilinear interpolation of the matrix value at the selected coordinates. More... | |
static Matrix | interpolate (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static function wraps the bilinear interpolation algorithm for interpolating the values of the first matrix in the coordinates of the second matrix. More... | |
static Matrix | hcat (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static functions concatenates two matrices horizontally. This is, the number of rows stays the same and the columns are appended to the ones of the other matrix. More... | |
static Matrix | vcat (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
This static functions concatenates two matrices vertically. This is, the number of columns stays the same and the rows are appended to the ones of the other matrix. More... | |
static Matrix | selection (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Extracts a selection from a matrix iterating through two matrices simultaneously. More... | |
static Matrix | assemble (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Assembles a matrix from coordinates and values (a datagrid replacement without interpolation). More... | |
static Matrix | polyLength (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Calculates the length of an open polygon. If the circumference of a closed polygon shall be calculated, then append the first vertex at the end of the polygon. More... | |
static mu::value_type | applyKernel (const Matrix &kernel, const Matrix &inMatrix, const VectorIndex &rows, const VectorIndex &cols, const size_t startRow, const size_t startCol) |
This static helper function applies the kernel to the subset of a matrix using the provided indices. More... | |
static Matrix | matrixFilter (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Function that allows the user to apply a customer filter kernel to a matrix while applying different boundary conditions. More... | |
static Matrix | invalidMatrixFunction (const MatFuncData &funcData, const MatFuncErrorInfo &errorInfo) |
Static invalid matrix function, which will always throw an error. More... | |
static std::map< std::string, MatFuncDef > | getMatrixFunctions () |
Returns a map containing all declared and "standard" matrix functions. More... | |
Variables | |
int | nReturnType |
int const MatFuncErrorInfo & | errorInfo |
if(!_mMatrix.isSquare()) throw SyntaxError(SyntaxError if(_mMatrix.containsInvalidValues()) throw SyntaxError(SyntaxError Matrix | _mEigenVals |
Matrix | _mEigenVects |
#define DIAGONALIZE 2 |
Definition at line 24 of file matfuncs.hpp.
#define EIGENVALUES 0 |
Definition at line 22 of file matfuncs.hpp.
#define EIGENVECTORS 1 |
Definition at line 23 of file matfuncs.hpp.
__attribute__ | ( | (force_align_arg_pointer) | ) | const & |
This static function does the whole eigenvalues, eigenvectors and diagonalizing stuff.
_mMatrix | const Matrix& |
nReturnType | int |
errorInfo | const MatFuncErrorInfo& |
If the results are complex then the real and imaginary parts of the result are returned as separate results:
__attribute__((force_align_arg_pointer))
fixes TDM-GCC Bug for wrong stack alignment.
References MatFuncErrorInfo::command, Matrix::containsInvalidValues(), errorInfo, Matrix::isEmpty(), Matrix::isSquare(), SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, SyntaxError::MATRIX_CONTAINS_INVALID_VALUES, MatFuncErrorInfo::position, printMatrixDim(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
|
static |
This static helper function applies the kernel to the subset of a matrix using the provided indices.
kernel | const Matrix& |
inMatrix | const Matrix& |
rows | const VectorIndex& |
cols | const VectorIndex& |
Definition at line 3326 of file matfuncs.hpp.
References Matrix::cols(), and Matrix::rows().
Referenced by matrixFilter().
|
static |
Assembles a matrix from coordinates and values (a datagrid replacement without interpolation).
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3216 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, intCast(), Matrix::isEmpty(), Matrix::isScalar(), MatFuncData::mat1, MatFuncData::mat2, MatFuncData::mat3, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_MAX, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Performs the bilinear interpolation of the matrix value at the selected coordinates.
mat | const Matrix& |
row | double |
col | double |
Definition at line 3021 of file matfuncs.hpp.
References intCast(), mu::isnan(), and readMat().
Referenced by interpolate().
|
static |
This static function calulates the n-dimensional cross product ("curl").
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 279 of file matfuncs.hpp.
References calcDeterminant(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
This static function calculates the determinant of the passed matrix using the LaPlace algorithm.
_mMatrix | const Matrix& |
vRemovedLines | std::vector<int> |
Definition at line 182 of file matfuncs.hpp.
References calcDeterminant(), and Matrix::rows().
Referenced by calcCrossProduct(), calcDeterminant(), and getDeterminant().
|
static |
Calculates the eigenvalues of the passed matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 457 of file matfuncs.hpp.
References EIGENVALUES, errorInfo, and MatFuncData::mat1.
Referenced by getMatrixFunctions().
|
static |
Calculates the eigenvectors of the passed matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 442 of file matfuncs.hpp.
References EIGENVECTORS, errorInfo, and MatFuncData::mat1.
Referenced by getMatrixFunctions().
|
static |
This static function calculates the trace of the passed matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 152 of file matfuncs.hpp.
References MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), Matrix::isSquare(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Driver code to calculate some statistics from a matrix while being able to use moving windows. The calculation is switched to parallel mode, once the moving window is large enough.
mat | const Matrix& |
logic | StatsLogic |
rowStart | int |
rowCount | size_t |
colStart | int |
colCount | size_t |
Definition at line 778 of file matfuncs.hpp.
References Matrix::cols(), and Matrix::rows().
Referenced by assemble(), matrixCutoff(), matrixMax(), matrixMin(), matrixMovAvg(), matrixMovMax(), matrixMovMin(), matrixMovNorm(), matrixMovNum(), matrixMovPrd(), matrixMovStd(), matrixMovSum(), matrixNorm(), matrixNum(), matrixPrd(), matrixStd(), and matrixSum().
|
static |
Converts cartesian to cylindrical coordinates.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2721 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, intPower(), Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, parser_phi(), MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by cartToPolar(), and getMatrixFunctions().
|
static |
Converts cartesian to polar coordinates.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2752 of file matfuncs.hpp.
References cartToCyl(), Matrix::cols(), MatFuncErrorInfo::command, errorInfo, intPower(), Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, parser_phi(), parser_theta(), MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
This static function converts floating point coordinates to grid coordinates by using the grid axes as reference values.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2954 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, findNearestLowerGridAxisValue(), Matrix::isEmpty(), MatFuncData::mat1, MatFuncData::mat2, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), mu::real(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
This static function implements the cross- and auto-correlation matrix calculation from the passed two matrices.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
If their sizes are not fitting, they are resized to fit.
Definition at line 1877 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, MatFuncData::mat2, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, max, min, MatFuncErrorInfo::position, printMatrixDim(), Matrix::resize(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
This static function implements the covariance calculation of the passed two matrices.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1935 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, MatFuncData::mat2, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixAvg(), MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
This static function returns a matrix filled with the passed value of the defined size.
n | size_t |
m | size_t |
val | double |
Definition at line 64 of file matfuncs.hpp.
Referenced by assemble(), calcCrossProduct(), correlation(), covariance(), createOnesMatrix(), createShuffledMatrix(), createZeroesMatrix(), diagonalMatrix(), indexToLog(), interpolate(), logToIndex(), matrixAnd(), matrixAvg(), matrixCmp(), matrixCnt(), matrixFilter(), matrixMax(), matrixMed(), matrixMin(), matrixMovAvg(), matrixMovMax(), matrixMovMed(), matrixMovMin(), matrixMovNorm(), matrixMovNum(), matrixMovPrd(), matrixMovStd(), matrixMovSum(), matrixNorm(), matrixNum(), matrixOr(), matrixPct(), matrixPrd(), matrixRepMat(), matrixReshape(), matrixSize(), matrixStd(), matrixSum(), matrixXor(), selection(), solveLGS(), and solveLGSSymbolic().
|
static |
This static function returns a matrix filled with ones of the defined size.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 103 of file matfuncs.hpp.
References MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, and MatFuncErrorInfo::position.
Referenced by getMatrixFunctions().
|
static |
This static function creates a shuffled vector of nShuffle elements created from a 1:nBase vector.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 488 of file matfuncs.hpp.
References MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, getRandGenInstance(), SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, MatFuncErrorInfo::position, Matrix::resize(), and mu::rint().
Referenced by getMatrixFunctions().
|
static |
This static function returns a matrix filled with zeros of the defined size.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 79 of file matfuncs.hpp.
References MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, and MatFuncErrorInfo::position.
Referenced by getMatrixFunctions(), and polyLength().
|
static |
Converts cylindrical to cartesian coordinates.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2789 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions(), and polarToCart().
|
static |
Converts cylindrical to polar coordinates.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2820 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, intPower(), Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, parser_theta(), MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Diagonalizes the passed matrix using its eigenvalues.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 472 of file matfuncs.hpp.
References DIAGONALIZE, errorInfo, and MatFuncData::mat1.
Referenced by getMatrixFunctions().
|
static |
This static function implements the "diag()" function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2694 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixReshape(), MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function finds the nearest lower grid axis value.
gaxes | const Matrix& |
axis | size_t |
axisval | double |
Definition at line 2925 of file matfuncs.hpp.
References Matrix::cols(), mu::real(), and Matrix::rows().
Referenced by coordsToGrid().
for | ( | ) |
Definition at line 376 of file matfuncs.hpp.
References mMatrix(), and Matrix::rows().
Referenced by gen_bitlen(), init_block(), and unzReadCurrentFile().
|
static |
This static function calculates the determinant of the passed matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 256 of file matfuncs.hpp.
References calcDeterminant(), MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), Matrix::isSquare(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions(), and invertMatrix().
|
static |
Returns a map containing all declared and "standard" matrix functions.
Definition at line 3438 of file matfuncs.hpp.
References assemble(), calcCrossProduct(), calcEigenValues(), calcEigenVects(), calcTrace(), cartToCyl(), cartToPolar(), coordsToGrid(), correlation(), covariance(), createOnesMatrix(), createShuffledMatrix(), createZeroesMatrix(), cylToCart(), cylToPolar(), diagonalize(), diagonalMatrix(), getDeterminant(), hcat(), identityMatrix(), indexToLog(), interpolate(), invalidMatrixFunction(), invertMatrix(), logToIndex(), matrixAnd(), matrixAvg(), matrixCmp(), matrixCnt(), matrixCumPrd(), matrixCumSum(), matrixCutoff(), matrixFilter(), matrixMax(), matrixMaxPos(), matrixMed(), matrixMin(), matrixMinPos(), matrixMovAvg(), matrixMovMax(), matrixMovMed(), matrixMovMin(), matrixMovNorm(), matrixMovNum(), matrixMovPrd(), matrixMovStd(), matrixMovSum(), matrixNorm(), matrixNum(), matrixOr(), matrixPct(), matrixPrd(), matrixRepMat(), matrixReshape(), matrixResize(), matrixSize(), matrixStd(), matrixSum(), matrixUnique(), matrixXor(), MATSIG_INVALID, MATSIG_MAT, MATSIG_MAT_F, MATSIG_MAT_F_N, MATSIG_MAT_MAT, MATSIG_MAT_MAT_MAT, MATSIG_MAT_MAT_N, MATSIG_MAT_N_MOPT, MATSIG_MAT_NOPT, MATSIG_N_MOPT, normalize(), polarToCart(), polarToCyl(), polyLength(), selection(), solveLGS(), transposeMatrix(), and vcat().
Referenced by containsMatrices(), and evalMatOp().
std::mt19937 & getRandGenInstance | ( | ) |
Returns a reference to the central random number generator instance, which is globally accessible by all random number functions.
Definition at line 91 of file tools.cpp.
References ThreadsafeRandGen::getGenerator(), and randGenerator.
Referenced by createShuffledMatrix(), parser_gRandom(), and parser_Random().
|
static |
This is a static helper function for the implementation of the unique()
function.
_list | std::list<mu::value_type>& |
Definition at line 2126 of file matfuncs.hpp.
References is_nan(), and isSmallerRealOnly().
Referenced by matrixUnique().
|
static |
This static functions concatenates two matrices horizontally. This is, the number of rows stays the same and the columns are appended to the ones of the other matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3109 of file matfuncs.hpp.
References MatFuncErrorInfo::command, errorInfo, Matrix::hcat(), MatFuncData::mat1, MatFuncData::mat2, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
This static function returns an identity matrix of the defined size.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 127 of file matfuncs.hpp.
References MatFuncErrorInfo::command, errorInfo, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::nVal, and MatFuncErrorInfo::position.
Referenced by getMatrixFunctions(), and invertMatrix().
if | ( | nReturnType | = =EIGENVALUES | ) |
Definition at line 390 of file matfuncs.hpp.
References _mEigenVals, eSolver(), and Matrix::rows().
Referenced by TZip::Add(), TZip::AddCentral(), calculateHist1dData(), TUnzip::Find(), listDirectory(), wxTreeListMainWindow::SelectItem(), wxTreeListMainWindow::SetDragItem(), wxTreeListMainWindow::SetItemBold(), and unzReadCurrentFile().
|
static |
This static function converts matrix indices into logical vectors.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 893 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixMax(), MatFuncErrorInfo::position, mu::real(), and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function wraps the bilinear interpolation algorithm for interpolating the values of the first matrix in the coordinates of the second matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3066 of file matfuncs.hpp.
References bilinearInterpolation(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, MatFuncData::mat2, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, max, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Static invalid matrix function, which will always throw an error.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3425 of file matfuncs.hpp.
References MatFuncErrorInfo::command, errorInfo, SyntaxError::FUNCTION_ERROR, and MatFuncErrorInfo::position.
Referenced by getMatrixFunctions().
|
static |
Calculates the inverse matrix and checks in advance, whether the matrix is invertible.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 536 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, Matrix::containsInvalidValues(), errorInfo, getDeterminant(), identityMatrix(), Matrix::isEmpty(), Matrix::isSquare(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, SyntaxError::MATRIX_CONTAINS_INVALID_VALUES, SyntaxError::MATRIX_IS_NOT_INVERTIBLE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Static helper function for std::list::remove_if() called in getUniqueList().
value | const mu::value_type& |
Definition at line 2095 of file matfuncs.hpp.
References mu::isnan().
Referenced by getUniqueList().
|
static |
Static helper function for std::sort() called in getUniqueList(). Determines a real-only order.
value1 | const mu::value_type& |
value2 | const mu::value_type& |
Definition at line 2111 of file matfuncs.hpp.
Referenced by getUniqueList().
|
static |
This static function converts logical vectors into matrix indices.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 703 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the and()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1005 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the avg()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1204 of file matfuncs.hpp.
References MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixNum(), matrixSum(), and MatFuncErrorInfo::position.
Referenced by covariance(), getMatrixFunctions(), and matrixStd().
|
static |
This static function applies the cmp()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1618 of file matfuncs.hpp.
References date::abs(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, MatFuncData::fVal, Matrix::isEmpty(), mu::isinf(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::nVal, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions(), matrixMaxPos(), and matrixMinPos().
|
static |
This static function applies the cnt()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1392 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function implements the cumprd(MAT,nDim)
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2318 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, Matrix::data(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixReshape(), MatFuncData::nVal, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function implements the cumsum(MAT,nDim)
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2243 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, Matrix::data(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixReshape(), MatFuncData::nVal, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies a threshold to the complete matrix as specified by the arguments.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1411 of file matfuncs.hpp.
References date::abs(), calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, SyntaxError::CUTOFF_MODE_INVALID, errorInfo, MatFuncData::fVal, mu::isnan(), MatFuncData::mat1, MatFuncData::nVal, StatsLogic::OPERATION_MAX, StatsLogic::OPERATION_MIN, MatFuncErrorInfo::position, mu::real(), and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Function that allows the user to apply a customer filter kernel to a matrix while applying different boundary conditions.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3354 of file matfuncs.hpp.
References VectorIndex::append(), applyKernel(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_FILTER_SIZE, SyntaxError::INVALID_MODE, Matrix::isEmpty(), MatFuncData::mat1, MatFuncData::mat2, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::nVal, MatFuncErrorInfo::position, VectorIndex::prepend(), and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the max()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 839 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_MAX, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions(), indexToLog(), matrixMaxPos(), and normalize().
|
static |
This static function applies the maxpos()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1716 of file matfuncs.hpp.
References MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixCmp(), matrixMax(), and MatFuncErrorInfo::position.
Referenced by getMatrixFunctions().
|
static |
This static function applies the med()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1734 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), Matrix::data(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, Memory::med(), MatFuncErrorInfo::position, Matrix::rows(), Memory::writeData(), and Memory::writeDataDirectUnsafe().
Referenced by getMatrixFunctions().
|
static |
This static function applies the min()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1564 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_MIN, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions(), matrixMinPos(), and normalize().
|
static |
This static function applies the minpos()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1698 of file matfuncs.hpp.
References MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixCmp(), matrixMin(), and MatFuncErrorInfo::position.
Referenced by getMatrixFunctions().
|
static |
Moving window version of the avg()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1225 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_ADD, StatsLogic::OPERATION_NUM, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the max()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 858 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_MAX, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the med()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1764 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, Memory::med(), MatFuncData::mVal, MatFuncData::nVal, MatFuncErrorInfo::position, Matrix::rows(), and Memory::writeData().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the min()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1583 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_MIN, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the norm()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1529 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_ADDSQ, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the num()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1169 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_NUM, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the prd()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1357 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_MULT, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the std()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1292 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_ADD, StatsLogic::OPERATION_ADDSQSUB, StatsLogic::OPERATION_NUM, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Moving window version of the sum()
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1115 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, SyntaxError::INVALID_STATS_WINDOW_SIZE, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::mVal, MatFuncData::nVal, StatsLogic::OPERATION_ADD, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the norm()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1507 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_ADDSQ, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the num()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1150 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_NUM, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions(), matrixAvg(), and matrixStd().
|
static |
This static function applies the or()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1032 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the pct()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1816 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), Matrix::data(), errorInfo, MatFuncData::fVal, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, Memory::pct(), MatFuncErrorInfo::position, Matrix::rows(), Memory::writeData(), and Memory::writeDataDirectUnsafe().
Referenced by getMatrixFunctions().
|
static |
This static function applies the prd()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1338 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_MULT, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function repeats the passed matrix n and m times.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2051 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, MatFuncData::fVal, MatFuncData::mat1, MatFuncData::nVal, MatFuncErrorInfo::position, Matrix::rows(), and SyntaxError::TOO_LARGE_CACHE.
Referenced by getMatrixFunctions().
|
static |
This static function changes the number of rows and columns to fit the new shape.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
The total number of elements before and afterwards must be identical.
Definition at line 2018 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, MatFuncData::fVal, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::nVal, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by diagonalMatrix(), getMatrixFunctions(), matrixCumPrd(), matrixCumSum(), and matrixUnique().
|
static |
This static function changes the size of the passed matrix to fit the new size.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Missing elements are filled up with zeros.
Definition at line 1847 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, MatFuncData::fVal, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncData::nVal, MatFuncErrorInfo::position, Matrix::resize(), and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function returns the size of the passed matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 979 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), mu::isnan(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the std()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1268 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixAvg(), matrixNum(), StatsLogic::OPERATION_ADDSQSUB, MatFuncErrorInfo::position, mu::real(), and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
This static function applies the sum()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1096 of file matfuncs.hpp.
References calculateStats(), Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, StatsLogic::OPERATION_ADD, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions(), and matrixAvg().
|
static |
This static function implements the unique(MAT,nDim)
function.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2156 of file matfuncs.hpp.
References Matrix::assign(), Matrix::cols(), MatFuncErrorInfo::command, Matrix::data(), errorInfo, getUniqueList(), Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixReshape(), MatFuncData::nVal, MatFuncErrorInfo::position, Matrix::rows(), and Matrix::transpose().
Referenced by getMatrixFunctions().
|
static |
This static function applies the xor()
function on the matrix elements.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1059 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
Eigen::MatrixXcd mMatrix | ( | _mMatrix. | rows(), |
_mMatrix. | rows() | ||
) |
Referenced by for().
|
static |
This static function implements the normalize function, which will normalize the (absolute) data range of the passed matrix into the range [0,1].
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 1982 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, matrixMax(), matrixMin(), max, MatFuncErrorInfo::position, and Matrix::rows().
Referenced by getMatrixFunctions().
|
static |
Converts polar to cartesian coordinates.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2856 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, cylToCart(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Converts polar to cylindrical coordinates.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2891 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), toString(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
static |
Calculates the length of an open polygon. If the circumference of a closed polygon shall be calculated, then append the first vertex at the end of the polygon.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3287 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createZeroesMatrix(), errorInfo, Matrix::isEmpty(), MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
|
inlinestatic |
Simple helper for printing the matrix dimensions to a string.
mat | const Matrix& |
Definition at line 47 of file matfuncs.hpp.
References Matrix::printDims().
Referenced by __attribute__(), assemble(), calcCrossProduct(), calcTrace(), cartToCyl(), cartToPolar(), coordsToGrid(), correlation(), covariance(), cylToCart(), cylToPolar(), getDeterminant(), hcat(), interpolate(), invertMatrix(), matrixReshape(), polarToCart(), polarToCyl(), polyLength(), selection(), and vcat().
|
static |
Static helper function for bilinearInterpolation().
mat | const Matrix& |
row | int |
col | int |
Definition at line 3002 of file matfuncs.hpp.
References Matrix::cols(), and Matrix::rows().
Referenced by bilinearInterpolation().
|
static |
Extracts a selection from a matrix iterating through two matrices simultaneously.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3151 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, intCast(), Matrix::isEmpty(), Matrix::isScalar(), MatFuncData::mat1, MatFuncData::mat2, MatFuncData::mat3, max, MatFuncErrorInfo::position, printMatrixDim(), Matrix::rows(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions(), NumeReWindow::HandleModifiedFile(), NumeReWindow::OnFileEventTimer(), NumeReEditor::OnMouseDblClk(), NumeReEditor::OnMouseDwell(), and RevisionDialog::OnRightClick().
|
static |
This static function will solve the system of linear equations passed as matrix using the Gauss elimination algorithm.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2529 of file matfuncs.hpp.
References _lang, Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), errorInfo, Language::get(), Matrix::isEmpty(), SyntaxError::LGS_HAS_NO_SOLUTION, MatFuncData::mat1, SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, MatFuncErrorInfo::position, NumeReKernel::print(), Matrix::rows(), solveLGSSymbolic(), and toSystemCodePage().
Referenced by getMatrixFunctions().
|
static |
This static function solves the system of linear equations symbolically.
_mMatrix | const Matrix& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 2393 of file matfuncs.hpp.
References _lang, Matrix::cols(), MatFuncErrorInfo::command, createFilledMatrix(), FunctionDefinitionManager::defineFunc(), errorInfo, Language::get(), NumeReKernel::getDefinitions(), FunctionDefinitionManager::getDefinitionString(), FunctionDefinitionManager::getFunctionIndex(), NumeReKernel::getInstance(), NumeReKernel::getSettings(), FunctionDefinitionManager::isDefined(), Matrix::isEmpty(), NumeReKernel::issueWarning(), SyntaxError::MATRIX_CANNOT_HAVE_ZERO_SIZE, min, MatFuncErrorInfo::position, NumeReKernel::print(), Matrix::rows(), Settings::systemPrints(), and toString().
Referenced by solveLGS().
|
static |
This static function transposes a matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 686 of file matfuncs.hpp.
References MatFuncData::mat1, and Matrix::transpose().
Referenced by getMatrixFunctions().
|
static |
This static functions concatenates two matrices vertically. This is, the number of columns stays the same and the rows are appended to the ones of the other matrix.
funcData | const MatFuncData& |
errorInfo | const MatFuncErrorInfo& |
Definition at line 3131 of file matfuncs.hpp.
References Matrix::cols(), MatFuncErrorInfo::command, errorInfo, MatFuncData::mat1, MatFuncData::mat2, MatFuncErrorInfo::position, printMatrixDim(), Matrix::vcat(), and SyntaxError::WRONG_MATRIX_DIMENSIONS_FOR_MATOP.
Referenced by getMatrixFunctions().
if (!_mMatrix.isSquare()) throw SyntaxError(SyntaxError if (_mMatrix.containsInvalidValues()) throw SyntaxError(SyntaxError Matrix _mEigenVals |
Definition at line 369 of file matfuncs.hpp.
Referenced by if().
else return _mEigenVects |
Definition at line 370 of file matfuncs.hpp.
int const MatFuncErrorInfo& errorInfo |
Definition at line 357 of file matfuncs.hpp.
Referenced by __attribute__(), assemble(), calcCrossProduct(), calcEigenValues(), calcEigenVects(), calcTrace(), cartToCyl(), cartToPolar(), coordsToGrid(), correlation(), covariance(), createOnesMatrix(), createShuffledMatrix(), createZeroesMatrix(), cylToCart(), cylToPolar(), diagonalize(), diagonalMatrix(), evalMatOp(), getDeterminant(), hcat(), identityMatrix(), indexToLog(), interpolate(), invalidMatrixFunction(), invertMatrix(), logToIndex(), matrixAnd(), matrixAvg(), matrixCmp(), matrixCnt(), matrixCumPrd(), matrixCumSum(), matrixCutoff(), matrixFilter(), matrixMax(), matrixMaxPos(), matrixMed(), matrixMin(), matrixMinPos(), matrixMovAvg(), matrixMovMax(), matrixMovMed(), matrixMovMin(), matrixMovNorm(), matrixMovNum(), matrixMovPrd(), matrixMovStd(), matrixMovSum(), matrixNorm(), matrixNum(), matrixOr(), matrixPct(), matrixPrd(), matrixRepMat(), matrixReshape(), matrixResize(), matrixSize(), matrixStd(), matrixSum(), matrixUnique(), matrixXor(), normalize(), polarToCart(), polarToCyl(), polyLength(), selection(), solveLGS(), solveLGSSymbolic(), and vcat().
int nReturnType |
Definition at line 357 of file matfuncs.hpp.