Click or drag to resize

MatrixT Class

Defines the base class for Matrix classes.
Inheritance Hierarchy

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
[SerializableAttribute]
public abstract class Matrix<T> : IFormattable, 
	IEquatable<Matrix<T>>, ICloneable, IMatrix<T>, IROMatrix<T>
where T : struct, new(), IEquatable<T>, IFormattable

Type Parameters

T
Supported data types are double, single, Altaxo.Calc.LinearAlgebra.Complex, and Altaxo.Calc.LinearAlgebra.Complex32.

The MatrixT type exposes the following members.

Constructors
 NameDescription
Protected methodMatrixT Initializes a new instance of the Matrix class.
Top
Properties
 NameDescription
Public propertyColumnCount Gets the number of columns.
Public propertyItem Gets or sets the value at the given row and column, with range checking.
Public propertyRowCount Gets the number of rows.
Public propertyStorage Gets the raw matrix data storage.
Top
Methods
 NameDescription
Public methodStatic memberAbs Computes the absolute value of a matrix pointwise
Public methodStatic memberAcos Computes the acos of a matrix pointwise
Public methodAdd(T) Adds a scalar to each element of the matrix.
Public methodAdd(MatrixT) Adds another matrix to this matrix.
Public methodAdd(T, MatrixT) Adds a scalar to each element of the matrix and stores the result in the result matrix.
Public methodAdd(MatrixT, MatrixT) Adds another matrix to this matrix.
Public methodAppend(MatrixT) Concatenates this matrix with the given matrix.
Public methodAppend(MatrixT, MatrixT) Concatenates this matrix with the given matrix and places the result into the result matrix.
Public methodAsArray Returns the internal multidimensional array of this matrix if, and only if, this matrix is stored by such an array internally. Otherwise returns null. Changes to the returned array and the matrix will affect each other. Use ToArray instead if you always need an independent array.
Public methodAsColumnArrays Returns the internal column arrays of this matrix if, and only if, this matrix is stored by such arrays internally. Otherwise returns null. Changes to the returned arrays and the matrix will affect each other. Use ToColumnArrays instead if you always need an independent array.
Public methodCode exampleAsColumnMajorArray Returns the internal column by column (column major) array of this matrix if, and only if, this matrix is stored by such arrays internally. Otherwise returns null. Changes to the returned arrays and the matrix will affect each other. Use ToColumnMajorArray instead if you always need an independent array.
Public methodStatic memberAsin Computes the asin of a matrix pointwise
Public methodAsRowArrays Returns the internal row arrays of this matrix if, and only if, this matrix is stored by such arrays internally. Otherwise returns null. Changes to the returned arrays and the matrix will affect each other. Use ToRowArrays instead if you always need an independent array.
Public methodCode exampleAsRowMajorArray Returns the internal row by row (row major) array of this matrix if, and only if, this matrix is stored by such arrays internally. Otherwise returns null. Changes to the returned arrays and the matrix will affect each other. Use ToRowMajorArray instead if you always need an independent array.
Public methodAt(Int32, Int32) Retrieves the requested element without range checking.
Public methodAt(Int32, Int32, T) Sets the value of the given element without range checking.
Public methodStatic memberAtan Computes the atan of a matrix pointwise
Public methodStatic memberCeiling Computes the ceiling of a matrix pointwise
Public methodCholesky Computes the Cholesky decomposition for a matrix.
Public methodClear Sets all values to zero.
Public methodClearColumn Sets all values of a column to zero.
Public methodClearColumns Sets all values for all of the chosen columns to zero.
Public methodClearRow Sets all values of a row to zero.
Public methodClearRows Sets all values for all of the chosen rows to zero.
Public methodClearSubMatrix Sets all values of a sub-matrix to zero.
Public methodClone Creates a clone of this instance.
Public methodCoerceZero(Double) Set all values whose absolute value is smaller than the threshold to zero, in-place.
Public methodCoerceZero(FuncT, Boolean) Set all values that meet the predicate to zero, in-place.
Public methodColumn(Int32) Copies a column into a new Vector>.
Public methodColumn(Int32, VectorT) Copies a column into to the given Vector.
Public methodColumn(Int32, Int32, Int32) Copies the requested column elements into a new Vector.
Public methodColumn(Int32, Int32, Int32, VectorT) Copies the requested column elements into the given vector.
Public methodColumnAbsoluteSums Calculates the absolute value sum of each column vector.
Public methodColumnNorms Calculates the p-norms of all column vectors. Typical values for p are 1.0 (L1, Manhattan norm), 2.0 (L2, Euclidean norm) and positive infinity (infinity norm)
Public methodColumnSums Calculates the value sum of each column vector.
Public methodConditionNumberCalculates the condition number of this matrix.
Public methodConjugate Complex conjugate each element of this matrix.
Public methodConjugate(MatrixT) Complex conjugate each element of this matrix and place the results into the result matrix.
Public methodConjugateTranspose Returns the conjugate transpose of this matrix.
Public methodConjugateTranspose(MatrixT) Puts the conjugate transpose of this matrix into the result matrix.
Public methodConjugateTransposeAndMultiply(MatrixT) Multiplies this matrix with the conjugate transpose of another matrix and returns the result.
Public methodConjugateTransposeAndMultiply(MatrixT, MatrixT) Multiplies this matrix with the conjugate transpose of another matrix and places the results into the result matrix.
Public methodConjugateTransposeThisAndMultiply(MatrixT) Multiplies the conjugate transpose of this matrix with another matrix and returns the result.
Public methodConjugateTransposeThisAndMultiply(VectorT) Multiplies the conjugate transpose of this matrix by a vector and returns the result.
Public methodConjugateTransposeThisAndMultiply(MatrixT, MatrixT) Multiplies the conjugate transpose of this matrix with another matrix and places the results into the result matrix.
Public methodConjugateTransposeThisAndMultiply(VectorT, VectorT) Multiplies the conjugate transpose of this matrix with a vector and places the results into the result vector.
Public methodCopyTo Copies the elements of this matrix to the given matrix.
Public methodStatic memberCos Computes the cos of a matrix pointwise
Public methodStatic memberCosh Computes the cosh of a matrix pointwise
Public methodDeterminantComputes the determinant of this matrix.
Public methodDiagonal Returns the elements of the diagonal in a Vector.
Public methodDiagonal(VectorT) Returns the elements of the diagonal in a Vector.
Public methodDiagonalStack(MatrixT) Diagonally stacks his matrix on top of the given matrix. The new matrix is a M-by-N matrix, where M = this.Rows + lower.Rows and N = this.Columns + lower.Columns. The values of off the off diagonal matrices/blocks are set to zero.
Public methodDiagonalStack(MatrixT, MatrixT) Diagonally stacks his matrix on top of the given matrix and places the combined matrix into the result matrix.
Public methodDivide(T) Divides each element of this matrix with a scalar.
Public methodDivide(T, MatrixT) Divides each element of the matrix by a scalar and places results into the result matrix.
Public methodDivideByThis(T) Divides a scalar by each element of the matrix.
Public methodDivideByThis(T, MatrixT) Divides a scalar by each element of the matrix and places results into the result matrix.
Protected methodDoAdd(T, MatrixT) Add a scalar to each element of the matrix and stores the result in the result vector.
Protected methodDoAdd(MatrixT, MatrixT) Adds another matrix to this matrix.
Protected methodDoConjugate Complex conjugates each element of this matrix and place the results into the result matrix.
Protected methodDoConjugateTransposeAndMultiply Multiplies this matrix with the conjugate transpose of another matrix and places the results into the result matrix.
Protected methodDoConjugateTransposeThisAndMultiply(MatrixT, MatrixT) Multiplies the transpose of this matrix with another matrix and places the results into the result matrix.
Protected methodDoConjugateTransposeThisAndMultiply(VectorT, VectorT) Multiplies the conjugate transpose of this matrix with a vector and places the results into the result vector.
Protected methodDoDivide Divides each element of the matrix by a scalar and places results into the result matrix.
Protected methodDoDivideByThis Divides a scalar by each element of the matrix and stores the result in the result matrix.
Protected methodDoLeftMultiply Left multiply a matrix with a vector ( = vector * matrix ) and place the result in the result vector.
Protected methodDoModulus Computes the canonical modulus, where the result has the sign of the divisor, for the given divisor each element of the matrix.
Protected methodDoModulusByThis Computes the canonical modulus, where the result has the sign of the divisor, for the given dividend for each element of the matrix.
Protected methodDoMultiply(T, MatrixT) Multiplies each element of the matrix by a scalar and places results into the result matrix.
Protected methodDoMultiply(MatrixT, MatrixT) Multiplies this matrix with another matrix and places the results into the result matrix.
Protected methodDoMultiply(VectorT, VectorT) Multiplies this matrix with a vector and places the results into the result vector.
Protected methodDoNegate Negate each element of this matrix and place the results into the result matrix.
Protected methodDoPointwiseAbs 
Protected methodDoPointwiseAbsoluteMaximum(T, MatrixT) 
Protected methodDoPointwiseAbsoluteMaximum(MatrixT, MatrixT) 
Protected methodDoPointwiseAbsoluteMinimum(T, MatrixT) 
Protected methodDoPointwiseAbsoluteMinimum(MatrixT, MatrixT) 
Protected methodDoPointwiseAcos 
Protected methodDoPointwiseAsin 
Protected methodDoPointwiseAtan 
Protected methodDoPointwiseAtan2 
Protected methodDoPointwiseCeiling 
Protected methodDoPointwiseCos 
Protected methodDoPointwiseCosh 
Protected methodDoPointwiseDivide Pointwise divide this matrix by another matrix and stores the result into the result matrix.
Protected methodDoPointwiseExp Pointwise applies the exponential function to each value and stores the result into the result matrix.
Protected methodDoPointwiseFloor 
Protected methodDoPointwiseLog Pointwise applies the natural logarithm function to each value and stores the result into the result matrix.
Protected methodDoPointwiseLog10 
Protected methodDoPointwiseMaximum(T, MatrixT) 
Protected methodDoPointwiseMaximum(MatrixT, MatrixT) 
Protected methodDoPointwiseMinimum(T, MatrixT) 
Protected methodDoPointwiseMinimum(MatrixT, MatrixT) 
Protected methodDoPointwiseModulus Pointwise canonical modulus, where the result has the sign of the divisor, of this matrix with another matrix and stores the result into the result matrix.
Protected methodDoPointwiseMultiply Pointwise multiplies this matrix with another matrix and stores the result into the result matrix.
Protected methodDoPointwisePower(T, MatrixT) Pointwise raise this matrix to an exponent and store the result into the result matrix.
Protected methodDoPointwisePower(MatrixT, MatrixT) Pointwise raise this matrix to an exponent matrix and store the result into the result matrix.
Protected methodDoPointwiseRemainder Pointwise remainder (% operator), where the result has the sign of the dividend, of this matrix with another matrix and stores the result into the result matrix.
Protected methodDoPointwiseRound 
Protected methodDoPointwiseSign 
Protected methodDoPointwiseSin 
Protected methodDoPointwiseSinh 
Protected methodDoPointwiseSqrt 
Protected methodDoPointwiseTan 
Protected methodDoPointwiseTanh 
Protected methodDoRemainder Computes the remainder (% operator), where the result has the sign of the dividend, for the given divisor each element of the matrix.
Protected methodDoRemainderByThis Computes the remainder (% operator), where the result has the sign of the dividend, for the given dividend for each element of the matrix.
Protected methodDoSubtract(T, MatrixT) Subtracts a scalar from each element of the matrix and stores the result in the result matrix.
Protected methodDoSubtract(MatrixT, MatrixT) Subtracts another matrix from this matrix.
Protected methodDoSubtractFrom Subtracts each element of the matrix from a scalar and stores the result in the result matrix.
Protected methodDoTransposeAndMultiply Multiplies this matrix with the transpose of another matrix and places the results into the result matrix.
Protected methodDoTransposeThisAndMultiply(MatrixT, MatrixT) Multiplies the transpose of this matrix with another matrix and places the results into the result matrix.
Protected methodDoTransposeThisAndMultiply(VectorT, VectorT) Multiplies the transpose of this matrix with a vector and places the results into the result vector.
Public methodEnumerate Returns an IEnumerable that can be used to iterate through all values of the matrix.
Public methodEnumerate(Zeros) Returns an IEnumerable that can be used to iterate through all values of the matrix.
Public methodEnumerateColumns Returns an IEnumerable that can be used to iterate through all columns of the matrix.
Public methodEnumerateColumns(Int32, Int32) Returns an IEnumerable that can be used to iterate through a subset of all columns of the matrix.
Public methodEnumerateColumnsIndexed Returns an IEnumerable that can be used to iterate through all columns of the matrix and their index.
Public methodEnumerateColumnsIndexed(Int32, Int32) Returns an IEnumerable that can be used to iterate through a subset of all columns of the matrix and their index.
Public methodEnumerateIndexed Returns an IEnumerable that can be used to iterate through all values of the matrix and their index.
Public methodEnumerateIndexed(Zeros) Returns an IEnumerable that can be used to iterate through all values of the matrix and their index.
Public methodEnumerateRows Returns an IEnumerable that can be used to iterate through all rows of the matrix.
Public methodEnumerateRows(Int32, Int32) Returns an IEnumerable that can be used to iterate through a subset of all rows of the matrix.
Public methodEnumerateRowsIndexed Returns an IEnumerable that can be used to iterate through all rows of the matrix and their index.
Public methodEnumerateRowsIndexed(Int32, Int32) Returns an IEnumerable that can be used to iterate through a subset of all rows of the matrix and their index.
Public methodEquals(MatrixT) Indicates whether the current object is equal to another object of the same type.
Public methodEquals(Object) Determines whether the specified Object is equal to this instance.
(Overrides ObjectEquals(Object))
Public methodEvd Computes the EVD decomposition for a matrix.
Public methodExists Returns true if at least one element satisfies a predicate. Zero elements may be skipped on sparse data structures if allowed (default).
Public methodExists2TOther Returns true if at least one element pairs of two matrices of the same size satisfies a predicate. Zero elements may be skipped on sparse data structures if allowed (default).
Public methodStatic memberExp Computes the exponential of a matrix pointwise
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFind Returns a tuple with the index and value of the first element satisfying a predicate, or null if none is found. Zero elements may be skipped on sparse data structures if allowed (default).
Public methodFind2TOther Returns a tuple with the index and values of the first element pair of two matrices of the same size satisfying a predicate, or null if none is found. Zero elements may be skipped on sparse data structures if allowed (default).
Public methodStatic memberFloor Computes the floor of a matrix pointwise
Public methodFold2TOther, TState Applies a function to update the status with each value pair of two matrices and returns the resulting status.
Public methodFoldByColumnTU For each column, applies a function f to each element of the column, threading an accumulator argument through the computation. Returns an array with the resulting accumulator states for each column.
Public methodFoldByRowTU For each row, applies a function f to each element of the row, threading an accumulator argument through the computation. Returns an array with the resulting accumulator states for each row.
Public methodFoldColumnsTU Applies a function f to each column vector, threading an accumulator vector argument through the computation. Returns the resulting accumulator vector.
Public methodFoldRowsTU Applies a function f to each row vector, threading an accumulator vector argument through the computation. Returns the resulting accumulator vector.
Public methodForAll Returns true if all elements satisfy a predicate. Zero elements may be skipped on sparse data structures if allowed (default).
Public methodForAll2TOther Returns true if all element pairs of two matrices of the same size satisfy a predicate. Zero elements may be skipped on sparse data structures if allowed (default).
Public methodFrobeniusNormCalculates the entry-wise Frobenius norm of this matrix.
Public methodGetHashCode Returns a hash code for this instance.
(Overrides ObjectGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGramSchmidt Computes the QR decomposition for a matrix using Modified Gram-Schmidt Orthogonalization.
Public methodInfinityNormCalculates the induced infinity norm of this matrix.
Public methodInsertColumn Creates a new matrix and inserts the given column at the given index.
Public methodInsertRow Creates a new matrix and inserts the given row at the given index.
Public methodInverseComputes the inverse of this matrix.
Public methodIsHermitian Evaluates whether this matrix is Hermitian (conjugate symmetric).
Public methodIsSymmetric Evaluates whether this matrix is symmetric.
Public methodKernel Computes an orthonormal basis for the null space of this matrix, also known as the kernel of the corresponding matrix transformation.
Public methodKroneckerProduct(MatrixT) Computes the Kronecker product of this matrix with the given matrix. The new matrix is M-by-N with M = this.Rows * lower.Rows and N = this.Columns * lower.Columns.
Public methodKroneckerProduct(MatrixT, MatrixT) Computes the Kronecker product of this matrix with the given matrix. The new matrix is M-by-N with M = this.Rows * lower.Rows and N = this.Columns * lower.Columns.
Public methodL1NormCalculates the induced L1 norm of this matrix.
Public methodL2NormCalculates the induced L2 norm of the matrix.
Public methodLeftMultiply(VectorT) Left multiply a matrix with a vector ( = vector * matrix ).
Public methodLeftMultiply(VectorT, VectorT) Left multiply a matrix with a vector ( = vector * matrix ) and place the result in the result vector.
Public methodStatic memberLog Computes the log of a matrix pointwise
Public methodStatic memberLog10 Computes the log10 of a matrix pointwise
Public methodLowerTriangle Returns a new matrix containing the lower triangle of this matrix.
Public methodLowerTriangle(MatrixT) Puts the lower triangle of this matrix into the result matrix.
Public methodLU Computes the LU decomposition for a matrix.
Public methodMap(FuncT, T, MatrixT, Zeros) Applies a function to each value of this matrix and replaces the value in the result matrix. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMapTU(FuncT, TU, Zeros) Applies a function to each value of this matrix and returns the results as a new matrix. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMap2(FuncT, T, T, MatrixT, Zeros) Applies a function to each value pair of two matrices and returns the results as a new vector.
Public methodMap2(FuncT, T, T, MatrixT, MatrixT, Zeros) Applies a function to each value pair of two matrices and replaces the value in the result vector.
Public methodMapConvertTU Applies a function to each value of this matrix and replaces the value in the result matrix. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMapIndexed(FuncInt32, Int32, T, T, MatrixT, Zeros) Applies a function to each value of this matrix and replaces the value in the result matrix. The index of each value (zero-based) is passed as first argument to the function. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMapIndexedTU(FuncInt32, Int32, T, TU, Zeros) Applies a function to each value of this matrix and returns the results as a new matrix. The index of each value (zero-based) is passed as first argument to the function. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMapIndexedConvertTU Applies a function to each value of this matrix and replaces the value in the result matrix. The index of each value (zero-based) is passed as first argument to the function. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMapIndexedInplace Applies a function to each value of this matrix and replaces the value with its result. The row and column indices of each value (zero-based) are passed as first arguments to the function. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Public methodMapInplace Applies a function to each value of this matrix and replaces the value with its result. If forceMapZero is not set to true, zero values may or may not be skipped depending on the actual data storage implementation (relevant mostly for sparse matrices).
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodModulus(T) Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
Public methodModulus(T, MatrixT) Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
Public methodModulusByThis(T) Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
Public methodModulusByThis(T, MatrixT) Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
Public methodMultiply(T) Multiplies each element of this matrix with a scalar.
Public methodMultiply(MatrixT) Multiplies this matrix with another matrix and returns the result.
Public methodMultiply(VectorT) Multiplies this matrix by a vector and returns the result.
Public methodMultiply(T, MatrixT) Multiplies each element of the matrix by a scalar and places results into the result matrix.
Public methodMultiply(MatrixT, MatrixT) Multiplies this matrix with another matrix and places the results into the result matrix.
Public methodMultiply(VectorT, VectorT) Multiplies this matrix with a vector and places the results into the result vector.
Public methodNegate Negate each element of this matrix.
Public methodNegate(MatrixT) Negate each element of this matrix and place the results into the result matrix.
Public methodNormalizeColumns Normalizes all column vectors to a unit p-norm. Typical values for p are 1.0 (L1, Manhattan norm), 2.0 (L2, Euclidean norm) and positive infinity (infinity norm)
Public methodNormalizeRows Normalizes all row vectors to a unit p-norm. Typical values for p are 1.0 (L1, Manhattan norm), 2.0 (L2, Euclidean norm) and positive infinity (infinity norm)
Public methodNullity Calculates the nullity of the matrix.
Public methodPermuteColumns Permute the columns of a matrix according to a permutation.
Public methodPermuteRows Permute the rows of a matrix according to a permutation.
Public methodPointwiseAbs Pointwise applies the abs function to each value
Public methodPointwiseAbs(MatrixT) Pointwise applies the abs function to each value
Public methodPointwiseAbsoluteMaximum(T) Pointwise applies the absolute maximum with a scalar to each value.
Public methodPointwiseAbsoluteMaximum(MatrixT) Pointwise applies the absolute maximum with the values of another matrix to each value.
Public methodPointwiseAbsoluteMaximum(T, MatrixT) Pointwise applies the absolute maximum with a scalar to each value.
Public methodPointwiseAbsoluteMaximum(MatrixT, MatrixT) Pointwise applies the absolute maximum with the values of another matrix to each value.
Public methodPointwiseAbsoluteMinimum(T) Pointwise applies the absolute minimum with a scalar to each value.
Public methodPointwiseAbsoluteMinimum(MatrixT) Pointwise applies the absolute minimum with the values of another matrix to each value.
Public methodPointwiseAbsoluteMinimum(T, MatrixT) Pointwise applies the absolute minimum with a scalar to each value.
Public methodPointwiseAbsoluteMinimum(MatrixT, MatrixT) Pointwise applies the absolute minimum with the values of another matrix to each value.
Public methodPointwiseAcos Pointwise applies the acos function to each value
Public methodPointwiseAcos(MatrixT) Pointwise applies the acos function to each value
Public methodPointwiseAsin Pointwise applies the asin function to each value
Public methodPointwiseAsin(MatrixT) Pointwise applies the asin function to each value
Public methodPointwiseAtan Pointwise applies the atan function to each value
Public methodPointwiseAtan(MatrixT) Pointwise applies the atan function to each value
Public methodPointwiseAtan2(MatrixT) Pointwise applies the atan2 function to each value of the current matrix and a given other matrix being the 'x' of atan2 and the 'this' matrix being the 'y'
Public methodPointwiseAtan2(MatrixT, MatrixT) Pointwise applies the atan2 function to each value of the current matrix and a given other matrix being the 'x' of atan2 and the 'this' matrix being the 'y'
Protected methodPointwiseBinary(ActionMatrixT, MatrixT, MatrixT) Helper function to apply a binary function which takes two matrices and modifies the latter in place. A copy of the "this" matrix is first made and then passed to f together with the other matrix. The copy is then returned as the result
Protected methodPointwiseBinary(ActionMatrixT, MatrixT, MatrixT, MatrixT) Helper function to apply a binary function which takes two matrices and modifies the second one in place
Public methodPointwiseCeiling Pointwise applies the ceiling function to each value
Public methodPointwiseCeiling(MatrixT) Pointwise applies the ceiling function to each value
Public methodPointwiseCos Pointwise applies the cos function to each value
Public methodPointwiseCos(MatrixT) Pointwise applies the cos function to each value
Public methodPointwiseCosh Pointwise applies the cosh function to each value
Public methodPointwiseCosh(MatrixT) Pointwise applies the cosh function to each value
Public methodPointwiseDivide(MatrixT) Pointwise divide this matrix by another matrix.
Public methodPointwiseDivide(MatrixT, MatrixT) Pointwise divide this matrix by another matrix and stores the result into the result matrix.
Public methodPointwiseExp Pointwise applies the exponent function to each value.
Public methodPointwiseExp(MatrixT) Pointwise applies the exponent function to each value.
Public methodPointwiseFloor Pointwise applies the floor function to each value
Public methodPointwiseFloor(MatrixT) Pointwise applies the floor function to each value
Public methodPointwiseLog Pointwise applies the natural logarithm function to each value.
Public methodPointwiseLog(MatrixT) Pointwise applies the natural logarithm function to each value.
Public methodPointwiseLog10 Pointwise applies the log10 function to each value
Public methodPointwiseLog10(MatrixT) Pointwise applies the log10 function to each value
Public methodPointwiseMaximum(T) Pointwise applies the maximum with a scalar to each value.
Public methodPointwiseMaximum(MatrixT) Pointwise applies the maximum with the values of another matrix to each value.
Public methodPointwiseMaximum(T, MatrixT) Pointwise applies the maximum with a scalar to each value.
Public methodPointwiseMaximum(MatrixT, MatrixT) Pointwise applies the maximum with the values of another matrix to each value.
Public methodPointwiseMinimum(T) Pointwise applies the minimum with a scalar to each value.
Public methodPointwiseMinimum(MatrixT) Pointwise applies the minimum with the values of another matrix to each value.
Public methodPointwiseMinimum(T, MatrixT) Pointwise applies the minimum with a scalar to each value.
Public methodPointwiseMinimum(MatrixT, MatrixT) Pointwise applies the minimum with the values of another matrix to each value.
Public methodPointwiseModulus(MatrixT) Pointwise canonical modulus, where the result has the sign of the divisor, of this matrix by another matrix.
Public methodPointwiseModulus(MatrixT, MatrixT) Pointwise canonical modulus, where the result has the sign of the divisor, of this matrix by another matrix and stores the result into the result matrix.
Public methodPointwiseMultiply(MatrixT) Pointwise multiplies this matrix with another matrix.
Public methodPointwiseMultiply(MatrixT, MatrixT) Pointwise multiplies this matrix with another matrix and stores the result into the result matrix.
Public methodPointwisePower(T) Pointwise raise this matrix to an exponent and store the result into the result matrix.
Public methodPointwisePower(MatrixT) Pointwise raise this matrix to an exponent and store the result into the result matrix.
Public methodPointwisePower(T, MatrixT) Pointwise raise this matrix to an exponent.
Public methodPointwisePower(MatrixT, MatrixT) Pointwise raise this matrix to an exponent.
Public methodPointwiseRemainder(MatrixT) Pointwise remainder (% operator), where the result has the sign of the dividend, of this matrix by another matrix.
Public methodPointwiseRemainder(MatrixT, MatrixT) Pointwise remainder (% operator), where the result has the sign of the dividend, of this matrix by another matrix and stores the result into the result matrix.
Public methodPointwiseRound Pointwise applies the round function to each value
Public methodPointwiseRound(MatrixT) Pointwise applies the round function to each value
Public methodPointwiseSign Pointwise applies the sign function to each value
Public methodPointwiseSign(MatrixT) Pointwise applies the sign function to each value
Public methodPointwiseSin Pointwise applies the sin function to each value
Public methodPointwiseSin(MatrixT) Pointwise applies the sin function to each value
Public methodPointwiseSinh Pointwise applies the sinh function to each value
Public methodPointwiseSinh(MatrixT) Pointwise applies the sinh function to each value
Public methodPointwiseSqrt Pointwise applies the sqrt function to each value
Public methodPointwiseSqrt(MatrixT) Pointwise applies the sqrt function to each value
Public methodPointwiseTan Pointwise applies the tan function to each value
Public methodPointwiseTan(MatrixT) Pointwise applies the tan function to each value
Public methodPointwiseTanh Pointwise applies the tanh function to each value
Public methodPointwiseTanh(MatrixT) Pointwise applies the tanh function to each value
Protected methodPointwiseUnary(ActionMatrixT) Helper function to apply a unary function to a matrix. The function f modifies the matrix given to it in place. Before its called, a copy of the 'this' matrix is first created, then passed to f. The copy is then returned as the result
Protected methodPointwiseUnary(ActionMatrixT, MatrixT) Helper function to apply a unary function which modifies a matrix in place.
Public methodPower(Int32) Multiplies this square matrix with another matrix and returns the result.
Public methodPower(Int32, MatrixT) Raises this square matrix to a positive integer exponent and places the results into the result matrix.
Public methodPseudoInverseComputes the Moore-Penrose Pseudo-Inverse of this matrix.
Public methodQR Computes the QR decomposition for a matrix.
Public methodRange Computes an orthonormal basis for the column space of this matrix, also known as the range or image of the corresponding matrix transformation.
Public methodRank Calculates the rank of the matrix.
Public methodReduceColumns Reduces all column vectors by applying a function between two of them, until only a single vector is left.
Public methodReduceRows Reduces all row vectors by applying a function between two of them, until only a single vector is left.
Public methodRemainder(T) Computes the remainder (matrix % divisor), where the result has the sign of the dividend, for each element of the matrix.
Public methodRemainder(T, MatrixT) Computes the remainder (matrix % divisor), where the result has the sign of the dividend, for each element of the matrix.
Public methodRemainderByThis(T) Computes the remainder (dividend % matrix), where the result has the sign of the dividend, for each element of the matrix.
Public methodRemainderByThis(T, MatrixT) Computes the remainder (dividend % matrix), where the result has the sign of the dividend, for each element of the matrix.
Public methodRemoveColumn Creates a new matrix with the given column removed.
Public methodRemoveRow Creates a new matrix with the given row removed.
Public methodResize Creates a new matrix with the desired size and copies this matrix to it. Values which no longer exist in the new matrix are ignored, new values are set to zero.
Public methodStatic memberRound Computes the rounded value of a matrix pointwise
Public methodRow(Int32) Copies a row into an Vector.
Public methodRow(Int32, VectorT) Copies a row into to the given Vector.
Public methodRow(Int32, Int32, Int32) Copies the requested row elements into a new Vector.
Public methodRow(Int32, Int32, Int32, VectorT) Copies the requested row elements into a new Vector.
Public methodRowAbsoluteSums Calculates the absolute value sum of each row vector.
Public methodRowNorms Calculates the p-norms of all row vectors. Typical values for p are 1.0 (L1, Manhattan norm), 2.0 (L2, Euclidean norm) and positive infinity (infinity norm)
Public methodRowSums Calculates the value sum of each row vector.
Public methodSetColumn(Int32, T) Copies the values of the given array to the specified column.
Public methodSetColumn(Int32, VectorT) Copies the values of the given Vector to the specified column.
Public methodSetColumn(Int32, Int32, Int32, VectorT) Copies the values of the given Vector to the specified sub-column.
Public methodSetDiagonal(T) Copies the values of the given array to the diagonal.
Public methodSetDiagonal(VectorT) Copies the values of the given Vector to the diagonal.
Public methodSetRow(Int32, T) Copies the values of the given array to the specified row.
Public methodSetRow(Int32, VectorT) Copies the values of the given Vector to the specified row.
Public methodSetRow(Int32, Int32, Int32, VectorT) Copies the values of the given Vector to the specified sub-row.
Public methodSetSubMatrix(Int32, Int32, MatrixT) Copies the values of a given matrix into a region in this matrix.
Public methodSetSubMatrix(Int32, Int32, Int32, Int32, MatrixT) Copies the values of a given matrix into a region in this matrix.
Public methodSetSubMatrix(Int32, Int32, Int32, Int32, Int32, Int32, MatrixT) Copies the values of a given matrix into a region in this matrix.
Public methodStatic memberSin Computes the sin of a matrix pointwise
Public methodStatic memberSinh Computes the sinh of a matrix pointwise
Public methodSolve(MatrixT) Solves a system of linear equations, AX = B, with A QR factorized.
Public methodSolve(VectorT) Solves a system of linear equations, Ax = b, with A QR factorized.
Public methodSolve(MatrixT, MatrixT) Solves a system of linear equations, AX = B, with A QR factorized.
Public methodSolve(VectorT, VectorT) Solves a system of linear equations, Ax = b, with A QR factorized.
Public methodSolveIterative(MatrixT, IIterativeSolverT, IIterationStopCriterionT) Solves the matrix equation AX = B, where A is the coefficient matrix (this matrix), B is the solution matrix and X is the unknown matrix.
Public methodSolveIterative(VectorT, IIterativeSolverT, IIterationStopCriterionT) Solves the matrix equation Ax = b, where A is the coefficient matrix (this matrix), b is the solution vector and x is the unknown vector.
Public methodSolveIterative(MatrixT, IIterativeSolverT, IPreconditionerT, IIterationStopCriterionT) Solves the matrix equation AX = B, where A is the coefficient matrix (this matrix), B is the solution matrix and X is the unknown matrix.
Public methodSolveIterative(MatrixT, IIterativeSolverT, IteratorT, IPreconditionerT) Solves the matrix equation AX = B, where A is the coefficient matrix (this matrix), B is the solution matrix and X is the unknown matrix.
Public methodSolveIterative(VectorT, IIterativeSolverT, IPreconditionerT, IIterationStopCriterionT) Solves the matrix equation Ax = b, where A is the coefficient matrix (this matrix), b is the solution vector and x is the unknown vector.
Public methodSolveIterative(VectorT, IIterativeSolverT, IteratorT, IPreconditionerT) Solves the matrix equation Ax = b, where A is the coefficient matrix (this matrix), b is the solution vector and x is the unknown vector.
Public methodStatic memberSqrt Computes the sqrt of a matrix pointwise
Public methodStack(MatrixT) Stacks this matrix on top of the given matrix and places the result into the result matrix.
Public methodStack(MatrixT, MatrixT) Stacks this matrix on top of the given matrix and places the result into the result matrix.
Public methodStrictlyLowerTriangle Returns a new matrix containing the lower triangle of this matrix. The new matrix does not contain the diagonal elements of this matrix.
Public methodStrictlyLowerTriangle(MatrixT) Puts the strictly lower triangle of this matrix into the result matrix.
Public methodStrictlyUpperTriangle Returns a new matrix containing the upper triangle of this matrix. The new matrix does not contain the diagonal elements of this matrix.
Public methodStrictlyUpperTriangle(MatrixT) Puts the strictly upper triangle of this matrix into the result matrix.
Public methodSubMatrix Creates a matrix that contains the values from the requested sub-matrix.
Public methodSubtract(T) Subtracts a scalar from each element of the matrix.
Public methodSubtract(MatrixT) Subtracts another matrix from this matrix.
Public methodSubtract(T, MatrixT) Subtracts a scalar from each element of the matrix and stores the result in the result matrix.
Public methodSubtract(MatrixT, MatrixT) Subtracts another matrix from this matrix.
Public methodSubtractFrom(T) Subtracts each element of the matrix from a scalar.
Public methodSubtractFrom(T, MatrixT) Subtracts each element of the matrix from a scalar and stores the result in the result matrix.
Public methodSvd Computes the SVD decomposition for a matrix.
Public methodStatic memberTan Computes the tan of a matrix pointwise
Public methodStatic memberTanh Computes the tanh of a matrix pointwise
Public methodToArray Returns this matrix as a multidimensional array. The returned array will be independent from this matrix. A new memory block will be allocated for the array.
Public methodToColumnArrays Returns this matrix as array of column arrays. The returned arrays will be independent from this matrix. A new memory block will be allocated for the arrays.
Public methodCode exampleToColumnMajorArray Returns the matrix's elements as an array with the data laid out column by column (column major). The returned array will be independent from this matrix. A new memory block will be allocated for the array.
Public methodToMatrixString(String, IFormatProvider) Returns a string that summarizes the content of this matrix.
Public methodToMatrixString(Int32, Int32, String, IFormatProvider) Returns a string that summarizes the content of this matrix.
Public methodToMatrixString(Int32, Int32, Int32, Int32, String, String, String, String, String, FuncT, String) 
Public methodToMatrixString(Int32, Int32, Int32, Int32, Int32, String, String, String, String, String, FuncT, String) 
Public methodToMatrixStringArray(Int32, Int32, Int32, Int32, String, String, String, FuncT, String) Returns a string 2D array that summarizes the content of this matrix.
Public methodToMatrixStringArray(Int32, Int32, Int32, Int32, Int32, Int32, String, String, String, FuncT, String) Returns a string 2D array that summarizes the content of this matrix.
Public methodToRowArrays Returns this matrix as array of row arrays. The returned arrays will be independent from this matrix. A new memory block will be allocated for the arrays.
Public methodCode exampleToRowMajorArray Returns the matrix's elements as an array with the data laid row by row (row major). The returned array will be independent from this matrix. A new memory block will be allocated for the array.
Public methodToString Returns a string that summarizes this matrix. The maximum number of cells can be configured in the Control class.
(Overrides ObjectToString)
Public methodToString(String, IFormatProvider) Returns a string that summarizes this matrix. The maximum number of cells can be configured in the Control class. The format string is ignored.
Public methodToString(Int32, Int32, String, IFormatProvider) Returns a string that summarizes this matrix.
Public methodToTypeString Returns a string that describes the type, dimensions and shape of this matrix.
Public methodTrace Computes the trace of this matrix.
Public methodTranspose Returns the transpose of this matrix.
Public methodTranspose(MatrixT) Puts the transpose of this matrix into the result matrix.
Public methodTransposeAndMultiply(MatrixT) Multiplies this matrix with transpose of another matrix and returns the result.
Public methodTransposeAndMultiply(MatrixT, MatrixT) Multiplies this matrix with transpose of another matrix and places the results into the result matrix.
Public methodTransposeThisAndMultiply(MatrixT) Multiplies the transpose of this matrix with another matrix and returns the result.
Public methodTransposeThisAndMultiply(VectorT) Multiplies the transpose of this matrix by a vector and returns the result.
Public methodTransposeThisAndMultiply(MatrixT, MatrixT) Multiplies the transpose of this matrix with another matrix and places the results into the result matrix.
Public methodTransposeThisAndMultiply(VectorT, VectorT) Multiplies the transpose of this matrix with a vector and places the results into the result vector.
Public methodTrySolveIterative(MatrixT, MatrixT, IIterativeSolverT, IIterationStopCriterionT) Solves the matrix equation AX = B, where A is the coefficient matrix (this matrix), B is the solution matrix and X is the unknown matrix.
Public methodTrySolveIterative(VectorT, VectorT, IIterativeSolverT, IIterationStopCriterionT) Solves the matrix equation Ax = b, where A is the coefficient matrix (this matrix), b is the solution vector and x is the unknown vector.
Public methodTrySolveIterative(MatrixT, MatrixT, IIterativeSolverT, IPreconditionerT, IIterationStopCriterionT) Solves the matrix equation AX = B, where A is the coefficient matrix (this matrix), B is the solution matrix and X is the unknown matrix.
Public methodTrySolveIterative(MatrixT, MatrixT, IIterativeSolverT, IteratorT, IPreconditionerT) Solves the matrix equation AX = B, where A is the coefficient matrix (this matrix), B is the solution matrix and X is the unknown matrix.
Public methodTrySolveIterative(VectorT, VectorT, IIterativeSolverT, IPreconditionerT, IIterationStopCriterionT) Solves the matrix equation Ax = b, where A is the coefficient matrix (this matrix), b is the solution vector and x is the unknown vector.
Public methodTrySolveIterative(VectorT, VectorT, IIterativeSolverT, IteratorT, IPreconditionerT) Solves the matrix equation Ax = b, where A is the coefficient matrix (this matrix), b is the solution vector and x is the unknown vector.
Public methodUpperTriangle Returns a new matrix containing the upper triangle of this matrix.
Public methodUpperTriangle(MatrixT) Puts the upper triangle of this matrix into the result matrix.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(T, MatrixT) Adds a scalar to each element of the matrix.
Public operatorStatic memberAddition(MatrixT, T) Adds a scalar to each element of the matrix.
Public operatorStatic memberAddition(MatrixT, MatrixT) Adds two matrices together and returns the results.
Public operatorStatic memberDivision(T, MatrixT) Divides a scalar with a matrix.
Public operatorStatic memberDivision(MatrixT, T) Divides a matrix with a scalar.
Public operatorStatic memberDotDivide(MatrixT, MatrixT) 
Public operatorStatic memberDotHat(MatrixT, T) 
Public operatorStatic memberDotHat(MatrixT, MatrixT) 
Public operatorStatic memberDotMultiply(MatrixT, MatrixT) 
Public operatorStatic memberDotPercent(MatrixT, MatrixT) 
Public operatorStatic memberModulus(T, MatrixT) Computes the pointwise remainder (% operator), where the result has the sign of the dividend, of the given dividend of each element of the matrix.
Public operatorStatic memberModulus(MatrixT, T) Computes the pointwise remainder (% operator), where the result has the sign of the dividend, of each element of the matrix of the given divisor.
Public operatorStatic memberModulus(MatrixT, MatrixT) Computes the pointwise remainder (% operator), where the result has the sign of the dividend, of each element of two matrices.
Public operatorStatic memberMultiply(T, MatrixT) Multiplies a Matrix by a constant and returns the result.
Public operatorStatic memberMultiply(MatrixT, T) Multiplies a Matrix by a constant and returns the result.
Public operatorStatic memberMultiply(MatrixT, MatrixT) Multiplies two matrices.
Public operatorStatic memberMultiply(MatrixT, VectorT) Multiplies a Matrix and a Vector.
Public operatorStatic memberMultiply(VectorT, MatrixT) Multiplies a Vector and a Matrix.
Public operatorStatic memberSubtraction(T, MatrixT) Subtracts each element of a matrix from a scalar.
Public operatorStatic memberSubtraction(MatrixT, T) Subtracts a scalar from each element of a matrix.
Public operatorStatic memberSubtraction(MatrixT, MatrixT) Subtracts two matrices together and returns the results.
Public operatorStatic memberUnaryNegation(MatrixT) Negates each element of the matrix.
Public operatorStatic memberUnaryPlus(MatrixT) Returns a Matrix containing the same values of rightSide.
Top
Fields
 NameDescription
Public fieldStatic memberBuild 
Public fieldStatic memberOne The value of 1.0.
Public fieldStatic memberZero The value of 0.0.
Top
Extension Methods
 NameDescription
Public Extension MethodAlmostEqualT Compares two matrices and determines if they are equal within the specified maximum error.
(Defined by Precision)
Public Extension MethodAlmostEqualT Compares two matrices and determines if they are equal to within the specified number of decimal places or not, using the number of decimal places as an absolute measure.
(Defined by Precision)
Public Extension MethodAlmostEqualRelativeT Compares two matrices and determines if they are equal within the specified maximum error.
(Defined by Precision)
Public Extension MethodAlmostEqualRelativeT Compares two matrices and determines if they are equal to within the specified number of decimal places or not. If the numbers are very close to zero an absolute difference is compared, otherwise the relative difference is compared.
(Defined by Precision)
Top
See Also