## Types in MathNet.Numerics.LinearAlgebra

Type Matrix<T>

Namespace MathNet.Numerics.LinearAlgebra

Interfaces IFormattable, IEquatable<Matrix<T>>, ICloneable

Defines the base class for `Matrix` classes.

### Public Static Functions

#### Matrix<T>Abs(Matrix<T> x)

Computes the absolute value of a matrix pointwise

The input matrix

#### Matrix<T>Acos(Matrix<T> x)

Computes the acos of a matrix pointwise

The input matrix

#### Matrix<T>Asin(Matrix<T> x)

Computes the asin of a matrix pointwise

The input matrix

#### Matrix<T>Atan(Matrix<T> x)

Computes the atan of a matrix pointwise

The input matrix

#### Matrix<T>Ceiling(Matrix<T> x)

Computes the ceiling of a matrix pointwise

The input matrix

#### Matrix<T>Cos(Matrix<T> x)

Computes the cos of a matrix pointwise

The input matrix

#### Matrix<T>Cosh(Matrix<T> x)

Computes the cosh of a matrix pointwise

The input matrix

#### Matrix<T>Exp(Matrix<T> x)

Computes the exponential of a matrix pointwise

The input matrix

#### Matrix<T>Floor(Matrix<T> x)

Computes the floor of a matrix pointwise

The input matrix

#### Matrix<T>Log(Matrix<T> x)

Computes the log of a matrix pointwise

The input matrix

#### Matrix<T>Log10(Matrix<T> x)

Computes the log10 of a matrix pointwise

The input matrix

#### Matrix<T>Round(Matrix<T> x)

Computes the rounded value of a matrix pointwise

The input matrix

#### Matrix<T>Sin(Matrix<T> x)

Computes the sin of a matrix pointwise

The input matrix

#### Matrix<T>Sinh(Matrix<T> x)

Computes the sinh of a matrix pointwise

The input matrix

#### Matrix<T>Sqrt(Matrix<T> x)

Computes the sqrt of a matrix pointwise

The input matrix

#### Matrix<T>Tan(Matrix<T> x)

Computes the tan of a matrix pointwise

The input matrix

#### Matrix<T>Tanh(Matrix<T> x)

Computes the tanh of a matrix pointwise

The input matrix

### Public Methods

Adds another matrix to this matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to add to this matrix.

###### `Matrix<T>` result

The matrix to store the result of the addition.

Adds another matrix to this matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to add to this matrix.

##### Return
###### `Matrix<T>`

Adds a scalar to each element of the matrix and stores the result in the result matrix.
##### Parameters

###### `Matrix<T>` result

The matrix to store the result of the addition.

Adds a scalar to each element of the matrix.

#### voidAppend(Matrix<T> right, Matrix<T> result)

Concatenates this matrix with the given matrix and places the result into the result matrix.
##### Parameters
###### `Matrix<T>` right

The matrix to concatenate.

###### `Matrix<T>` result

The combined matrix.

#### Matrix<T>Append(Matrix<T> right)

Concatenates this matrix with the given matrix.
##### Parameters
###### `Matrix<T>` right

The matrix to concatenate.

##### Return
###### `Matrix<T>`

The combined matrix.

#### T[,]AsArray()

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.

#### T[][]AsColumnArrays()

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.

#### T[]AsColumnMajorArray()

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.
##### Return
###### `T[]`

An array containing the matrix's elements.

#### T[][]AsRowArrays()

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.

#### T[]AsRowMajorArray()

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.
##### Return
###### `T[]`

An array containing the matrix's elements.

#### TAt(int row, int column)

Retrieves the requested element without range checking.
##### Parameters
###### `int` row

The row of the element.

###### `int` column

The column of the element.

##### Return
###### `T`

The requested element.

#### voidAt(int row, int column, T value)

Sets the value of the given element without range checking.
##### Parameters
###### `int` row

The row of the element.

###### `int` column

The column of the element.

###### `T` value

The value to set the element to.

#### Cholesky<T>Cholesky()

Computes the Cholesky decomposition for a matrix.
##### Return
###### `Cholesky<T>`

The Cholesky decomposition object.

#### voidClearColumn(int columnIndex)

Sets all values of a column to zero.

#### voidClearColumns(Int32[] columnIndices)

Sets all values for all of the chosen columns to zero.

#### voidClearRow(int rowIndex)

Sets all values of a row to zero.

#### voidClearRows(Int32[] rowIndices)

Sets all values for all of the chosen rows to zero.

#### voidClearSubMatrix(int rowIndex, int rowCount, int columnIndex, int columnCount)

Sets all values of a sub-matrix to zero.

#### Matrix<T>Clone()

Creates a clone of this instance.
##### Return
###### `Matrix<T>`

A clone of the instance.

#### voidCoerceZero(Func<T, bool> zeroPredicate)

Set all values that meet the predicate to zero, in-place.

#### voidCoerceZero(double threshold)

Set all values whose absolute value is smaller than the threshold to zero, in-place.

#### Vector<T>Column(int index)

Copies a column into a new Vector>.
##### Parameters
###### `int` index

The column to copy.

##### Return
###### `Vector<T>`

A Vector containing the copied elements.

#### voidColumn(int columnIndex, int rowIndex, int length, Vector<T> result)

Copies the requested column elements into the given vector.
##### Parameters
###### `int` columnIndex

The column to copy elements from.

###### `int` rowIndex

The row to start copying from.

###### `int` length

The number of elements to copy.

###### `Vector<T>` result

The Vector to copy the column into.

#### voidColumn(int index, Vector<T> result)

Copies a column into to the given Vector.
##### Parameters
###### `int` index

The column to copy.

###### `Vector<T>` result

The Vector to copy the column into.

#### Vector<T>Column(int columnIndex, int rowIndex, int length)

Copies the requested column elements into a new Vector.
##### Parameters
###### `int` columnIndex

The column to copy elements from.

###### `int` rowIndex

The row to start copying from.

###### `int` length

The number of elements to copy.

##### Return
###### `Vector<T>`

A Vector containing the requested elements.

#### Vector<T>ColumnAbsoluteSums()

Calculates the absolute value sum of each column vector.

#### Vector<T>ColumnNorms(double norm)

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)

#### Vector<T>ColumnSums()

Calculates the value sum of each column vector.

#### TConditionNumber()

Calculates the condition number of this matrix.
The condition number is calculated using singular value decomposition.
##### Return
###### `T`

The condition number of the matrix.

#### Matrix<T>Conjugate()

Complex conjugate each element of this matrix.
##### Return
###### `Matrix<T>`

A matrix containing the conjugated values.

