IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Base class for matrices. More...
Public Member Functions | |||||||
abstract MatrixBase | GetCopyBase () | ||||||
Creates and returns a copy of the current matrix. | |||||||
abstract MatrixBase | GetNewBase (int rowCount, int ColumnCount) | ||||||
Creates and returns a new matrix with the specified dimensions, and of the same type as the current matrix. | |||||||
abstract MatrixBase | GetNewBase () | ||||||
Creates and returns a new matrix with the same dimensions and of the same type as the current matrix. | |||||||
abstract VectorBase | GetNewVectorBase (int length) | ||||||
Creates and returns a new vector with the specified dimension, and of the type that is consistent with the type of the current vector. | |||||||
virtual IMatrix | GetCopy () | ||||||
Creates and returns a copy of the current matrix. | |||||||
virtual IMatrix | GetNew (int rowCount, int columnCount) | ||||||
Creates and returns a new matrix with the specified dimensions, and of the same type as the current matrix. | |||||||
virtual IMatrix | GetNew () | ||||||
Creates and returns a new matrix with the same dimensions and of the same type as the current matrix. | |||||||
virtual IVector | GetNewVector (int length) | ||||||
Creates and returns a new vector with the specified dimension, and of the type that is consistent with the type of the current vector. | |||||||
virtual double[,] | ToArray () | ||||||
Creates and returns a rectangular 2D array that contains a component-wise copy of the matrix. | |||||||
virtual double[][] | ToJaggedArray () | ||||||
Creates and returns a jagged 2D array that contains a component-wise copy of the matrix. | |||||||
virtual void | SetZero () | ||||||
Sets all components of the current matrix to 0. | |||||||
virtual void | SetConstant (double elementValue) | ||||||
Sets all components of the current matrix to the specified value. | |||||||
virtual void | SetIdentity () | ||||||
Sets the current matrix to identity matrix. WARNING: Exception is thrown if a matrix is not square. For nonsquare matrices, use SetDiagonal(1.0)! | |||||||
virtual void | SetRandom () | ||||||
Sets the current matrix such that it contains random elements on the interval (0,1]. | |||||||
virtual void | SetRandom (IRandomGenerator rnd) | ||||||
Sets the current matrix such that it contains random elements on the interval (0,1]. | |||||||
virtual void | SetDiagonal (double diagonalElement) | ||||||
Sets the current matrix to the diagonal matrix with all diagonal elements equal to the specified value. Matrix does not need to be a square matrix. | |||||||
virtual void | SetDiagonal (IVector diagonal) | ||||||
Sets the current matrix to the diagonal matrix with diagonal element specified by a vector. | |||||||
virtual bool | IsSquare () | ||||||
Returns true if the current matrix is a square matrix, and false if not. | |||||||
virtual bool | IsSymmetric () | ||||||
Returns true if the current matrix is symmetric, and false if not. If the matrix is not a square matrix then false is returned. | |||||||
virtual bool | IsSymmetric (double relativeRMSTolerance) | ||||||
Returns true if the specified matrix is symmetric within some tolerance, and false if not. If the matrix is null then false is returned. | |||||||
virtual void | Negate () | ||||||
Negates the current matrix. | |||||||
virtual void | Transpose () | ||||||
Transposes the current matrix. WARNING: this operation can only be done on square matrices! | |||||||
override int | GetHashCode () | ||||||
Returns the hash code (hash function) of the current matrix. | |||||||
override bool | Equals (Object obj) | ||||||
Returns a value indicating whether the specified object is equal to the current matrix. True is returned if the object is a non-null matrix (i.e. it implements the IMatrix interface), and has the same dimension and equal elements as the current matrix. | |||||||
int | GetHashFunctionInt () | ||||||
Returns an integer valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionInt method. | |||||||
string | GetHashFunctionString () | ||||||
Returns a string valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionString method. | |||||||
override string | ToString () | ||||||
Returns string representation of the current matrix in the standard IGLib form. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
string | ToStringNewlines () | ||||||
Returns a string representation of this matrix with newlines inserted after each row. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
string | ToStringNewlines (string elementFormat) | ||||||
Returns a string representation of this matrix with newlines inserted after each row, with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
string | ToStringMath () | ||||||
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets. | |||||||
string | ToString (string elementFormat) | ||||||
Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix. | |||||||
string | ToStringMath (string elementFormat) | ||||||
Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix. | |||||||
Static Public Member Functions | |||||||
static void | SetZero (IMatrix mat) | ||||||
Sets all components of the specified matrix to 0. | |||||||
static void | SetConstant (IMatrix mat, double elementValue) | ||||||
Sets all components of the specified matrix to the specified value. | |||||||
static void | SetIdentity (IMatrix mat) | ||||||
Sets the specified matrix to identity matrix. WARNING: Works only for square matrices (exception is thrown if matrix is not square). For nonsquare matrices, use SetDiagonal(1.0)! | |||||||
static void | SetDiagonal (IMatrix mat, IVector diagonal) | ||||||
Sets the current matrix to the diagonal matrix with diagonal element specified by a vector. | |||||||
static void | SetDiagonal (IMatrix mat, double diagonalElement) | ||||||
Sets the current matrix to the diagonal matrix with all diagonal elements equal to the specified value. Matrix does not need to be a square matrix. | |||||||
static void | SetRandom (IMatrix mat) | ||||||
Sets the specified matrix such that it contains random elements on the interval (0,1]. | |||||||
static void | SetRandom (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the current matrix such that it contains random elements on the interval (0,1]. | |||||||
static void | SetRandomSymmetric (IMatrix mat) | ||||||
Sets the specified matrix such that it is symmetric and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomSymmetric (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is symmetric and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomAntiSymmetric (IMatrix mat) | ||||||
Sets the specified matrix such that it is antisymmetric and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomAntiSymmetric (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is antisymmetric and contains random elements on the interval (0,1]. Matrix will have zero elements on the diagonal. | |||||||
static void | SetRandomLowerTriangular (IMatrix mat) | ||||||
Sets the specified matrix such that it is lower triangular and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomLowerTriangular (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is lower triangular and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomUpperTriangular (IMatrix mat) | ||||||
Sets the specified matrix such that it is upper triangular and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomUpperTriangular (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is upper triangular and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomSymmetricPositiveDefinite (IMatrix mat) | ||||||
Sets the specified matrix such that it is positive definite and contains random elements on the interval (0,1]. | |||||||
static void | SetRandomSymmetricPositiveDefinite (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is positive definite and contains random elements. | |||||||
static void | SetRandomPositiveDiagonallyDominant (IMatrix mat, double dominancyFactor) | ||||||
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominant (IMatrix mat, IRandomGenerator rnd, double dominancyFactor) | ||||||
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominant (IMatrix mat) | ||||||
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominant (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominantSymmetric (IMatrix mat, double dominancyFactor) | ||||||
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominantSymmetric (IMatrix mat, IRandomGenerator rnd, double dominancyFactor) | ||||||
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominantSymmetric (IMatrix mat) | ||||||
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static void | SetRandomPositiveDiagonallyDominantSymmetric (IMatrix mat, IRandomGenerator rnd) | ||||||
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column. | |||||||
static bool | IsSquare (IMatrix mat) | ||||||
Returns true if the specified matrix is a square matrix, and false if not. If the matrix is null then false is returned. | |||||||
static bool | IsSymmetric (IMatrix mat) | ||||||
Returns true if the specified matrix is symmetric, and false if not. If the matrix is null then false is returned. | |||||||
static bool | IsSymmetric (IMatrix mat, double relativeRMSTolerance) | ||||||
Returns true if the specified matrix is symmetric within some tolerance, and false if not. If the matrix is null then false is returned. | |||||||
static int | Compare (IMatrix m1, IMatrix m2) | ||||||
Compares two matrices and returns -1 if the first matrix is smaller than the second one, 0 if matrices are equal, and 1 if the first matrix is greater. Matrix that is null is considered smaller than a matrix that is not null. Two null matrices are considered equal. Matrix with smaller dimension is considered smaller than a matrix with greater dimension. Matrices with equal dimensions ar compared by elements. The first element that is different decides which matrix is considered greater. | |||||||
static void | Resize (ref IMatrix mat, IMatrix template, int rowCount, int columnCount) | ||||||
Resizes, if necessary, the specified matrix according to the required dimensions. If the matrix is initially null then a new matrix is created. If in this case a template matrix is specified then the newly created matrix will be of the same type as that template matrix, because it is created by the GetNew() method on that matrix. If dimensions of the initial matrix do not match the required dim., then matrix is resized. If the specified matrix dimension is less or equal to 0 then matrix is resized with the same dimensions as those of the template matirx. If in this case the template matrix is null, an exception is thrown. WARNINGS: Components are NOT preserved and have in general undefined values after operation is performed. If matrix and template are both null then the type of nawly created matrix is Matrix. | |||||||
static void | Resize (ref IMatrix mat, int rowCount, int columnCount) | ||||||
Resizes, if necessary, the specified matrix according to the required dimensions. If the matrix is initially null then a new matrix (of type Matrix) is created. If dimensions of the initial matrix do not match the required dimensions, then matrix is resized. Components are NOT preserved and have in general undefined values after operation is performed. WARNING: If the matrix is initially null then the type of the newly created matrix is Matrix. | |||||||
static void | Resize (ref IMatrix mat, IMatrix template) | ||||||
Resizes, if necessary, the specified matrix according to the dimensions of the specified template matrix. If the matrix is initially null then a new matrix is created. In this case the newly created matrix will be of the same type as that template matrix, because it is created by the GetNew() method on that matrix. If dimensions of the initial matrix do not match the dimensions of the template matrix, then matrix is resized. If the template matrix is null, then an exception is thrown. WARNINGS: Components are NOT preserved and have in general undefined values after operation is performed. If matrix and template are null then the type of newly created matrix is Matrix. | |||||||
static void | CopyPlain (IMatrix a, IMatrix result) | ||||||
Copies components of a matrix to another matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the copied matrix and result storage must match. | |||||||
static void | Copy (IMatrix a, IMatrix result) | ||||||
Copies components of a matrix to another matrix. WARNING: dimensions of the copied matrix and result storage must match. | |||||||
static void | Copy (IMatrix a, ref IMatrix result) | ||||||
Copies components of a matrix to another matrix. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | CopyPlain (MatrixBase_MathNetNumerics a, IMatrix result) | ||||||
Copies components of a matrix to another matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the copied matrix and result storage must match. | |||||||
static void | Copy (MatrixBase_MathNetNumerics a, IMatrix result) | ||||||
Copies components of a matrix to another matrix. WARNING: dimensions of the copied matrix and result storage must match. | |||||||
static void | Copy (MatrixBase_MathNetNumerics a, ref IMatrix result) | ||||||
Copies components of a matrix to another matrix. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | CopyPlain (IMatrix a, Matrix_MathNetNumercs result) | ||||||
Copies components of a matrix to another matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the copied matrix and result storage must match. | |||||||
static void | Copy (IMatrix a, Matrix_MathNetNumercs result) | ||||||
Copies components of a matrix to another matrix. WARNING: dimensions of the copied matrix and result storage must match. | |||||||
static void | Copy (IMatrix a, ref Matrix_MathNetNumercs result) | ||||||
Copies components of a matrix to another matrix. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | NegatePlain (IMatrix a, IMatrix result) | ||||||
Stores a negative matrix of the operand in another matrix. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | Negate (IMatrix a, IMatrix result) | ||||||
Stores a negative matrix of the operand in another matrix. Can be done in-place. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | Negate (IMatrix a, ref IMatrix result) | ||||||
Stores a negative matrix of the operand in another matrix. Can be done in-place. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | TransposePlain (IMatrix a, IMatrix result) | ||||||
Stores transpose of the operand in another matrix. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | Transpose (IMatrix a, IMatrix result) | ||||||
Stores transpose of the operand in another matrix. Can be done in-place. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | Transpose (IMatrix a, ref IMatrix result) | ||||||
Stores transpose of the matrix operand in another matrix. Can be done in-place. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | SymmetrizePlain (IMatrix a, IMatrix sym, IMatrix antiSym) | ||||||
Calculates symmetric and antisymmetric part of the specified matrix (symmetric part is stored in the first result argument but is calculated last, such that it overrides antisymmetric when both arguments point to the same matrix object). Can be done in-place.When both symmetric and antisymmetric result arguments point to the same matrix, symmetric part is stored in the matrix.This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match.WARNING: If this antiSym points to the same matrix object as sym then symmetric part is stored in this matrix (because it overrides antisymmetric part). | |||||||
static void | Symmetrize (IMatrix a, IMatrix sym, IMatrix antiSym) | ||||||
Calculates symmetric and antisymmetric part of the specified matrix (symmetric part is stored in the first result argument but is calculated last, such that it overrides antisymmetric when both arguments point to the same matrix object). Can be done in-place.When both symmetric and antisymmetric result arguments point to the same matrix, exception is thrown.Dimensions of the operand and result storage must match, otherwise exception is thrown. | |||||||
static void | Symmetrize (IMatrix a, ref IMatrix sym, ref IMatrix antiSym) | ||||||
Stores transpose of the matrix operand in another matrix. Can be done in-place. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | SymmetricPartPlain (IMatrix a, IMatrix result) | ||||||
Stores symmetric part of a square matrix operand in another matrix. Symmetrization is performed by averaging of non-diagonal terms and their transposed terms. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | SymmetricPart (IMatrix a, IMatrix result) | ||||||
Stores symmetric part of a square matrix operand in another matrix. Symmetrization is performed by averaging of non-diagonal terms and their transposed terms. Can be done in-place. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | SymmetricPart (IMatrix a, ref IMatrix result) | ||||||
Stores symmetric part of a square matrix operand in another matrix. Symmetrization is performed by averaging of non-diagonal terms and their transposed terms. Can be done in-place. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | AntisymmetricPartPlain (IMatrix a, IMatrix result) | ||||||
Stores antisymmetric part of a square matrix operand in another matrix. Antisymmetrization is performed by subtracting non-diagonal terms and their transposed terms, division by 2 and storing result in one matrix element and its negative value in another element. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | AntisymmetricPart (IMatrix a, IMatrix result) | ||||||
Stores antisymmetric part of a square matrix operand in another matrix. Antisymmetrization is performed by subtracting non-diagonal terms and their transposed terms, division by 2 and storing result in one matrix element and its negative value in another element. Can be done in-place. WARNING: dimensions of the operand and result storage must match. | |||||||
static void | AntisymmetricPart (IMatrix a, ref IMatrix result) | ||||||
Stores antisymmetric part of a square matrix operand in another matrix. Antisymmetrization is performed by subtracting non-diagonal terms and their transposed terms, division by 2 and storing result in one matrix element and its negative value in another element. Can be done in-place. Resulting matrix is allocated or reallocated if necessary. | |||||||
static void | AddPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
Sums two matrices and stores the result in the specified result matrix. Operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Add (IMatrix a, IMatrix b, IMatrix result) | ||||||
Sums two matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Add (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
Sums two matrices and stores the result in the specified result matrix. Operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated. | |||||||
static void | SubtractPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
Subtracts two matrices and stores the result in the specified result matrix. Operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Subtract (IMatrix a, IMatrix b, IMatrix result) | ||||||
Subtracts two matrices and stores the result in the specified result matrix. Operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Subtract (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
Subtracts two matrices and stores the result in the specified result matrix. Operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated. | |||||||
static void | ArrayMultiplyPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
Element-by-element multiplication. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayMultiply (IMatrix a, IMatrix b, IMatrix result) | ||||||
Element-by-element multiplication. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayMultiply (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
Element-by-element multiplication. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated. | |||||||
static void | ArrayDividePlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
Element-by-element division. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayDivide (IMatrix a, IMatrix b, IMatrix result) | ||||||
Element-by-element division. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayDivide (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
Element-by-element division. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated. | |||||||
static void | ArrayPowerPlain (IMatrix a, double power, IMatrix result) | ||||||
Element-by-element raise to power. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayPower (IMatrix a, double power, IMatrix result) | ||||||
Element-by-element raise to power. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayPower (IMatrix a, double power, ref IMatrix result) | ||||||
Element-by-element raise to power. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated. | |||||||
static void | ArrayMapPlain (IMatrix a, Converter< double, double > mapping, IMatrix result) | ||||||
Element-by-element mapping of an arbitrary function. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayMap (IMatrix a, Converter< double, double > mapping, IMatrix result) | ||||||
Element-by-element mapping of an arbitrary function. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | ArrayMap (IMatrix a, Converter< double, double > mapping, ref IMatrix result) | ||||||
Element-by-element mapping of an arbitrary function. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated. | |||||||
static void | MultiplyPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A*B. Multiplies two matrices and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | Multiply (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A*B. Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | Multiply (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
R=A*B. Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyTranspMatPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A^T*B Calculates product of transposed matrix and a matrix, and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspMat (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A^T*B Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspMat (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
R=A^T*B Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyMatTranspPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A*B^T. Multiplies a matrix by transpose of another matrix and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyMatTransp (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A*B^T. Multiplies a matrix by transpose of another matrix and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyMatTransp (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
R=A*B^T. Multiplies a matrix by transpose of another matrix and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyTranspTranspPlain (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A^T*B^T. Multiplies transposed matrix by another transposed matrix, and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspTransp (IMatrix a, IMatrix b, IMatrix result) | ||||||
R=A^T*B^T. Multiplies transposed matrix by another transposed matrix, and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspTransp (IMatrix a, IMatrix b, ref IMatrix result) | ||||||
R=A^T*B^T. Multiplies transposed matrix by another transposed matrix, and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyPlain (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A*B*C. Multiplies three matrices and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | Multiply (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A*B*C. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | Multiply (IMatrix a, IMatrix b, IMatrix c, ref IMatrix result) | ||||||
R=A*B*C. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyTranspMatTranspPlain (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A^T*B*C^T. Multiplies three matrices (transposed first argument, second argument, and transposed third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspMatTransp (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A^T*B*C^T. Multiplies three matrices (transposed first argument, second argument, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspMatTransp (IMatrix a, IMatrix b, IMatrix c, ref IMatrix result) | ||||||
R=A^T*B*C^T. Multiplies three matrices (transposed first argument, second argument, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyTranspMatMatPlain (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A^T*B*C. Multiplies three matrices (transposed first argument, second argument, and third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspMatMat (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A^T*B*C. Multiplies three matrices (transposed first argument, second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspMatMat (IMatrix a, IMatrix b, IMatrix c, ref IMatrix result) | ||||||
R=A^T*B*C. Multiplies three matrices (transposed first argument, second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyMatMatTranspPlain (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A*B*C^T. Multiplies three matrices (first argumet, second argumet, and transposed third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyMatMatTransp (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A*B*C^T. Multiplies three matrices (first argumet, second argumet, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyMatMatTransp (IMatrix a, IMatrix b, IMatrix c, ref IMatrix result) | ||||||
R=A*B*C^T. Multiplies three matrices (first argumet, second argumet, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyMatTranspMatPlain (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A*B^T*C. Multiplies three matrices (first argument, transposed second argument, and third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyMatTranspMat (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A*B^T*C. Multiplies three matrices (first argument, transposed second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyMatTranspMat (IMatrix a, IMatrix b, IMatrix c, ref IMatrix result) | ||||||
R=A*B^T*C. Multiplies three matrices (first argument, transposed second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyTranspTranspTranspPlain (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A^T*B^T*C^T. Multiplies three matrices and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspTranspTransp (IMatrix a, IMatrix b, IMatrix c, IMatrix result) | ||||||
R=A^T*B^T*C^T. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. | |||||||
static void | MultiplyTranspTranspTransp (IMatrix a, IMatrix b, IMatrix c, ref IMatrix result) | ||||||
R=A^T*B^T*C^T. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyPlain (IMatrix a, IVector b, IVector result) | ||||||
R=A*b. Multiplies a matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Multiply (IMatrix a, IVector b, IVector result) | ||||||
R=A*b. Multiplies a matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Multiply (IMatrix a, IVector b, ref IVector result) | ||||||
R=A*b. Multiplies matrix by scalar and stores the result in the specified result matrix. Operation can not be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyTranspVecPlain (IMatrix a, IVector b, IVector result) | ||||||
R=A^T*b. Multiplies a transposed matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyTranspVec (IMatrix a, IVector b, IVector result) | ||||||
R=A^T*b. Multiplies a transposed matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyTranspVec (IMatrix a, IVector b, ref IVector result) | ||||||
R=A^T*b. Multiplies transposed matrix by scalar and stores the result in the specified result matrix. Operation can not be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static double | MultiplyPlain (IVector left, IMatrix a, IVector right) | ||||||
R=a^T*M*b. Left-multiplies a matrix with a vector (transposed), right multiplies the result vith another vector, and returns the final result. Can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static double | Multiply (IVector left, IMatrix a, IVector right) | ||||||
R=a^T*M*b. Left-multiplies a matrix with a vector (transposed), right multiplies the result vith another vector, and returns the final result. Can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static double | Multiply (IVector left, IMatrix a, IVector right, ref IVector result) | ||||||
R=a^T*M*b. Left-multiplies a matrix with a vector (transposed), right multiplies the result vith another vector, and returns the final result. Can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyPlain (IMatrix a, double b, IMatrix result) | ||||||
Multiplies matrix by scalar and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Multiply (IMatrix a, double b, IMatrix result) | ||||||
Multiplies matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
| |||||||
static void | Multiply (IMatrix a, double b, ref IMatrix result) | ||||||
Multiplies matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | DividePlain (IMatrix a, double b, IMatrix result) | ||||||
Divides matrix by scalar and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | Divide (IMatrix a, double b, IMatrix result) | ||||||
Divides matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
| |||||||
static void | Divide (IMatrix a, double b, ref IMatrix result) | ||||||
Divides matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyDiagonalPlain (IVector diag, IMatrix a, IMatrix result) | ||||||
Left-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)*A This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyDiagonal (IVector diag, IMatrix a, IMatrix result) | ||||||
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)*A WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyDiagonal (IVector diag, IMatrix a, ref IMatrix result) | ||||||
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)*A WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyInverseDiagonalPlain (IVector diag, IMatrix a, IMatrix result) | ||||||
Left-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)^-1*A This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyInverseDiagonal (IVector diag, IMatrix a, IMatrix result) | ||||||
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)^-1*A WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyInverseDiagonal (IVector diag, IMatrix a, ref IMatrix result) | ||||||
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)^-1*A WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyDiagonalPlain (IMatrix a, IVector diag, IMatrix result) | ||||||
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d) This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyDiagonal (IMatrix a, IVector diag, IMatrix result) | ||||||
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d) WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyDiagonal (IMatrix a, IVector diag, ref IMatrix result) | ||||||
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d) WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static void | MultiplyInverseDiagonalPlain (IMatrix a, IVector diag, IMatrix result) | ||||||
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d)^-1 This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyInverseDiagonal (IMatrix a, IVector diag, IMatrix result) | ||||||
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d)^-1 WARNING: dimensions of matrices must match, otherwise an exception is thrown. | |||||||
static void | MultiplyInverseDiagonal (IMatrix a, IVector diag, ref IMatrix result) | ||||||
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d)^-1 WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated. | |||||||
static int | GetHashCode (IMatrix mat) | ||||||
Returns hash code of the specified matrix. | |||||||
static bool | Equals (IMatrix m1, IMatrix m2) | ||||||
Returns true if the specified matrices are equal, false if not. | |||||||
static int | GetHashFunctionInt (IMatrix mat) | ||||||
Returns an integer valued hash function of the specified matrix object. The returned value is calculated by the Util.GetHashFunctionInt method. | |||||||
static string | GetHashFunctionString (IMatrix mat) | ||||||
Returns a string valued hash function of the specified matrix object. The returned value is calculated by the Util.GetHashFunctionString method. | |||||||
static string | ToStringNewlines (IMatrix mat) | ||||||
Returns a string representation of the specified matrix with newlines inserted after each row. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
static string | ToStringNewlines (IMatrix mat, string elementFormat) | ||||||
Returns a string representation of the specified matrix with newlines inserted after each row, with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
static string | ToString (IMatrix mat) | ||||||
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets. | |||||||
static string | ToStringMath (IMatrix mat) | ||||||
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets. | |||||||
static string | ToString (IMatrix mat, string elementFormat) | ||||||
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
static string | ToStringMath (IMatrix mat, string elementFormat) | ||||||
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets. | |||||||
static void | SaveJson (IMatrix mat, string filePath) | ||||||
Saves (serializes) the specified matrix to the specified JSON file. File is owerwritten if it exists. | |||||||
static void | SaveJson (IMatrix mat, string filePath, bool append) | ||||||
Saves (serializes) the specified matrix to the specified JSON file. | |||||||
static void | LoadJson (string filePath, ref IMatrix matRestored) | ||||||
Restores (deserializes) a matrix object from the specified file in JSON format. | |||||||
static MatrixBase | operator+ (MatrixBase m) | ||||||
Unary plus, returns the operand. | |||||||
static MatrixBase | operator- (MatrixBase m) | ||||||
Unary negation, returns the negative operand. | |||||||
static MatrixBase | operator+ (MatrixBase a, MatrixBase b) | ||||||
Matrix addition. | |||||||
static MatrixBase | operator- (MatrixBase a, MatrixBase b) | ||||||
Matrix subtraction. | |||||||
static MatrixBase | operator* (MatrixBase a, MatrixBase b) | ||||||
Product of two matrices. | |||||||
static VectorBase | operator* (MatrixBase a, VectorBase b) | ||||||
Product of a matrix and a vector. | |||||||
static MatrixBase | operator* (MatrixBase a, double b) | ||||||
Product of a matrix by a scalar. | |||||||
static MatrixBase | operator* (double a, MatrixBase b) | ||||||
Product of a matrix by a scalar. | |||||||
static MatrixBase | operator/ (MatrixBase a, double b) | ||||||
Matrix subtraction. | |||||||
static bool | TestMatrixProducts (bool printReports) | ||||||
Tests various matrix and vector products with fixed tolerance of 1.0E-6. | |||||||
static bool | TestMatrixProducts (double tolerance) | ||||||
Tests various matrix and vector products, without printing reports. | |||||||
static bool | TestMatrixProducts () | ||||||
Tests various matrix and vector products with fixed tolerance of 1.0E-6 and without printing reports. | |||||||
static bool | TestMatrixProducts (double tolerance, bool printReports) | ||||||
Tests various matrix and vector products. | |||||||
static void | TestStaticMethodCommon () | ||||||
A test method, just prints some output. | |||||||
static void | TestStaticMethodSpecific () | ||||||
A test method, just prints some output. | |||||||
Static Protected Member Functions | |||||||
static bool | CheckTestResult (IMatrix result, IMatrix referenceResult, double tolerance, bool printReports) | ||||||
Checks whether the difference between matrix result of the tested operation and some reference result is within the specified tolerance. | |||||||
static bool | CheckTestResult (IVector result, IVector referenceResult, double tolerance, bool printReports) | ||||||
Checks whether the difference between matrix result of the tested operation and some reference result is within the specified tolerance. | |||||||
Properties | |||||||
abstract int | RowCount [get] | ||||||
Gets the number of rows of the current matrix. | |||||||
abstract int | ColumnCount [get] | ||||||
Gets the number of columns of the current matrix. | |||||||
abstract double | this [int i, int j] [get, set] | ||||||
Gets or sets the specified component of the current matrix. | |||||||
virtual IMatrix | T [get] | ||||||
Returns a new matrix that is transpose of the current matrix. | |||||||
virtual double | Trace [get] | ||||||
Gets matrix trace (sum of diagonal terms). | |||||||
virtual double | NormForbenius [get] | ||||||
Gets Forbenious (or Euclidean) norm of the matrix - square root of sum of squares of elements. | |||||||
virtual double | NormEuclidean [get] | ||||||
Gets Forbenious (or Euclidean) norm of the matrix - square root of sum of squares of elements. | |||||||
virtual double | Norm [get] | ||||||
Gets Forbenious (or Euclidean) norm of the matrix - square root of sum of squares of elements. | |||||||
static MatrixStore | MatrixStore [get] | ||||||
Gets the matrix store for recycling auxiliary matrices. Matrix store is created only once, on the first access. | |||||||
Static Private Member Functions | |||||||
static bool | TestMultiplyTranspMat (double tolerance, bool printReports) | ||||||
Tests product A^T*B. | |||||||
static bool | TestMultiplyMatTransp (double tolerance, bool printReports) | ||||||
Tests product A*B^T. | |||||||
static bool | TestMultiplyTranspTransp (double tolerance, bool printReports) | ||||||
Tests product A^T*B^T. | |||||||
static bool | TestMultiply3 (double tolerance, bool printReports) | ||||||
Tests product A*B*C. | |||||||
static bool | TestMultiplyTranspMatTransp (double tolerance, bool printReports) | ||||||
Tests product A^T*B*C^T. | |||||||
static bool | TestMultiplyTranspMatMat (double tolerance, bool printReports) | ||||||
Tests product A^T*B*C. | |||||||
static bool | TestMultiplyMatMatTransp (double tolerance, bool printReports) | ||||||
Tests product A*B*C^T. | |||||||
static bool | TestMultiplyMatTranspMat (double tolerance, bool printReports) | ||||||
Tests product A*B^T*C. | |||||||
static bool | TestMultiplyTranspTranspTransp (double tolerance, bool printReports) | ||||||
Tests product A^T*B^T*C^T. | |||||||
Static Private Attributes | |||||||
static MatrixStore | _matrixStore |
Base class for matrices.
$A Igor Jan08 Jul10 Nov10;
abstract MatrixBase IG::Num::MatrixBase::GetCopyBase | ( | ) | [pure virtual] |
Creates and returns a copy of the current matrix.
Implemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
abstract MatrixBase IG::Num::MatrixBase::GetNewBase | ( | int | rowCount, |
int | ColumnCount | ||
) | [pure virtual] |
Creates and returns a new matrix with the specified dimensions, and of the same type as the current matrix.
rowCount | Number fo rows of the newly created matrix. |
columnCount | Number of columns of the newly created matrix. |
Implemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
abstract MatrixBase IG::Num::MatrixBase::GetNewBase | ( | ) | [pure virtual] |
Creates and returns a new matrix with the same dimensions and of the same type as the current matrix.
Implemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
abstract VectorBase IG::Num::MatrixBase::GetNewVectorBase | ( | int | length | ) | [pure virtual] |
Creates and returns a new vector with the specified dimension, and of the type that is consistent with the type of the current vector.
length | Dimension of the newly created vector. |
Implemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
virtual IMatrix IG::Num::MatrixBase::GetCopy | ( | ) | [inline, virtual] |
Creates and returns a copy of the current matrix.
Implements IG::Num::IMatrix.
virtual IMatrix IG::Num::MatrixBase::GetNew | ( | int | rowCount, |
int | columnCount | ||
) | [inline, virtual] |
Creates and returns a new matrix with the specified dimensions, and of the same type as the current matrix.
rowCount | Number fo rows of the newly created matrix. |
columnCount | Number of columns of the newly created matrix. |
Implements IG::Num::IMatrix.
virtual IMatrix IG::Num::MatrixBase::GetNew | ( | ) | [inline, virtual] |
Creates and returns a new matrix with the same dimensions and of the same type as the current matrix.
Implements IG::Num::IMatrix.
virtual IVector IG::Num::MatrixBase::GetNewVector | ( | int | length | ) | [inline, virtual] |
Creates and returns a new vector with the specified dimension, and of the type that is consistent with the type of the current vector.
length | Dimension of the newly created vector. |
Implements IG::Num::IMatrix.
virtual double [,] IG::Num::MatrixBase::ToArray | ( | ) | [inline, virtual] |
Creates and returns a rectangular 2D array that contains a component-wise copy of the matrix.
virtual double [][] IG::Num::MatrixBase::ToJaggedArray | ( | ) | [inline, virtual] |
Creates and returns a jagged 2D array that contains a component-wise copy of the matrix.
virtual void IG::Num::MatrixBase::SetZero | ( | ) | [inline, virtual] |
Sets all components of the current matrix to 0.
virtual void IG::Num::MatrixBase::SetConstant | ( | double | elementValue | ) | [inline, virtual] |
Sets all components of the current matrix to the specified value.
elementValue | Value to which elements are set. |
Implements IG::Num::IMatrix.
virtual void IG::Num::MatrixBase::SetIdentity | ( | ) | [inline, virtual] |
Sets the current matrix to identity matrix. WARNING: Exception is thrown if a matrix is not square. For nonsquare matrices, use SetDiagonal(1.0)!
Implements IG::Num::IMatrix.
virtual void IG::Num::MatrixBase::SetRandom | ( | ) | [inline, virtual] |
Sets the current matrix such that it contains random elements on the interval (0,1].
Implements IG::Num::IMatrix.
virtual void IG::Num::MatrixBase::SetRandom | ( | IRandomGenerator | rnd | ) | [inline, virtual] |
Sets the current matrix such that it contains random elements on the interval (0,1].
rnd | Random generator used to generate matrix elements. |
Implements IG::Num::IMatrix.
virtual void IG::Num::MatrixBase::SetDiagonal | ( | double | diagonalElement | ) | [inline, virtual] |
Sets the current matrix to the diagonal matrix with all diagonal elements equal to the specified value. Matrix does not need to be a square matrix.
diagonalElement | Value of diagonal elements. |
Implements IG::Num::IMatrix.
virtual void IG::Num::MatrixBase::SetDiagonal | ( | IVector | diagonal | ) | [inline, virtual] |
Sets the current matrix to the diagonal matrix with diagonal element specified by a vector.
diagonal | Vector of diagonal elements. |
Implements IG::Num::IMatrix.
virtual bool IG::Num::MatrixBase::IsSquare | ( | ) | [inline, virtual] |
Returns true if the current matrix is a square matrix, and false if not.
Implements IG::Num::IMatrix.
virtual bool IG::Num::MatrixBase::IsSymmetric | ( | ) | [inline, virtual] |
Returns true if the current matrix is symmetric, and false if not. If the matrix is not a square matrix then false is returned.
Implements IG::Num::IMatrix.
virtual bool IG::Num::MatrixBase::IsSymmetric | ( | double | relativeRMSTolerance | ) | [inline, virtual] |
Returns true if the specified matrix is symmetric within some tolerance, and false if not. If the matrix is null then false is returned.
relativeRMSTolerance | Tolerance on the ratio between RMS of differences between out of diagonal terms and their transposes and between RMS of out of diagonal terms, below which matrix is considered symmetric. |
Implements IG::Num::IMatrix.
virtual void IG::Num::MatrixBase::Negate | ( | ) | [inline, virtual] |
Negates the current matrix.
virtual void IG::Num::MatrixBase::Transpose | ( | ) | [inline, virtual] |
Transposes the current matrix. WARNING: this operation can only be done on square matrices!
override int IG::Num::MatrixBase::GetHashCode | ( | ) | [inline] |
Returns the hash code (hash function) of the current matrix.
This method calls the MatrixBase.GetHashCode to calculate the hash code, which is standard for all implementations of the IMatrix interface.
Two matrices that have the same dimensions and equal elements will produce the same hash codes.
Probability that two different matrices will produce the same hash code is small but it exists.
Overrides the object.GetHashCode method.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
override bool IG::Num::MatrixBase::Equals | ( | Object | obj | ) | [inline] |
Returns a value indicating whether the specified object is equal to the current matrix. True is returned if the object is a non-null matrix (i.e. it implements the IMatrix interface), and has the same dimension and equal elements as the current matrix.
This method calls the MatrixBase.Equals to obtain the returned value, which is standard for all implementations of the IMatrix interface.
Overrides the object.Equals method.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
int IG::Num::MatrixBase::GetHashFunctionInt | ( | ) | [inline] |
Returns an integer valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionInt method.
Implements IG::Num::IMatrix.
string IG::Num::MatrixBase::GetHashFunctionString | ( | ) | [inline] |
Returns a string valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionString method.
The returned string is always on the same length, and is based on the ToString method. Therefore it is convenient for use in file or directory names that have one part related to a specific matrix.
Implements IG::Num::IMatrix.
static void IG::Num::MatrixBase::SetZero | ( | IMatrix | mat | ) | [inline, static] |
Sets all components of the specified matrix to 0.
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetConstant | ( | IMatrix | mat, |
double | elementValue | ||
) | [inline, static] |
Sets all components of the specified matrix to the specified value.
mat | Matrix whose components are set. |
elementValue | Value to which elements are set. |
static void IG::Num::MatrixBase::SetIdentity | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix to identity matrix. WARNING: Works only for square matrices (exception is thrown if matrix is not square). For nonsquare matrices, use SetDiagonal(1.0)!
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetDiagonal | ( | IMatrix | mat, |
double | diagonalElement | ||
) | [inline, static] |
static void IG::Num::MatrixBase::SetRandom | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandom | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the current matrix such that it contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
static void IG::Num::MatrixBase::SetRandomSymmetric | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is symmetric and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomSymmetric | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the specified matrix such that it is symmetric and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
static void IG::Num::MatrixBase::SetRandomAntiSymmetric | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is antisymmetric and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomAntiSymmetric | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
static void IG::Num::MatrixBase::SetRandomLowerTriangular | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is lower triangular and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomLowerTriangular | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the specified matrix such that it is lower triangular and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
static void IG::Num::MatrixBase::SetRandomUpperTriangular | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is upper triangular and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomUpperTriangular | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the specified matrix such that it is upper triangular and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
static void IG::Num::MatrixBase::SetRandomSymmetricPositiveDefinite | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is positive definite and contains random elements on the interval (0,1].
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomSymmetricPositiveDefinite | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the specified matrix such that it is positive definite and contains random elements.
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
This method is relativley slow because of multiplication of two matrices. For quicker method use SetRandomPositiveDiagonallyDominantSymmetric().
Matrix is created in such a way that a random lower triangular matrix with positive diagonal elements is created first, then it is multiplied by its transpose.
It seems that generation of positive definite matrices in this way is not stable when elements of the lower triangular matrix are random on the interval [0,1). For this reason, 1 is added to all diagonal elements of the lower triangular matrix.
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominant | ( | IMatrix | mat, |
double | dominancyFactor | ||
) | [inline, static] |
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominant | ( | IMatrix | mat, |
IRandomGenerator | rnd, | ||
double | dominancyFactor | ||
) | [inline, static] |
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
dominancyFactor | Factor such that any diagonal element is by absolute value at least by this factor greater than the sum of absolute values of nondiagonal elements in the corresponding column. |
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominant | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominant | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the specified matrix such that it is has random elements and is diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
dominancyFactor | The average ratio between absolute value of any diagonal term and the sum of absolute values of out of diagonal terms in the same column. Should be greater than 1. |
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominantSymmetric | ( | IMatrix | mat, |
double | dominancyFactor | ||
) | [inline, static] |
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
<dominancyFactor>The average ratio between absolute value of any diagonal term and the sum of absolute values of out of diagonal terms in the same column. Should be greater than 1.</dominancyFactor>
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominantSymmetric | ( | IMatrix | mat, |
IRandomGenerator | rnd, | ||
double | dominancyFactor | ||
) | [inline, static] |
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
dominancyFactor | Factor such that any diagonal element is by absolute value at least by this factor greater than the sum of absolute values of nondiagonal elements in the corresponding column. |
<dominancyFactor>The average ratio between absolute value of any diagonal term and the sum of absolute values of out of diagonal terms in the same column. Should be greater than 1.</dominancyFactor>
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominantSymmetric | ( | IMatrix | mat | ) | [inline, static] |
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
static void IG::Num::MatrixBase::SetRandomPositiveDiagonallyDominantSymmetric | ( | IMatrix | mat, |
IRandomGenerator | rnd | ||
) | [inline, static] |
Sets the specified matrix such that it is has random elements and is symmetric diagonally dominant with positive diagonal elements, i.e. any diagonal element is greater by absolute value than sum of absolute values of nondiagonal elements in the corresponding column.
mat | Matrix whose components are set. |
rnd | Random generator used to generate matrix elements. |
dominancyFactor | Factor such that any diagonal element is by absolute value at least by this factor greater than the sum of absolute values of nondiagonal elements in the corresponding column. |
static bool IG::Num::MatrixBase::IsSquare | ( | IMatrix | mat | ) | [inline, static] |
Returns true if the specified matrix is a square matrix, and false if not. If the matrix is null then false is returned.
mat | Matrix that is tested for being square. |
static bool IG::Num::MatrixBase::IsSymmetric | ( | IMatrix | mat | ) | [inline, static] |
Returns true if the specified matrix is symmetric, and false if not. If the matrix is null then false is returned.
mat | Matrix that is tested for being symmetric. |
static bool IG::Num::MatrixBase::IsSymmetric | ( | IMatrix | mat, |
double | relativeRMSTolerance | ||
) | [inline, static] |
Returns true if the specified matrix is symmetric within some tolerance, and false if not. If the matrix is null then false is returned.
mat | Matrix that is tested for being symmetric. |
relativeRMSTolerance | Tolerance on the ratio between RMS of differences between out of diagonal terms and their transposes and between RMS of out of diagonal terms, below which matrix is considered symmetric. |
Compares two matrices and returns -1 if the first matrix is smaller than the second one, 0 if matrices are equal, and 1 if the first matrix is greater. Matrix that is null is considered smaller than a matrix that is not null. Two null matrices are considered equal. Matrix with smaller dimension is considered smaller than a matrix with greater dimension. Matrices with equal dimensions ar compared by elements. The first element that is different decides which matrix is considered greater.
m1 | First matrix to be compared. |
m2 | Second matrix to be compared. |
This comparison does not have any mathematical meaning, it is just used for sotting of matrices in data structures.
static void IG::Num::MatrixBase::Resize | ( | ref IMatrix | mat, |
IMatrix | template, | ||
int | rowCount, | ||
int | columnCount | ||
) | [inline, static] |
Resizes, if necessary, the specified matrix according to the required dimensions. If the matrix is initially null then a new matrix is created. If in this case a template matrix is specified then the newly created matrix will be of the same type as that template matrix, because it is created by the GetNew() method on that matrix. If dimensions of the initial matrix do not match the required dim., then matrix is resized. If the specified matrix dimension is less or equal to 0 then matrix is resized with the same dimensions as those of the template matirx. If in this case the template matrix is null, an exception is thrown. WARNINGS: Components are NOT preserved and have in general undefined values after operation is performed. If matrix and template are both null then the type of nawly created matrix is Matrix.
mat | Matrix that is resized. |
template | Matrix that is taken as template (for type of a newly created matrix or for dimensions if they are not specified). |
rowCount | If greater than 0 then it specifies the number of rows to which matrix is resized. |
columnCount | If greater than 0 then it specifies the number of columns to which matrix is resized. |
static void IG::Num::MatrixBase::Resize | ( | ref IMatrix | mat, |
int | rowCount, | ||
int | columnCount | ||
) | [inline, static] |
Resizes, if necessary, the specified matrix according to the required dimensions. If the matrix is initially null then a new matrix (of type Matrix) is created. If dimensions of the initial matrix do not match the required dimensions, then matrix is resized. Components are NOT preserved and have in general undefined values after operation is performed. WARNING: If the matrix is initially null then the type of the newly created matrix is Matrix.
mat | VMatrix that is resized. |
rowCount | Dimension to which matrix is resized (if less than 1 then exception is thrown). |
columnCount | Dimension to which matrix is resized (if less than 1 then exception is thrown). |
Resizes, if necessary, the specified matrix according to the dimensions of the specified template matrix. If the matrix is initially null then a new matrix is created. In this case the newly created matrix will be of the same type as that template matrix, because it is created by the GetNew() method on that matrix. If dimensions of the initial matrix do not match the dimensions of the template matrix, then matrix is resized. If the template matrix is null, then an exception is thrown. WARNINGS: Components are NOT preserved and have in general undefined values after operation is performed. If matrix and template are null then the type of newly created matrix is Matrix.
Copies components of a matrix to another matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the copied matrix and result storage must match.
a | Original matrix. |
result | Matrix where copy will be stored. Dimensions must match dimensions of original. |
Copies components of a matrix to another matrix. WARNING: dimensions of the copied matrix and result storage must match.
a | Original matrix. |
result | Matrix where copy will be stored. Dimensions must match dimensions of original. |
Copies components of a matrix to another matrix. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix. |
result | Matrix where copy is stored. |
static void IG::Num::MatrixBase::CopyPlain | ( | MatrixBase_MathNetNumerics | a, |
IMatrix | result | ||
) | [inline, static] |
Copies components of a matrix to another matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the copied matrix and result storage must match.
a | Original matrix. |
result | Matrix where copy will be stored. Dimensions must match dimensions of original. |
static void IG::Num::MatrixBase::Copy | ( | MatrixBase_MathNetNumerics | a, |
IMatrix | result | ||
) | [inline, static] |
Copies components of a matrix to another matrix. WARNING: dimensions of the copied matrix and result storage must match.
a | Original matrix. |
result | Matrix where copy will be stored. Dimensions must match dimensions of original. |
static void IG::Num::MatrixBase::Copy | ( | MatrixBase_MathNetNumerics | a, |
ref IMatrix | result | ||
) | [inline, static] |
Copies components of a matrix to another matrix. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix. |
result | Matrix where copy is stored. |
static void IG::Num::MatrixBase::CopyPlain | ( | IMatrix | a, |
Matrix_MathNetNumercs | result | ||
) | [inline, static] |
Copies components of a matrix to another matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the copied matrix and result storage must match.
a | Original matrix. |
result | Matrix where copy will be stored. Dimensions must match dimensions of original. |
static void IG::Num::MatrixBase::Copy | ( | IMatrix | a, |
Matrix_MathNetNumercs | result | ||
) | [inline, static] |
Copies components of a matrix to another matrix. WARNING: dimensions of the copied matrix and result storage must match.
a | Original matrix. |
result | Matrix where copy will be stored. Dimensions must match dimensions of original. |
static void IG::Num::MatrixBase::Copy | ( | IMatrix | a, |
ref Matrix_MathNetNumercs | result | ||
) | [inline, static] |
Copies components of a matrix to another matrix. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix. |
result | Matrix where copy is stored. |
Stores a negative matrix of the operand in another matrix. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match.
a | Operand. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores a negative matrix of the operand in another matrix. Can be done in-place. WARNING: dimensions of the operand and result storage must match.
a | Operand. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores a negative matrix of the operand in another matrix. Can be done in-place. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix. |
result | Matrix where result of negation is be stored. |
Stores transpose of the operand in another matrix. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match.
a | Operand. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores transpose of the operand in another matrix. Can be done in-place. WARNING: dimensions of the operand and result storage must match.
a | Operand. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores transpose of the matrix operand in another matrix. Can be done in-place. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix. |
result | Matrix where result of negation is be stored. |
static void IG::Num::MatrixBase::SymmetrizePlain | ( | IMatrix | a, |
IMatrix | sym, | ||
IMatrix | antiSym | ||
) | [inline, static] |
Calculates symmetric and antisymmetric part of the specified matrix (symmetric part is stored in the first result argument but is calculated last, such that it overrides antisymmetric when both arguments point to the same matrix object). Can be done in-place.When both symmetric and antisymmetric result arguments point to the same matrix, symmetric part is stored in the matrix.This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match.WARNING: If this antiSym points to the same matrix object as sym then symmetric part is stored in this matrix (because it overrides antisymmetric part).
a | Matrix whose symmetric and antisymmetric part are calculated. |
sym | Matrix where symmetric part of a is stored. |
antiSym | Matrix where antisymmetric part of a is stored. |
WARNING: If this argument points to the same matrix object as sym then symmetric part is stored in this matrix (because it overrides antisymmetric part).
static void IG::Num::MatrixBase::Symmetrize | ( | IMatrix | a, |
IMatrix | sym, | ||
IMatrix | antiSym | ||
) | [inline, static] |
Calculates symmetric and antisymmetric part of the specified matrix (symmetric part is stored in the first result argument but is calculated last, such that it overrides antisymmetric when both arguments point to the same matrix object). Can be done in-place.When both symmetric and antisymmetric result arguments point to the same matrix, exception is thrown.Dimensions of the operand and result storage must match, otherwise exception is thrown.
a | Matrix whose symmetric and antisymmetric part are calculated. |
sym | Matrix where symmetric part of a is stored. |
antiSym | Matrix where antisymmetric part of a is stored. |
WARNING: If this argument points to the same matrix object as sym then exception is thrown.
static void IG::Num::MatrixBase::Symmetrize | ( | IMatrix | a, |
ref IMatrix | sym, | ||
ref IMatrix | antiSym | ||
) | [inline, static] |
Stores transpose of the matrix operand in another matrix. Can be done in-place. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix. |
result | Matrix where result of negation is be stored. |
Stores symmetric part of a square matrix operand in another matrix. Symmetrization is performed by averaging of non-diagonal terms and their transposed terms. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match.
a | Operand, must be a square matrix. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores symmetric part of a square matrix operand in another matrix. Symmetrization is performed by averaging of non-diagonal terms and their transposed terms. Can be done in-place. WARNING: dimensions of the operand and result storage must match.
a | Operand, must be a square matrix. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores symmetric part of a square matrix operand in another matrix. Symmetrization is performed by averaging of non-diagonal terms and their transposed terms. Can be done in-place. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix, must be a square matrix. |
result | Matrix where result of negation is be stored. |
static void IG::Num::MatrixBase::AntisymmetricPartPlain | ( | IMatrix | a, |
IMatrix | result | ||
) | [inline, static] |
Stores antisymmetric part of a square matrix operand in another matrix. Antisymmetrization is performed by subtracting non-diagonal terms and their transposed terms, division by 2 and storing result in one matrix element and its negative value in another element. Can be done in-place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of the operand and result storage must match.
a | Operand; must be a square matrix. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
Stores antisymmetric part of a square matrix operand in another matrix. Antisymmetrization is performed by subtracting non-diagonal terms and their transposed terms, division by 2 and storing result in one matrix element and its negative value in another element. Can be done in-place. WARNING: dimensions of the operand and result storage must match.
a | Operand, must be a square matrix. |
result | Matrix where result is stored. Dimensions must match dimensions of operand. |
static void IG::Num::MatrixBase::AntisymmetricPart | ( | IMatrix | a, |
ref IMatrix | result | ||
) | [inline, static] |
Stores antisymmetric part of a square matrix operand in another matrix. Antisymmetrization is performed by subtracting non-diagonal terms and their transposed terms, division by 2 and storing result in one matrix element and its negative value in another element. Can be done in-place. Resulting matrix is allocated or reallocated if necessary.
a | Original matrix, must be a square matrix. |
result | Matrix where result of negation is be stored. |
Sums two matrices and stores the result in the specified result matrix. Operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. Dimensions must match dimensions of operands. |
Sums two matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. Dimensions must match dimensions of operands. |
Sums two matrices and stores the result in the specified result matrix. Operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::SubtractPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
Subtracts two matrices and stores the result in the specified result matrix. Operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
Subtracts two matrices and stores the result in the specified result matrix. Operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Subtract | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
Subtracts two matrices and stores the result in the specified result matrix. Operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::ArrayMultiplyPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element multiplication. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayMultiply | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element multiplication. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayMultiply | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
Element-by-element multiplication. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::ArrayDividePlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element division. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayDivide | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element division. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayDivide | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
Element-by-element division. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::ArrayPowerPlain | ( | IMatrix | a, |
double | power, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element raise to power. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
power | Power to which elements of the matrix are raised. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayPower | ( | IMatrix | a, |
double | power, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element raise to power. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
power | Power to which elements of the matrix are raised. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayPower | ( | IMatrix | a, |
double | power, | ||
ref IMatrix | result | ||
) | [inline, static] |
Element-by-element raise to power. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated.
a | First operand. |
power | Power to which elements of the matrix are raised. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::ArrayMapPlain | ( | IMatrix | a, |
Converter< double, double > | mapping, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element mapping of an arbitrary function. This operation can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
mapping | Mapping applied to each element. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayMap | ( | IMatrix | a, |
Converter< double, double > | mapping, | ||
IMatrix | result | ||
) | [inline, static] |
Element-by-element mapping of an arbitrary function. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
mapping | Mapping applied to each element. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::ArrayMap | ( | IMatrix | a, |
Converter< double, double > | mapping, | ||
ref IMatrix | result | ||
) | [inline, static] |
Element-by-element mapping of an arbitrary function. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then teh result is re-allocated.
a | First operand. |
mapping | Mapping applied to each element. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B. Multiplies two matrices and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
R=A*B. Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Multiply | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A*B. Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyTranspMatPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B Calculates product of transposed matrix and a matrix, and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspMat | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspMat | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A^T*B Multiplies two matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiplyTranspMat | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A^T*B.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyMatTranspPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B^T. Multiplies a matrix by transpose of another matrix and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyMatTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B^T. Multiplies a matrix by transpose of another matrix and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyMatTransp | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A*B^T. Multiplies a matrix by transpose of another matrix and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiplyMatTransp | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A*B^T.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyTranspTranspPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B^T. Multiplies transposed matrix by another transposed matrix, and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B^T. Multiplies transposed matrix by another transposed matrix, and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspTransp | ( | IMatrix | a, |
IMatrix | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A^T*B^T. Multiplies transposed matrix by another transposed matrix, and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiplyTranspTransp | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A^T*B^T.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B*C. Multiplies three matrices and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Multiply | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B*C. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Multiply | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A*B*C. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiply3 | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A*B*C.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyTranspMatTranspPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B*C^T. Multiplies three matrices (transposed first argument, second argument, and transposed third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand, transpose of the first matrix factor. |
b | Second operand, the second matrix factor. |
c | Third operand, transpose of the third matrix factor. |
result | Matrix where the result is stored. Dimensions must be consistent with dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspMatTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B*C^T. Multiplies three matrices (transposed first argument, second argument, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspMatTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A^T*B*C^T. Multiplies three matrices (transposed first argument, second argument, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where result is stored. Allocated or reallocated if necessary. |
static bool IG::Num::MatrixBase::TestMultiplyTranspMatTransp | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A^T*B*C^T.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyTranspMatMatPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B*C. Multiplies three matrices (transposed first argument, second argument, and third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand, transpose of the first matrix factor. |
b | Second operand, the second matrix factor. |
c | Third operand, transpose of the third matrix factor. |
result | Matrix where the result is stored. Dimensions must be consistent with dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspMatMat | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B*C. Multiplies three matrices (transposed first argument, second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of all arguments must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspMatMat | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A^T*B*C. Multiplies three matrices (transposed first argument, second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must be consistent, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where result is stored. Allocated or reallocated if necessary. |
static bool IG::Num::MatrixBase::TestMultiplyTranspMatMat | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A^T*B*C.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyMatMatTranspPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B*C^T. Multiplies three matrices (first argumet, second argumet, and transposed third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyMatMatTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B*C^T. Multiplies three matrices (first argumet, second argumet, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyMatMatTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A*B*C^T. Multiplies three matrices (first argumet, second argumet, and transposed third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiplyMatMatTransp | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A*B*C^T.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyMatTranspMatPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B^T*C. Multiplies three matrices (first argument, transposed second argument, and third argument) and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyMatTranspMat | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A*B^T*C. Multiplies three matrices (first argument, transposed second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyMatTranspMat | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A*B^T*C. Multiplies three matrices (first argument, transposed second argument, and third argument) and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiplyMatTranspMat | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A*B^T*C.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyTranspTranspTranspPlain | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B^T*C^T. Multiplies three matrices and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspTranspTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
IMatrix | result | ||
) | [inline, static] |
R=A^T*B^T*C^T. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of matrices must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspTranspTransp | ( | IMatrix | a, |
IMatrix | b, | ||
IMatrix | c, | ||
ref IMatrix | result | ||
) | [inline, static] |
R=A^T*B^T*C^T. Multiplies three matrices and stores the result in the specified result matrix. WARNING: dimensions of operands must match, otherwise an exception is thrown. WARNING: This operation can not be performed in place. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
c | Third operand. |
result | Matrix where result is stored. |
static bool IG::Num::MatrixBase::TestMultiplyTranspTranspTransp | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static, private] |
Tests product A^T*B^T*C^T.
tolerance | Tolerance (on norm of the difference) for the test to pass |
printReports | Specifies whether to print reports or not. |
static void IG::Num::MatrixBase::MultiplyPlain | ( | IMatrix | a, |
IVector | b, | ||
IVector | result | ||
) | [inline, static] |
R=A*b. Multiplies a matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Vector where the result is stored. Dimensions must match dimensions of operands. |
R=A*b. Multiplies a matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Vector where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Multiply | ( | IMatrix | a, |
IVector | b, | ||
ref IVector | result | ||
) | [inline, static] |
R=A*b. Multiplies matrix by scalar and stores the result in the specified result matrix. Operation can not be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyTranspVecPlain | ( | IMatrix | a, |
IVector | b, | ||
IVector | result | ||
) | [inline, static] |
R=A^T*b. Multiplies a transposed matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Vector where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspVec | ( | IMatrix | a, |
IVector | b, | ||
IVector | result | ||
) | [inline, static] |
R=A^T*b. Multiplies a transposed matrix with a vector and stores the result in the specified result vector. Operation can not be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Vector where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyTranspVec | ( | IMatrix | a, |
IVector | b, | ||
ref IVector | result | ||
) | [inline, static] |
R=A^T*b. Multiplies transposed matrix by scalar and stores the result in the specified result matrix. Operation can not be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static double IG::Num::MatrixBase::MultiplyPlain | ( | IVector | left, |
IMatrix | a, | ||
IVector | right | ||
) | [inline, static] |
R=a^T*M*b. Left-multiplies a matrix with a vector (transposed), right multiplies the result vith another vector, and returns the final result. Can be performed in place. This is a plain version of the method that does not perform any consistency checks. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
<left>Left factor (vector as one row matrix).</left>
a | Matrix factor. |
right | Right factor (vector as one column matrix). |
static double IG::Num::MatrixBase::Multiply | ( | IVector | left, |
IMatrix | a, | ||
IVector | right | ||
) | [inline, static] |
R=a^T*M*b. Left-multiplies a matrix with a vector (transposed), right multiplies the result vith another vector, and returns the final result. Can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
<left>Left factor (vector as one row matrix).</left>
a | Matrix factor. |
right | Right factor (vector as one column matrix). |
static double IG::Num::MatrixBase::Multiply | ( | IVector | left, |
IMatrix | a, | ||
IVector | right, | ||
ref IVector | result | ||
) | [inline, static] |
R=a^T*M*b. Left-multiplies a matrix with a vector (transposed), right multiplies the result vith another vector, and returns the final result. Can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
<left>Left factor (vector as one row matrix).</left>
a | Matrix factor. |
right | Right factor (vector as one column matrix). |
static void IG::Num::MatrixBase::MultiplyPlain | ( | IMatrix | a, |
double | b, | ||
IMatrix | result | ||
) | [inline, static] |
Multiplies matrix by scalar and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
Multiplies matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Multiply | ( | IMatrix | a, |
double | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
Multiplies matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::DividePlain | ( | IMatrix | a, |
double | b, | ||
IMatrix | result | ||
) | [inline, static] |
Divides matrix by scalar and stores the result in the specified result matrix. This is a plain version of the method that does not perform any consistency checks. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
Divides matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
b | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::Divide | ( | IMatrix | a, |
double | b, | ||
ref IMatrix | result | ||
) | [inline, static] |
Divides matrix by scalar and stores the result in the specified result matrix. This operation can be performed in place. WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
b | Second operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyDiagonalPlain | ( | IVector | diag, |
IMatrix | a, | ||
IMatrix | result | ||
) | [inline, static] |
Left-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)*A This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
diag | First operand (a vector representing a diagonal matrix). |
a | First operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyDiagonal | ( | IVector | diag, |
IMatrix | a, | ||
IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)*A WARNING: dimensions of matrices must match, otherwise an exception is thrown.
diag | First operand (a vector representing a diagonal matrix). |
a | First operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyDiagonal | ( | IVector | diag, |
IMatrix | a, | ||
ref IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)*A WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
diag | First operand (a vector representing a diagonal matrix). |
a | First operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyInverseDiagonalPlain | ( | IVector | diag, |
IMatrix | a, | ||
IMatrix | result | ||
) | [inline, static] |
Left-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)^-1*A This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
diag | First operand (a vector representing a diagonal matrix). |
a | Second operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyInverseDiagonal | ( | IVector | diag, |
IMatrix | a, | ||
IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)^-1*A WARNING: dimensions of matrices must match, otherwise an exception is thrown.
diag | First operand (a vector representing a diagonal matrix). |
a | First operand. |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyInverseDiagonal | ( | IVector | diag, |
IMatrix | a, | ||
ref IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=diag(d)^-1*A WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
diag | First operand (a vector representing a diagonal matrix). |
a | First operand. |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyDiagonalPlain | ( | IMatrix | a, |
IVector | diag, | ||
IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d) This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
diag | Second operand (a vector representing a diagonal matrix). |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyDiagonal | ( | IMatrix | a, |
IVector | diag, | ||
IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d) WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
diag | Second operand (a vector representing a diagonal matrix). |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyDiagonal | ( | IMatrix | a, |
IVector | diag, | ||
ref IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d) WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
diag | Second operand (a vector representing a diagonal matrix). |
result | Matrix where result is stored. |
static void IG::Num::MatrixBase::MultiplyInverseDiagonalPlain | ( | IMatrix | a, |
IVector | diag, | ||
IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d)^-1 This is a plain version of the method that does not perform any consistency checks. The operation can be done in place. WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
diag | Second operand (a vector representing a diagonal matrix). |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyInverseDiagonal | ( | IMatrix | a, |
IVector | diag, | ||
IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d)^-1 WARNING: dimensions of matrices must match, otherwise an exception is thrown.
a | First operand. |
diag | Second operand (a vector representing a diagonal matrix). |
result | Matrix where the result is stored. Dimensions must match dimensions of operands. |
static void IG::Num::MatrixBase::MultiplyInverseDiagonal | ( | IMatrix | a, |
IVector | diag, | ||
ref IMatrix | result | ||
) | [inline, static] |
Right-multiplies a matrix with inverse of a diagonal matrix, and stores the result in the specified result matrix. R=A*diag(d)^-1 WARNING: dimensions of operands must match, otherwise an exception is thrown. If dimensions of the result do not match then the result is re-allocated.
a | First operand. |
diag | Second operand (a vector representing a diagonal matrix). |
result | Matrix where result is stored. |
static int IG::Num::MatrixBase::GetHashCode | ( | IMatrix | mat | ) | [inline, static] |
Returns hash code of the specified matrix.
mat | Matrix whose hath code is returned. |
This method should be used when overriding the GetHashCode() in vector classes, in order to unify calculation of hash code over different vector classes.
Returns true if the specified matrices are equal, false if not.
m1 | The first of the two matrices that are checked for equality. |
m2 | The second of the two matrices that are checked for equality. |
This method should be used when overriding the Equals() method in matrix classes, in order to unify the equality check over different matrix classes.
If both matrices are null or both have one dimension less than 1 and the other dimension the same then then they considered equal.
This method is consistent with the MatrixBase.Compare method, i.e. it returns the same value as the expression MatrixBase.Compare(m1 , m2 ==0).
static int IG::Num::MatrixBase::GetHashFunctionInt | ( | IMatrix | mat | ) | [inline, static] |
Returns an integer valued hash function of the specified matrix object. The returned value is calculated by the Util.GetHashFunctionInt method.
<mat>Matrix object whose hash function is calculated and returned.</vec>
static string IG::Num::MatrixBase::GetHashFunctionString | ( | IMatrix | mat | ) | [inline, static] |
Returns a string valued hash function of the specified matrix object. The returned value is calculated by the Util.GetHashFunctionString method.
<mat>Matrix object whose hash function is calculated and returned.</vec>
static string IG::Num::MatrixBase::ToStringNewlines | ( | IMatrix | mat | ) | [inline, static] |
Returns a string representation of the specified matrix with newlines inserted after each row. Rows and elements are printed in comma separated lists in curly brackets.
mat | Matrix whose string representation is returned. |
static string IG::Num::MatrixBase::ToStringNewlines | ( | IMatrix | mat, |
string | elementFormat | ||
) | [inline, static] |
Returns a string representation of the specified matrix with newlines inserted after each row, with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets.
mat | Matrix whose string representation is returned. |
elementFormat | Format specification for printing individual element. |
static string IG::Num::MatrixBase::ToString | ( | IMatrix | mat | ) | [inline, static] |
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.
mat | Matrix whose string representation is returned. |
static string IG::Num::MatrixBase::ToStringMath | ( | IMatrix | mat | ) | [inline, static] |
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.
mat | Matrix whose string representation is returned. |
static string IG::Num::MatrixBase::ToString | ( | IMatrix | mat, |
string | elementFormat | ||
) | [inline, static] |
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets.
mat | Matrix whose string representation is returned. |
elementFormat | Format specification for printing individual element. |
static string IG::Num::MatrixBase::ToStringMath | ( | IMatrix | mat, |
string | elementFormat | ||
) | [inline, static] |
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets.
mat | Matrix whose string representation is returned. |
elementFormat | Format specification for printing individual element. |
static void IG::Num::MatrixBase::SaveJson | ( | IMatrix | mat, |
string | filePath | ||
) | [inline, static] |
Saves (serializes) the specified matrix to the specified JSON file. File is owerwritten if it exists.
mat | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
static void IG::Num::MatrixBase::SaveJson | ( | IMatrix | mat, |
string | filePath, | ||
bool | append | ||
) | [inline, static] |
Saves (serializes) the specified matrix to the specified JSON file.
mat | Object that is saved to a file. |
filePath | Path to the file in which object is is saved. |
append | Specifies whether serialized data is appended at the end of the file in the case that the file already exists. |
static void IG::Num::MatrixBase::LoadJson | ( | string | filePath, |
ref IMatrix | matRestored | ||
) | [inline, static] |
Restores (deserializes) a matrix object from the specified file in JSON format.
filePath | File from which object data is restored. |
matRestored | Object that is restored by deserialization. |
override string IG::Num::MatrixBase::ToString | ( | ) | [inline] |
Returns string representation of the current matrix in the standard IGLib form. Rows and elements are printed in comma separated lists in curly brackets.
Implements IG::Num::IMatrix.
string IG::Num::MatrixBase::ToStringNewlines | ( | ) | [inline] |
Returns a string representation of this matrix with newlines inserted after each row. Rows and elements are printed in comma separated lists in curly brackets.
Implements IG::Num::IMatrix.
string IG::Num::MatrixBase::ToStringNewlines | ( | string | elementFormat | ) | [inline] |
Returns a string representation of this matrix with newlines inserted after each row, with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets.
elementFormat | Format specification for printing individual element. |
Implements IG::Num::IMatrix.
string IG::Num::MatrixBase::ToStringMath | ( | ) | [inline] |
Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.
Implements IG::Num::IMatrix.
string IG::Num::MatrixBase::ToString | ( | string | elementFormat | ) | [inline] |
Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix.
elementFormat | Format specification for printing individual element. |
Implements IG::Num::IMatrix.
string IG::Num::MatrixBase::ToStringMath | ( | string | elementFormat | ) | [inline] |
Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix.
elementFormat | Format specification for printing individual element. |
Implements IG::Num::IMatrix.
static MatrixBase IG::Num::MatrixBase::operator+ | ( | MatrixBase | m | ) | [inline, static] |
Unary plus, returns the operand.
static MatrixBase IG::Num::MatrixBase::operator- | ( | MatrixBase | m | ) | [inline, static] |
Unary negation, returns the negative operand.
static MatrixBase IG::Num::MatrixBase::operator+ | ( | MatrixBase | a, |
MatrixBase | b | ||
) | [inline, static] |
Matrix addition.
static MatrixBase IG::Num::MatrixBase::operator- | ( | MatrixBase | a, |
MatrixBase | b | ||
) | [inline, static] |
Matrix subtraction.
static MatrixBase IG::Num::MatrixBase::operator* | ( | MatrixBase | a, |
MatrixBase | b | ||
) | [inline, static] |
Product of two matrices.
static VectorBase IG::Num::MatrixBase::operator* | ( | MatrixBase | a, |
VectorBase | b | ||
) | [inline, static] |
Product of a matrix and a vector.
static MatrixBase IG::Num::MatrixBase::operator* | ( | MatrixBase | a, |
double | b | ||
) | [inline, static] |
Product of a matrix by a scalar.
static MatrixBase IG::Num::MatrixBase::operator* | ( | double | a, |
MatrixBase | b | ||
) | [inline, static] |
Product of a matrix by a scalar.
static MatrixBase IG::Num::MatrixBase::operator/ | ( | MatrixBase | a, |
double | b | ||
) | [inline, static] |
Matrix subtraction.
static bool IG::Num::MatrixBase::CheckTestResult | ( | IMatrix | result, |
IMatrix | referenceResult, | ||
double | tolerance, | ||
bool | printReports | ||
) | [inline, static, protected] |
Checks whether the difference between matrix result of the tested operation and some reference result is within the specified tolerance.
result | Matrix that is the result of the tested operation. |
referenceResult | Reference result obtained in a different way. |
tolerance | Tolerance on norm of the difference. Must be greater than 0. If norm is less or equal to the tolerance then the test passes. |
printReports | If true then short reports are printed to console. |
static bool IG::Num::MatrixBase::CheckTestResult | ( | IVector | result, |
IVector | referenceResult, | ||
double | tolerance, | ||
bool | printReports | ||
) | [inline, static, protected] |
Checks whether the difference between matrix result of the tested operation and some reference result is within the specified tolerance.
result | Matrix that is the result of the tested operation. |
referenceResult | Reference result obtained in a different way. |
tolerance | Tolerance on norm of the difference. Must be greater than 0. If norm is less or equal to the tolerance then the test passes. |
printReports | If true then short reports are printed to console. |
static bool IG::Num::MatrixBase::TestMatrixProducts | ( | bool | printReports | ) | [inline, static] |
Tests various matrix and vector products with fixed tolerance of 1.0E-6.
printReports | Specifies whether to print short reports to console or not. |
static bool IG::Num::MatrixBase::TestMatrixProducts | ( | double | tolerance | ) | [inline, static] |
Tests various matrix and vector products, without printing reports.
tolerance | Tolerance for difference between product and test expression below which any individual test passes. Must be greater than 0. |
static bool IG::Num::MatrixBase::TestMatrixProducts | ( | ) | [inline, static] |
Tests various matrix and vector products with fixed tolerance of 1.0E-6 and without printing reports.
static bool IG::Num::MatrixBase::TestMatrixProducts | ( | double | tolerance, |
bool | printReports | ||
) | [inline, static] |
Tests various matrix and vector products.
tolerance | Tolerance for difference between product and test expression below which any individual test passes. Must be greater than 0. |
printReports | Specifies whether to print short reports to console or not. |
static void IG::Num::MatrixBase::TestStaticMethodCommon | ( | ) | [inline, static] |
A test method, just prints some output.
static void IG::Num::MatrixBase::TestStaticMethodSpecific | ( | ) | [inline, static] |
A test method, just prints some output.
Reimplemented in IG::Num::Matrix.
MatrixStore IG::Num::MatrixBase::_matrixStore [static, private] |
abstract int IG::Num::MatrixBase::RowCount [get] |
Gets the number of rows of the current matrix.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
abstract int IG::Num::MatrixBase::ColumnCount [get] |
Gets the number of columns of the current matrix.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
abstract double IG::Num::MatrixBase::this[int i, int j] [get, set] |
Gets or sets the specified component of the current matrix.
i | Row number of the component. |
j | Column number of the component. |
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
virtual IMatrix IG::Num::MatrixBase::T [get] |
Returns a new matrix that is transpose of the current matrix.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
virtual double IG::Num::MatrixBase::Trace [get] |
Gets matrix trace (sum of diagonal terms).
Reimplemented in IG::Num::Matrix2d, and IG::Num::Matrix3d.
virtual double IG::Num::MatrixBase::NormForbenius [get] |
Gets Forbenious (or Euclidean) norm of the matrix - square root of sum of squares of elements.
Reimplemented in IG::Num::Matrix2d, and IG::Num::Matrix3d.
virtual double IG::Num::MatrixBase::NormEuclidean [get] |
Gets Forbenious (or Euclidean) norm of the matrix - square root of sum of squares of elements.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
virtual double IG::Num::MatrixBase::Norm [get] |
Gets Forbenious (or Euclidean) norm of the matrix - square root of sum of squares of elements.
Reimplemented in IG::Num::Matrix2d, IG::Num::Matrix3d, and IG::Num::Matrix.
MatrixStore IG::Num::MatrixBase::MatrixStore [static, get] |
Gets the matrix store for recycling auxiliary matrices. Matrix store is created only once, on the first access.