#### voidConjugate(Matrix<T> result)

Complex conjugate each element of this matrix and place the results into the result matrix.
##### Parameters
###### `Matrix<T>` result

The result of the conjugation.

#### Matrix<T>ConjugateTranspose()

Returns the conjugate transpose of this matrix.
##### Return
###### `Matrix<T>`

The conjugate transpose of this matrix.

#### voidConjugateTranspose(Matrix<T> result)

Puts the conjugate transpose of this matrix into the result matrix.

#### voidConjugateTransposeAndMultiply(Matrix<T> other, Matrix<T> result)

Multiplies this matrix with the conjugate transpose of another matrix and places the results into the result matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

###### `Matrix<T>` result

The result of the multiplication.

#### Matrix<T>ConjugateTransposeAndMultiply(Matrix<T> other)

Multiplies this matrix with the conjugate transpose of another matrix and returns the result.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

##### Return
###### `Matrix<T>`

The result of the multiplication.

#### Matrix<T>ConjugateTransposeThisAndMultiply(Matrix<T> other)

Multiplies the conjugate transpose of this matrix with another matrix and returns the result.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

##### Return
###### `Matrix<T>`

The result of the multiplication.

#### Vector<T>ConjugateTransposeThisAndMultiply(Vector<T> rightSide)

Multiplies the conjugate transpose of this matrix by a vector and returns the result.
##### Parameters
###### `Vector<T>` rightSide

The vector to multiply with.

##### Return
###### `Vector<T>`

The result of the multiplication.

#### voidConjugateTransposeThisAndMultiply(Vector<T> rightSide, Vector<T> result)

Multiplies the conjugate transpose of this matrix with a vector and places the results into the result vector.
##### Parameters
###### `Vector<T>` rightSide

The vector to multiply with.

###### `Vector<T>` result

The result of the multiplication.

#### voidConjugateTransposeThisAndMultiply(Matrix<T> other, Matrix<T> result)

Multiplies the conjugate transpose of this matrix with another matrix and places the results into the result matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

###### `Matrix<T>` result

The result of the multiplication.

#### voidCopyTo(Matrix<T> target)

Copies the elements of this matrix to the given matrix.
##### Parameters
###### `Matrix<T>` target

The matrix to copy values into.

#### TDeterminant()

Computes the determinant of this matrix.
##### Return
###### `T`

The determinant of this matrix.

#### Vector<T>Diagonal()

Returns the elements of the diagonal in a Vector.
For non-square matrices, the method returns Min(Rows, Columns) elements where i == j (i is the row index, and j is the column index).
##### Return
###### `Vector<T>`

The elements of the diagonal.

#### Matrix<T>DiagonalStack(Matrix<T> lower)

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.
##### Parameters
###### `Matrix<T>` lower

The lower, right matrix.

##### Return
###### `Matrix<T>`

the combined matrix

#### voidDiagonalStack(Matrix<T> lower, Matrix<T> result)

Diagonally stacks his matrix on top of the given matrix and places the combined matrix into the result matrix.
##### Parameters
###### `Matrix<T>` lower

The lower, right matrix.

###### `Matrix<T>` result

The combined matrix

#### Matrix<T>Divide(T scalar)

Divides each element of this matrix with a scalar.
##### Parameters
###### `T` scalar

The scalar to divide with.

##### Return
###### `Matrix<T>`

The result of the division.

#### voidDivide(T scalar, Matrix<T> result)

Divides each element of the matrix by a scalar and places results into the result matrix.
##### Parameters
###### `T` scalar

The scalar to divide the matrix with.

###### `Matrix<T>` result

The matrix to store the result of the division.

#### voidDivideByThis(T scalar, Matrix<T> result)

Divides a scalar by each element of the matrix and places results into the result matrix.
##### Parameters
###### `T` scalar

The scalar to divide.

###### `Matrix<T>` result

The matrix to store the result of the division.

#### Matrix<T>DivideByThis(T scalar)

Divides a scalar by each element of the matrix.
##### Parameters
###### `T` scalar

The scalar to divide.

##### Return
###### `Matrix<T>`

The result of the division.

#### IEnumerable<T>Enumerate(Zeros zeros)

Returns an IEnumerable that can be used to iterate through all values of the matrix.
The enumerator will include all values, even if they are zero. The ordering of the values is unspecified (not necessarily column-wise or row-wise).

#### IEnumerable<T>Enumerate()

Returns an IEnumerable that can be used to iterate through all values of the matrix.
The enumerator will include all values, even if they are zero. The ordering of the values is unspecified (not necessarily column-wise or row-wise).

#### IEnumerable<Vector<T>>EnumerateColumns(int index, int length)

Returns an IEnumerable that can be used to iterate through a subset of all columns of the matrix.
##### Parameters
###### `int` index

The column to start enumerating over.

###### `int` length

The number of columns to enumerating over.

#### IEnumerable<Vector<T>>EnumerateColumns()

Returns an IEnumerable that can be used to iterate through all columns of the matrix.

#### IEnumerable<ValueTuple<int, Vector<T>>>EnumerateColumnsIndexed(int index, int length)

Returns an IEnumerable that can be used to iterate through a subset of all columns of the matrix and their index.
The enumerator returns a Tuple with the first value being the column index and the second value being the value of the column at that index.
##### Parameters
###### `int` index

The column to start enumerating over.

###### `int` length

The number of columns to enumerating over.

#### IEnumerable<ValueTuple<int, Vector<T>>>EnumerateColumnsIndexed()

Returns an IEnumerable that can be used to iterate through all columns of the matrix and their index.
The enumerator returns a Tuple with the first value being the column index and the second value being the value of the column at that index.

#### IEnumerable<ValueTuple<int, int, T>>EnumerateIndexed()

Returns an IEnumerable that can be used to iterate through all values of the matrix and their index.
The enumerator returns a Tuple with the first two values being the row and column index and the third value being the value of the element at that index. The enumerator will include all values, even if they are zero.

#### IEnumerable<ValueTuple<int, int, T>>EnumerateIndexed(Zeros zeros)

Returns an IEnumerable that can be used to iterate through all values of the matrix and their index.
The enumerator returns a Tuple with the first two values being the row and column index and the third value being the value of the element at that index. The enumerator will include all values, even if they are zero.

#### IEnumerable<Vector<T>>EnumerateRows(int index, int length)

Returns an IEnumerable that can be used to iterate through a subset of all rows of the matrix.
##### Parameters
###### `int` index

The row to start enumerating over.

###### `int` length

The number of rows to enumerating over.

#### IEnumerable<Vector<T>>EnumerateRows()

Returns an IEnumerable that can be used to iterate through all rows of the matrix.

#### IEnumerable<ValueTuple<int, Vector<T>>>EnumerateRowsIndexed(int index, int length)

Returns an IEnumerable that can be used to iterate through a subset of all rows of the matrix and their index.
The enumerator returns a Tuple with the first value being the row index and the second value being the value of the row at that index.
##### Parameters
###### `int` index

The row to start enumerating over.

###### `int` length

The number of rows to enumerating over.

#### IEnumerable<ValueTuple<int, Vector<T>>>EnumerateRowsIndexed()

Returns an IEnumerable that can be used to iterate through all rows of the matrix and their index.
The enumerator returns a Tuple with the first value being the row index and the second value being the value of the row at that index.

#### boolEquals(Matrix<T> other)

Indicates whether the current object is equal to another object of the same type.
##### Parameters
###### `Matrix<T>` other

An object to compare with this object.

##### Return
###### `bool`

`true` if the current object is equal to the other parameter; otherwise, `false`.

#### boolEquals(object obj)

Determines whether the specified Object is equal to this instance.
##### Parameters
###### `object` obj

The Object to compare with this instance.

##### Return
###### `bool`

`true` if the specified Object is equal to this instance; otherwise, `false`.

#### Evd<T>Evd(Symmetricity symmetricity)

Computes the EVD decomposition for a matrix.
##### Return
###### `Evd<T>`

The EVD decomposition object.

#### boolExists(Func<T, bool> predicate, Zeros zeros)

Returns true if at least one element satisfies a predicate. Zero elements may be skipped on sparse data structures if allowed (default).

#### boolExists2<TOther>(Func<T, TOther, bool> predicate, Matrix<T> other, Zeros zeros)

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

#### Tuple<int, int, T>Find(Func<T, bool> predicate, Zeros zeros)

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

#### Tuple<int, int, T, TOther>Find2<TOther>(Func<T, TOther, bool> predicate, Matrix<T> other, Zeros zeros)

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

#### TStateFold2<TOther, TState>(Func<TState, T, TOther, TState> f, TState state, Matrix<T> other, Zeros zeros)

Applies a function to update the status with each value pair of two matrices and returns the resulting status.

#### TU[]FoldByColumn<TU>(Func<TU, T, TU> f, TU state, Zeros zeros)

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.

#### TU[]FoldByRow<TU>(Func<TU, T, TU> f, TU state, Zeros zeros)

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.

#### Vector<T>FoldColumns<TU>(Func<Vector<TU>, Vector<T>, Vector<TU>> f, Vector<T> state)

Applies a function f to each column vector, threading an accumulator vector argument through the computation. Returns the resulting accumulator vector.

#### Vector<T>FoldRows<TU>(Func<Vector<TU>, Vector<T>, Vector<TU>> f, Vector<T> state)

Applies a function f to each row vector, threading an accumulator vector argument through the computation. Returns the resulting accumulator vector.

#### boolForAll(Func<T, bool> predicate, Zeros zeros)

Returns true if all elements satisfy a predicate. Zero elements may be skipped on sparse data structures if allowed (default).

#### boolForAll2<TOther>(Func<T, TOther, bool> predicate, Matrix<T> other, Zeros zeros)

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

#### doubleFrobeniusNorm()

Calculates the entry-wise Frobenius norm of this matrix.
##### Return
###### `double`

The square root of the sum of the squared values.

#### intGetHashCode()

Returns a hash code for this instance.
##### Return
###### `int`

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

#### GramSchmidt<T>GramSchmidt()

Computes the QR decomposition for a matrix using Modified Gram-Schmidt Orthogonalization.
##### Return
###### `GramSchmidt<T>`

The QR decomposition object.

#### doubleInfinityNorm()

Calculates the induced infinity norm of this matrix.
##### Return
###### `double`

The maximum absolute row sum of the matrix.

#### Matrix<T>InsertColumn(int columnIndex, Vector<T> column)

Creates a new matrix and inserts the given column at the given index.
##### Parameters
###### `int` columnIndex

The index of where to insert the column.

###### `Vector<T>` column

The column to insert.

##### Return
###### `Matrix<T>`

A new matrix with the inserted column.

#### Matrix<T>InsertRow(int rowIndex, Vector<T> row)

Creates a new matrix and inserts the given row at the given index.
##### Parameters
###### `int` rowIndex

The index of where to insert the row.

###### `Vector<T>` row

The row to insert.

##### Return
###### `Matrix<T>`

A new matrix with the inserted column.

#### Matrix<T>Inverse()

Computes the inverse of this matrix.
##### Return
###### `Matrix<T>`

The inverse of this matrix.

#### boolIsHermitian()

Evaluates whether this matrix is Hermitian (conjugate symmetric).

#### boolIsSymmetric()

Evaluates whether this matrix is symmetric.

#### Vector`1[]Kernel()

Computes an orthonormal basis for the null space of this matrix, also known as the kernel of the corresponding matrix transformation.

#### Matrix<T>KroneckerProduct(Matrix<T> other)

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.
##### Parameters
###### `Matrix<T>` other

The other matrix.

##### Return
###### `Matrix<T>`

The Kronecker product of the two matrices.

#### voidKroneckerProduct(Matrix<T> other, Matrix<T> result)

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.
##### Parameters
###### `Matrix<T>` other

The other matrix.

###### `Matrix<T>` result

The Kronecker product of the two matrices.

#### doubleL1Norm()

Calculates the induced L1 norm of this matrix.
##### Return
###### `double`

The maximum absolute column sum of the matrix.

#### doubleL2Norm()

Calculates the induced L2 norm of the matrix.
For sparse matrices, the L2 norm is computed using a dense implementation of singular value decomposition. In a later release, it will be replaced with a sparse implementation.
##### Return
###### `double`

The largest singular value of the matrix.

#### Vector<T>LeftMultiply(Vector<T> leftSide)

Left multiply a matrix with a vector ( = vector * matrix ).
##### Parameters
###### `Vector<T>` leftSide

The vector to multiply with.

##### Return
###### `Vector<T>`

The result of the multiplication.

#### voidLeftMultiply(Vector<T> leftSide, Vector<T> result)

Left multiply a matrix with a vector ( = vector * matrix ) and place the result in the result vector.
##### Parameters
###### `Vector<T>` leftSide

The vector to multiply with.

###### `Vector<T>` result

The result of the multiplication.

#### voidLowerTriangle(Matrix<T> result)

Puts the lower triangle of this matrix into the result matrix.
##### Parameters
###### `Matrix<T>` result

Where to store the lower triangle.

#### Matrix<T>LowerTriangle()

Returns a new matrix containing the lower triangle of this matrix.
##### Return
###### `Matrix<T>`

The lower triangle of this matrix.

#### LU<T>LU()

Computes the LU decomposition for a matrix.
##### Return
###### `LU<T>`

The LU decomposition object.

#### voidMap(Func<T, T> f, Matrix<T> result, Zeros 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).

#### Matrix<T>Map<TU>(Func<T, TU> f, Zeros 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).

#### voidMap2(Func<T, T, T> f, Matrix<T> other, Matrix<T> result, Zeros zeros)

Applies a function to each value pair of two matrices and replaces the value in the result vector.

#### Matrix<T>Map2(Func<T, T, T> f, Matrix<T> other, Zeros zeros)

Applies a function to each value pair of two matrices and returns the results as a new vector.

#### voidMapConvert<TU>(Func<T, TU> f, Matrix<T> result, Zeros 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).

#### voidMapIndexed(Func<int, int, T, T> f, Matrix<T> result, Zeros 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).

#### Matrix<T>MapIndexed<TU>(Func<int, int, T, TU> f, Zeros 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).

#### voidMapIndexedConvert<TU>(Func<int, int, T, TU> f, Matrix<T> result, Zeros 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).

#### voidMapIndexedInplace(Func<int, int, T, T> f, Zeros zeros)

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

#### voidMapInplace(Func<T, T> f, Zeros zeros)

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

#### voidModulus(T divisor, Matrix<T> result)

Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
##### Parameters
###### `T` divisor

The scalar denominator to use.

###### `Matrix<T>` result

Matrix to store the results in.

#### Matrix<T>Modulus(T divisor)

Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
##### Parameters
###### `T` divisor

The scalar denominator to use.

##### Return
###### `Matrix<T>`

A matrix containing the results.

#### voidModulusByThis(T dividend, Matrix<T> result)

Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
##### Parameters
###### `T` dividend

The scalar numerator to use.

###### `Matrix<T>` result

Matrix to store the results in.

#### Matrix<T>ModulusByThis(T dividend)

Computes the canonical modulus, where the result has the sign of the divisor, for each element of the matrix.
##### Parameters
###### `T` dividend

The scalar numerator to use.

##### Return
###### `Matrix<T>`

A matrix containing the results.

#### Vector<T>Multiply(Vector<T> rightSide)

Multiplies this matrix by a vector and returns the result.
##### Parameters
###### `Vector<T>` rightSide

The vector to multiply with.

##### Return
###### `Vector<T>`

The result of the multiplication.

#### voidMultiply(Matrix<T> other, Matrix<T> result)

Multiplies this matrix with another matrix and places the results into the result matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

###### `Matrix<T>` result

The result of the multiplication.

#### Matrix<T>Multiply(Matrix<T> other)

Multiplies this matrix with another matrix and returns the result.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

##### Return
###### `Matrix<T>`

The result of the multiplication.

#### voidMultiply(T scalar, Matrix<T> result)

Multiplies each element of the matrix by a scalar and places results into the result matrix.
##### Parameters
###### `T` scalar

The scalar to multiply the matrix with.

###### `Matrix<T>` result

The matrix to store the result of the multiplication.

#### voidMultiply(Vector<T> rightSide, Vector<T> result)

Multiplies this matrix with a vector and places the results into the result vector.
##### Parameters
###### `Vector<T>` rightSide

The vector to multiply with.

###### `Vector<T>` result

The result of the multiplication.

#### Matrix<T>Multiply(T scalar)

Multiplies each element of this matrix with a scalar.
##### Parameters
###### `T` scalar

The scalar to multiply with.

##### Return
###### `Matrix<T>`

The result of the multiplication.

#### voidNegate(Matrix<T> result)

Negate each element of this matrix and place the results into the result matrix.
##### Parameters
###### `Matrix<T>` result

The result of the negation.

#### Matrix<T>Negate()

Negate each element of this matrix.
##### Return
###### `Matrix<T>`

A matrix containing the negated values.

#### Matrix<T>NormalizeColumns(double norm)

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)

#### Matrix<T>NormalizeRows(double norm)

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)

#### intNullity()

Calculates the nullity of the matrix.
##### Return
###### `int`

effective numerical nullity, obtained from SVD

#### voidPermuteColumns(Permutation p)

Permute the columns of a matrix according to a permutation.
##### Parameters
###### `Permutation` p

The column permutation to apply to this matrix.

#### voidPermuteRows(Permutation p)

Permute the rows of a matrix according to a permutation.
##### Parameters
###### `Permutation` p

The row permutation to apply to this matrix.

#### voidPointwiseAbs(Matrix<T> result)

Pointwise applies the abs function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseAbs()

Pointwise applies the abs function to each value

#### Matrix<T>PointwiseAbsoluteMaximum(Matrix<T> other)

Pointwise applies the absolute maximum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

#### voidPointwiseAbsoluteMaximum(Matrix<T> other, Matrix<T> result)

Pointwise applies the absolute maximum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### voidPointwiseAbsoluteMaximum(T scalar, Matrix<T> result)

Pointwise applies the absolute maximum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### Matrix<T>PointwiseAbsoluteMaximum(T scalar)

Pointwise applies the absolute maximum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

#### voidPointwiseAbsoluteMinimum(Matrix<T> other, Matrix<T> result)

Pointwise applies the absolute minimum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### voidPointwiseAbsoluteMinimum(T scalar, Matrix<T> result)

Pointwise applies the absolute minimum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### Matrix<T>PointwiseAbsoluteMinimum(T scalar)

Pointwise applies the absolute minimum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

#### Matrix<T>PointwiseAbsoluteMinimum(Matrix<T> other)

Pointwise applies the absolute minimum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

#### Matrix<T>PointwiseAcos()

Pointwise applies the acos function to each value

#### voidPointwiseAcos(Matrix<T> result)

Pointwise applies the acos function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### voidPointwiseAsin(Matrix<T> result)

Pointwise applies the asin function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseAsin()

Pointwise applies the asin function to each value

#### voidPointwiseAtan(Matrix<T> result)

Pointwise applies the atan function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseAtan()

Pointwise applies the atan function to each value

#### voidPointwiseAtan2(Matrix<T> other, Matrix<T> result)

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'
##### Parameters
###### `Matrix<T>` other

The other matrix 'y'

###### `Matrix<T>` result

The matrix with the result and 'x'

#### Matrix<T>PointwiseAtan2(Matrix<T> other)

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'

#### Matrix<T>PointwiseCeiling()

Pointwise applies the ceiling function to each value

#### voidPointwiseCeiling(Matrix<T> result)

Pointwise applies the ceiling function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseCos()

Pointwise applies the cos function to each value

#### voidPointwiseCos(Matrix<T> result)

Pointwise applies the cos function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### voidPointwiseCosh(Matrix<T> result)

Pointwise applies the cosh function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseCosh()

Pointwise applies the cosh function to each value

#### voidPointwiseDivide(Matrix<T> divisor, Matrix<T> result)

Pointwise divide this matrix by another matrix and stores the result into the result matrix.
##### Parameters
###### `Matrix<T>` divisor

The pointwise denominator matrix to use.

###### `Matrix<T>` result

The matrix to store the result of the pointwise division.

#### Matrix<T>PointwiseDivide(Matrix<T> divisor)

Pointwise divide this matrix by another matrix.
##### Parameters
###### `Matrix<T>` divisor

The pointwise denominator matrix to use.

##### Return
###### `Matrix<T>`

A new matrix that is the pointwise division of this matrix and divisor.

#### Matrix<T>PointwiseExp()

Pointwise applies the exponent function to each value.

#### voidPointwiseExp(Matrix<T> result)

Pointwise applies the exponent function to each value.
##### Parameters
###### `Matrix<T>` result

The matrix to store the result.

#### Matrix<T>PointwiseFloor()

Pointwise applies the floor function to each value

#### voidPointwiseFloor(Matrix<T> result)

Pointwise applies the floor function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseLog()

Pointwise applies the natural logarithm function to each value.

#### voidPointwiseLog(Matrix<T> result)

Pointwise applies the natural logarithm function to each value.
##### Parameters
###### `Matrix<T>` result

The matrix to store the result.

#### voidPointwiseLog10(Matrix<T> result)

Pointwise applies the log10 function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseLog10()

Pointwise applies the log10 function to each value

#### voidPointwiseMaximum(Matrix<T> other, Matrix<T> result)

Pointwise applies the maximum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### Matrix<T>PointwiseMaximum(Matrix<T> other)

Pointwise applies the maximum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

#### voidPointwiseMaximum(T scalar, Matrix<T> result)

Pointwise applies the maximum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### Matrix<T>PointwiseMaximum(T scalar)

Pointwise applies the maximum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

#### Matrix<T>PointwiseMinimum(T scalar)

Pointwise applies the minimum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

#### voidPointwiseMinimum(Matrix<T> other, Matrix<T> result)

Pointwise applies the minimum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

###### `Matrix<T>` result

The matrix to store the result.

#### Matrix<T>PointwiseMinimum(Matrix<T> other)

Pointwise applies the minimum with the values of another matrix to each value.
##### Parameters
###### `Matrix<T>` other

The matrix with the values to compare to.

#### voidPointwiseMinimum(T scalar, Matrix<T> result)

Pointwise applies the minimum with a scalar to each value.
##### Parameters
###### `T` scalar

The scalar value to compare to.

###### `Matrix<T>` result

The vector to store the result.

#### Matrix<T>PointwiseModulus(Matrix<T> divisor)

Pointwise canonical modulus, where the result has the sign of the divisor, of this matrix by another matrix.
##### Parameters
###### `Matrix<T>` divisor

The pointwise denominator matrix to use.

#### voidPointwiseModulus(Matrix<T> divisor, Matrix<T> result)

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.
##### Parameters
###### `Matrix<T>` divisor

The pointwise denominator matrix to use.

###### `Matrix<T>` result

The matrix to store the result of the pointwise modulus.

#### voidPointwiseMultiply(Matrix<T> other, Matrix<T> result)

Pointwise multiplies this matrix with another matrix and stores the result into the result matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to pointwise multiply with this one.

###### `Matrix<T>` result

The matrix to store the result of the pointwise multiplication.

#### Matrix<T>PointwiseMultiply(Matrix<T> other)

Pointwise multiplies this matrix with another matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to pointwise multiply with this one.

##### Return
###### `Matrix<T>`

A new matrix that is the pointwise multiplication of this matrix and other.

#### voidPointwisePower(Matrix<T> exponent, Matrix<T> result)

Pointwise raise this matrix to an exponent.
##### Parameters
###### `Matrix<T>` exponent

The exponent to raise this matrix values to.

###### `Matrix<T>` result

The matrix to store the result into.

#### Matrix<T>PointwisePower(Matrix<T> exponent)

Pointwise raise this matrix to an exponent and store the result into the result matrix.
##### Parameters
###### `Matrix<T>` exponent

The exponent to raise this matrix values to.

#### voidPointwisePower(T exponent, Matrix<T> result)

Pointwise raise this matrix to an exponent.
##### Parameters
###### `T` exponent

The exponent to raise this matrix values to.

###### `Matrix<T>` result

The matrix to store the result into.

#### Matrix<T>PointwisePower(T exponent)

Pointwise raise this matrix to an exponent and store the result into the result matrix.
##### Parameters
###### `T` exponent

The exponent to raise this matrix values to.

#### Matrix<T>PointwiseRemainder(Matrix<T> divisor)

Pointwise remainder (% operator), where the result has the sign of the dividend, of this matrix by another matrix.
##### Parameters
###### `Matrix<T>` divisor

The pointwise denominator matrix to use.

#### voidPointwiseRemainder(Matrix<T> divisor, Matrix<T> result)

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.
##### Parameters
###### `Matrix<T>` divisor

The pointwise denominator matrix to use.

###### `Matrix<T>` result

The matrix to store the result of the pointwise remainder.

#### Matrix<T>PointwiseRound()

Pointwise applies the round function to each value

#### voidPointwiseRound(Matrix<T> result)

Pointwise applies the round function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseSign()

Pointwise applies the sign function to each value

#### voidPointwiseSign(Matrix<T> result)

Pointwise applies the sign function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### voidPointwiseSin(Matrix<T> result)

Pointwise applies the sin function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseSin()

Pointwise applies the sin function to each value

#### Matrix<T>PointwiseSinh()

Pointwise applies the sinh function to each value

#### voidPointwiseSinh(Matrix<T> result)

Pointwise applies the sinh function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseSqrt()

Pointwise applies the sqrt function to each value

#### voidPointwiseSqrt(Matrix<T> result)

Pointwise applies the sqrt function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### voidPointwiseTan(Matrix<T> result)

Pointwise applies the tan function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseTan()

Pointwise applies the tan function to each value

#### voidPointwiseTanh(Matrix<T> result)

Pointwise applies the tanh function to each value
##### Parameters
###### `Matrix<T>` result

The vector to store the result

#### Matrix<T>PointwiseTanh()

Pointwise applies the tanh function to each value

#### Matrix<T>Power(int exponent)

Multiplies this square matrix with another matrix and returns the result.
##### Parameters
###### `int` exponent

The positive integer exponent to raise the matrix to.

#### voidPower(int exponent, Matrix<T> result)

Raises this square matrix to a positive integer exponent and places the results into the result matrix.
##### Parameters
###### `int` exponent

The positive integer exponent to raise the matrix to.

###### `Matrix<T>` result

The result of the power.

#### Matrix<T>PseudoInverse()

Computes the Moore-Penrose Pseudo-Inverse of this matrix.

#### QR<T>QR(QRMethod method)

Computes the QR decomposition for a matrix.
##### Parameters
###### `QRMethod` method

The type of QR factorization to perform.

##### Return
###### `QR<T>`

The QR decomposition object.

#### Vector`1[]Range()

Computes an orthonormal basis for the column space of this matrix, also known as the range or image of the corresponding matrix transformation.

#### intRank()

Calculates the rank of the matrix.
##### Return
###### `int`

effective numerical rank, obtained from SVD

#### Vector<T>ReduceColumns(Func<Vector<T>, Vector<T>, Vector<T>> f)

Reduces all column vectors by applying a function between two of them, until only a single vector is left.

#### Vector<T>ReduceRows(Func<Vector<T>, Vector<T>, Vector<T>> f)

Reduces all row vectors by applying a function between two of them, until only a single vector is left.

#### voidRemainder(T divisor, Matrix<T> result)

Computes the remainder (matrix % divisor), where the result has the sign of the dividend, for each element of the matrix.
##### Parameters
###### `T` divisor

The scalar denominator to use.

###### `Matrix<T>` result

Matrix to store the results in.

#### Matrix<T>Remainder(T divisor)

Computes the remainder (matrix % divisor), where the result has the sign of the dividend, for each element of the matrix.
##### Parameters
###### `T` divisor

The scalar denominator to use.

##### Return
###### `Matrix<T>`

A matrix containing the results.

#### Matrix<T>RemainderByThis(T dividend)

Computes the remainder (dividend % matrix), where the result has the sign of the dividend, for each element of the matrix.
##### Parameters
###### `T` dividend

The scalar numerator to use.

##### Return
###### `Matrix<T>`

A matrix containing the results.

#### voidRemainderByThis(T dividend, Matrix<T> result)

Computes the remainder (dividend % matrix), where the result has the sign of the dividend, for each element of the matrix.
##### Parameters
###### `T` dividend

The scalar numerator to use.

###### `Matrix<T>` result

Matrix to store the results in.

#### Matrix<T>RemoveColumn(int columnIndex)

Creates a new matrix with the given column removed.
##### Parameters
###### `int` columnIndex

The index of the column to remove.

##### Return
###### `Matrix<T>`

A new matrix without the chosen column.

#### Matrix<T>RemoveRow(int rowIndex)

Creates a new matrix with the given row removed.
##### Parameters
###### `int` rowIndex

The index of the row to remove.

##### Return
###### `Matrix<T>`

A new matrix without the chosen row.

#### Matrix<T>Resize(int rowCount, int columnCount)

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.
##### Parameters
###### `int` rowCount

The number of rows of the new matrix.

###### `int` columnCount

The number of columns of the new matrix.

##### Return
###### `Matrix<T>`

A new matrix with the desired rows and columns.

#### Vector<T>Row(int rowIndex, int columnIndex, int length)

Copies the requested row elements into a new Vector.
##### Parameters
###### `int` rowIndex

The row to copy elements from.

###### `int` columnIndex

The column to start copying from.

###### `int` length

The number of elements to copy.

##### Return
###### `Vector<T>`

A Vector containing the requested elements.

#### voidRow(int rowIndex, int columnIndex, int length, Vector<T> result)

Copies the requested row elements into a new Vector.
##### Parameters
###### `int` rowIndex

The row to copy elements from.

###### `int` columnIndex

The column to start copying from.

###### `int` length

The number of elements to copy.

###### `Vector<T>` result

The Vector to copy the column into.

#### voidRow(int index, Vector<T> result)

Copies a row into to the given Vector.
##### Parameters

The row to copy.

###### `Vector<T>` result

The Vector to copy the row into.

#### Vector<T>Row(int index)

Copies a row into an Vector.

The row to copy.

##### Return
###### `Vector<T>`

A Vector containing the copied elements.

#### Vector<T>RowAbsoluteSums()

Calculates the absolute value sum of each row vector.

#### Vector<T>RowNorms(double norm)

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)

#### Vector<T>RowSums()

Calculates the value sum of each row vector.

#### voidSetColumn(int columnIndex, Vector<T> column)

Copies the values of the given Vector to the specified column.
##### Parameters
###### `int` columnIndex

The column to copy the values to.

###### `Vector<T>` column

The vector to copy the values from.

#### voidSetColumn(int columnIndex, int rowIndex, int length, Vector<T> column)

Copies the values of the given Vector to the specified sub-column.
##### Parameters
###### `int` columnIndex

The column to copy the values to.

###### `int` rowIndex

The row to start copying to.

###### `int` length

The number of elements to copy.

###### `Vector<T>` column

The vector to copy the values from.

#### voidSetColumn(int columnIndex, T[] column)

Copies the values of the given array to the specified column.
##### Parameters
###### `int` columnIndex

The column to copy the values to.

###### `T[]` column

The array to copy the values from.

#### voidSetDiagonal(T[] source)

Copies the values of the given array to the diagonal.
For non-square matrices, the elements of source are copied to this[i,i].
##### Parameters
###### `T[]` source

The array to copy the values from. The length of the vector should be Min(Rows, Columns).

#### voidSetDiagonal(Vector<T> source)

Copies the values of the given Vector to the diagonal.
For non-square matrices, the elements of source are copied to this[i,i].
##### Parameters
###### `Vector<T>` source

The vector to copy the values from. The length of the vector should be Min(Rows, Columns).

#### voidSetRow(int rowIndex, int columnIndex, int length, Vector<T> row)

Copies the values of the given Vector to the specified sub-row.
##### Parameters
###### `int` rowIndex

The row to copy the values to.

###### `int` columnIndex

The column to start copying to.

###### `int` length

The number of elements to copy.

###### `Vector<T>` row

The vector to copy the values from.

#### voidSetRow(int rowIndex, T[] row)

Copies the values of the given array to the specified row.
##### Parameters
###### `int` rowIndex

The row to copy the values to.

###### `T[]` row

The array to copy the values from.

#### voidSetRow(int rowIndex, Vector<T> row)

Copies the values of the given Vector to the specified row.
##### Parameters
###### `int` rowIndex

The row to copy the values to.

###### `Vector<T>` row

The vector to copy the values from.

#### voidSetSubMatrix(int rowIndex, int sorceRowIndex, int rowCount, int columnIndex, int sourceColumnIndex, int columnCount, Matrix<T> subMatrix)

Copies the values of a given matrix into a region in this matrix.
##### Parameters
###### `int` rowIndex

The row to start copying to.

###### `int` sorceRowIndex

The row of the sub-matrix to start copying from.

###### `int` rowCount

The number of rows to copy. Must be positive.

###### `int` columnIndex

The column to start copying to.

###### `int` sourceColumnIndex

The column of the sub-matrix to start copying from.

###### `int` columnCount

The number of columns to copy. Must be positive.

###### `Matrix<T>` subMatrix

The sub-matrix to copy from.

#### voidSetSubMatrix(int rowIndex, int rowCount, int columnIndex, int columnCount, Matrix<T> subMatrix)

Copies the values of a given matrix into a region in this matrix.
##### Parameters
###### `int` rowIndex

The row to start copying to.

###### `int` rowCount

The number of rows to copy. Must be positive.

###### `int` columnIndex

The column to start copying to.

###### `int` columnCount

The number of columns to copy. Must be positive.

###### `Matrix<T>` subMatrix

The sub-matrix to copy from.

#### voidSetSubMatrix(int rowIndex, int columnIndex, Matrix<T> subMatrix)

Copies the values of a given matrix into a region in this matrix.
##### Parameters
###### `int` rowIndex

The row to start copying to.

###### `int` columnIndex

The column to start copying to.

###### `Matrix<T>` subMatrix

The sub-matrix to copy from.

#### Vector<T>Solve(Vector<T> input)

Solves a system of linear equations, , with A QR factorized.
##### Parameters
###### `Vector<T>` input

The right hand side vector, .

##### Return
###### `Vector<T>`

The left hand side Vector`1 , .

#### Matrix<T>Solve(Matrix<T> input)

Solves a system of linear equations, , with A QR factorized.
##### Parameters
###### `Matrix<T>` input

The right hand side Matrix`1 , .

##### Return
###### `Matrix<T>`

The left hand side Matrix`1 , .

#### voidSolve(Matrix<T> input, Matrix<T> result)

Solves a system of linear equations, , with A QR factorized.
##### Parameters
###### `Matrix<T>` input

The right hand side Matrix`1 , .

###### `Matrix<T>` result

The left hand side Matrix`1 , .

#### voidSolve(Vector<T> input, Vector<T> result)

Solves a system of linear equations, , with A QR factorized.
##### Parameters
###### `Vector<T>` input

The right hand side vector, .

###### `Vector<T>` result

The left hand side Matrix`1 , .

#### Matrix<T>SolveIterative(Matrix<T> input, IIterativeSolver<T> solver, Iterator<T> iterator, IPreconditioner<T> preconditioner)

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.
##### Parameters
###### `Matrix<T>` input

The solution matrix `B`.

###### `IIterativeSolver<T>` solver

The iterative solver to use.

###### `Iterator<T>` iterator

The iterator to use to control when to stop iterating.

###### `IPreconditioner<T>` preconditioner

The preconditioner to use for approximations.

##### Return
###### `Matrix<T>`

The result matrix `X`.

#### Vector<T>SolveIterative(Vector<T> input, IIterativeSolver<T> solver, Iterator<T> iterator, IPreconditioner<T> preconditioner)

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.
##### Parameters
###### `Vector<T>` input

The solution vector `b`.

###### `IIterativeSolver<T>` solver

The iterative solver to use.

###### `Iterator<T>` iterator

The iterator to use to control when to stop iterating.

###### `IPreconditioner<T>` preconditioner

The preconditioner to use for approximations.

##### Return
###### `Vector<T>`

The result vector `x`.

#### Matrix<T>Stack(Matrix<T> lower)

Stacks this matrix on top of the given matrix and places the result into the result matrix.
##### Parameters
###### `Matrix<T>` lower

The matrix to stack this matrix upon.

##### Return
###### `Matrix<T>`

The combined matrix.

#### voidStack(Matrix<T> lower, Matrix<T> result)

Stacks this matrix on top of the given matrix and places the result into the result matrix.
##### Parameters
###### `Matrix<T>` lower

The matrix to stack this matrix upon.

###### `Matrix<T>` result

The combined matrix.

#### voidStrictlyLowerTriangle(Matrix<T> result)

Puts the strictly lower triangle of this matrix into the result matrix.
##### Parameters
###### `Matrix<T>` result

Where to store the lower triangle.

#### Matrix<T>StrictlyLowerTriangle()

Returns a new matrix containing the lower triangle of this matrix. The new matrix does not contain the diagonal elements of this matrix.
##### Return
###### `Matrix<T>`

The lower triangle of this matrix.

#### Matrix<T>StrictlyUpperTriangle()

Returns a new matrix containing the upper triangle of this matrix. The new matrix does not contain the diagonal elements of this matrix.
##### Return
###### `Matrix<T>`

The upper triangle of this matrix.

#### voidStrictlyUpperTriangle(Matrix<T> result)

Puts the strictly upper triangle of this matrix into the result matrix.
##### Parameters
###### `Matrix<T>` result

Where to store the lower triangle.

#### Matrix<T>SubMatrix(int rowIndex, int rowCount, int columnIndex, int columnCount)

Creates a matrix that contains the values from the requested sub-matrix.
##### Parameters
###### `int` rowIndex

The row to start copying from.

###### `int` rowCount

The number of rows to copy. Must be positive.

###### `int` columnIndex

The column to start copying from.

###### `int` columnCount

The number of columns to copy. Must be positive.

##### Return
###### `Matrix<T>`

The requested sub-matrix.

#### voidSubtract(Matrix<T> other, Matrix<T> result)

Subtracts another matrix from this matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to subtract.

###### `Matrix<T>` result

The matrix to store the result of the subtraction.

#### Matrix<T>Subtract(T scalar)

Subtracts a scalar from each element of the matrix.
##### Parameters
###### `T` scalar

The scalar to subtract.

##### Return
###### `Matrix<T>`

A new matrix containing the subtraction of this matrix and the scalar.

#### voidSubtract(T scalar, Matrix<T> result)

Subtracts a scalar from each element of the matrix and stores the result in the result matrix.
##### Parameters
###### `T` scalar

The scalar to subtract.

###### `Matrix<T>` result

The matrix to store the result of the subtraction.

#### Matrix<T>Subtract(Matrix<T> other)

Subtracts another matrix from this matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to subtract.

##### Return
###### `Matrix<T>`

The result of the subtraction.

#### Matrix<T>SubtractFrom(T scalar)

Subtracts each element of the matrix from a scalar.
##### Parameters
###### `T` scalar

The scalar to subtract from.

##### Return
###### `Matrix<T>`

A new matrix containing the subtraction of the scalar and this matrix.

#### voidSubtractFrom(T scalar, Matrix<T> result)

Subtracts each element of the matrix from a scalar and stores the result in the result matrix.
##### Parameters
###### `T` scalar

The scalar to subtract from.

###### `Matrix<T>` result

The matrix to store the result of the subtraction.

#### Svd<T>Svd(bool computeVectors)

Computes the SVD decomposition for a matrix.
##### Parameters
###### `bool` computeVectors

Compute the singular U and VT vectors or not.

##### Return
###### `Svd<T>`

The SVD decomposition object.

#### T[,]ToArray()

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.
##### Return
###### `T[,]`

A multidimensional containing the values of this matrix.

#### T[][]ToColumnArrays()

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.

#### T[]ToColumnMajorArray()

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.
##### Return
###### `T[]`

An array containing the matrix's elements.

#### stringToMatrixString(int maxRows, int maxColumns, string format, IFormatProvider provider)

Returns a string that summarizes the content of this matrix.

#### stringToMatrixString(string format, IFormatProvider provider)

Returns a string that summarizes the content of this matrix.

#### String[,]ToMatrixStringArray(int upperRows, int lowerRows, int minLeftColumns, int rightColumns, int maxWidth, int padding, string horizontalEllipsis, string verticalEllipsis, string diagonalEllipsis, Func<T, string> formatValue)

Returns a string 2D array that summarizes the content of this matrix.

#### String[,]ToMatrixStringArray(int upperRows, int lowerRows, int leftColumns, int rightColumns, string horizontalEllipsis, string verticalEllipsis, string diagonalEllipsis, Func<T, string> formatValue)

Returns a string 2D array that summarizes the content of this matrix.

#### T[][]ToRowArrays()

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.

#### T[]ToRowMajorArray()

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.
##### Return
###### `T[]`

An array containing the matrix's elements.

#### stringToString(string format, IFormatProvider formatProvider)

Returns a string that summarizes this matrix. The maximum number of cells can be configured in the Control class. The format string is ignored.

#### stringToString(int maxRows, int maxColumns, string format, IFormatProvider formatProvider)

Returns a string that summarizes this matrix.

#### stringToString()

Returns a string that summarizes this matrix. The maximum number of cells can be configured in the Control class.

#### stringToTypeString()

Returns a string that describes the type, dimensions and shape of this matrix.

#### TTrace()

Computes the trace of this matrix.
##### Return
###### `T`

The trace of this matrix

#### Matrix<T>Transpose()

Returns the transpose of this matrix.
##### Return
###### `Matrix<T>`

The transpose of this matrix.

#### voidTranspose(Matrix<T> result)

Puts the transpose of this matrix into the result matrix.

#### Matrix<T>TransposeAndMultiply(Matrix<T> other)

Multiplies this matrix with transpose of another matrix and returns the result.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

##### Return
###### `Matrix<T>`

The result of the multiplication.

#### voidTransposeAndMultiply(Matrix<T> other, Matrix<T> result)

Multiplies this matrix with transpose of another matrix and places the results into the result matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

###### `Matrix<T>` result

The result of the multiplication.

#### voidTransposeThisAndMultiply(Vector<T> rightSide, Vector<T> result)

Multiplies the transpose of this matrix with a vector and places the results into the result vector.
##### Parameters
###### `Vector<T>` rightSide

The vector to multiply with.

###### `Vector<T>` result

The result of the multiplication.

#### Vector<T>TransposeThisAndMultiply(Vector<T> rightSide)

Multiplies the transpose of this matrix by a vector and returns the result.
##### Parameters
###### `Vector<T>` rightSide

The vector to multiply with.

##### Return
###### `Vector<T>`

The result of the multiplication.

#### voidTransposeThisAndMultiply(Matrix<T> other, Matrix<T> result)

Multiplies the transpose of this matrix with another matrix and places the results into the result matrix.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

###### `Matrix<T>` result

The result of the multiplication.

#### Matrix<T>TransposeThisAndMultiply(Matrix<T> other)

Multiplies the transpose of this matrix with another matrix and returns the result.
##### Parameters
###### `Matrix<T>` other

The matrix to multiply with.

##### Return
###### `Matrix<T>`

The result of the multiplication.

#### IterationStatusTrySolveIterative(Vector<T> input, Vector<T> result, IIterativeSolver<T> solver, Iterator<T> iterator, IPreconditioner<T> preconditioner)

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.
##### Parameters
###### `Vector<T>` input

The solution vector `b`.

###### `Vector<T>` result

The result vector `x`.

###### `IIterativeSolver<T>` solver

The iterative solver to use.

###### `Iterator<T>` iterator

The iterator to use to control when to stop iterating.

###### `IPreconditioner<T>` preconditioner

The preconditioner to use for approximations.

#### IterationStatusTrySolveIterative(Matrix<T> input, Matrix<T> result, IIterativeSolver<T> solver, Iterator<T> iterator, IPreconditioner<T> preconditioner)

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.
##### Parameters
###### `Matrix<T>` input

The solution matrix `B`.

###### `Matrix<T>` result

The result matrix `X`

###### `IIterativeSolver<T>` solver

The iterative solver to use.

###### `Iterator<T>` iterator

The iterator to use to control when to stop iterating.

###### `IPreconditioner<T>` preconditioner

The preconditioner to use for approximations.

#### voidUpperTriangle(Matrix<T> result)

Puts the upper triangle of this matrix into the result matrix.
##### Parameters
###### `Matrix<T>` result

Where to store the lower triangle.

#### Matrix<T>UpperTriangle()

Returns a new matrix containing the upper triangle of this matrix.
##### Return
###### `Matrix<T>`

The upper triangle of this matrix.

### Public Properties

#### intColumnCount get; set;

Gets the number of columns.
Value:

#### TItem get; set;

Gets or sets the value at the given row and column, with range checking.
This method is ranged checked. At and At to get and set values without range checking.
Value:

#### intRowCount get; set;

Gets the number of rows.
Value:

#### MatrixStorage<T>Storage get; set;

Gets the raw matrix data storage.

### Public fields

#### T One

The value of 1.0.
 `return T`

#### T Zero

The value of 0.0.
 `return T`

#### MatrixBuilder<T> Build

 `return MatrixBuilder`