AUSTRA

Represents a dense rectangular matrix.

C#

```
public readonly struct Matrix : IFormattable,
IEquatable<Matrix>, IEqualityOperators<Matrix, Matrix, bool>,
IEqualityOperators<Matrix, LMatrix, bool>, IEqualityOperators<Matrix, RMatrix, bool>,
IAdditionOperators<Matrix, Matrix, Matrix>, IAdditionOperators<Matrix, LMatrix, Matrix>,
IAdditionOperators<Matrix, double, Matrix>, ISubtractionOperators<Matrix, Matrix, Matrix>,
ISubtractionOperators<Matrix, LMatrix, Matrix>, ISubtractionOperators<Matrix, double, Matrix>,
IMultiplyOperators<Matrix, Matrix, Matrix>, IMultiplyOperators<Matrix, DVector, DVector>,
IMultiplyOperators<Matrix, double, Matrix>, IDivisionOperators<Matrix, double, Matrix>,
IUnaryNegationOperators<Matrix, Matrix>, IPointwiseOperators<Matrix>,
IMatrix
```

- Implements
- IMatrix, IPointwiseOperatorsMatrix, IEquatableMatrix, IFormattable, IAdditionOperatorsMatrix, Matrix, Matrix, IAdditionOperatorsMatrix, LMatrix, Matrix, IAdditionOperatorsMatrix, Double, Matrix, IDivisionOperatorsMatrix, Double, Matrix, IEqualityOperatorsMatrix, Matrix, Boolean, IEqualityOperatorsMatrix, LMatrix, Boolean, IEqualityOperatorsMatrix, RMatrix, Boolean, IMultiplyOperatorsMatrix, Matrix, Matrix, IMultiplyOperatorsMatrix, DVector, DVector, IMultiplyOperatorsMatrix, Double, Matrix, ISubtractionOperatorsMatrix, Matrix, Matrix, ISubtractionOperatorsMatrix, LMatrix, Matrix, ISubtractionOperatorsMatrix, Double, Matrix, IUnaryNegationOperatorsMatrix, Matrix

Values are stored in a one-dimensional array, in row-major order. Compatibility with bidimensional arrays, however, has been preserved.

Most methods respect immutability at the cost of extra allocations. Methods like MultiplyAdd(DVector, Double, DVector) save unneeded allocations. Most methods are hardware accelerated, either by using managed references, SIMD operations or both. Memory pinning has also been reduced to the minimum.

Matrix(Double) | Creates a diagonal matrix given its diagonal. |

Matrix(DVector) | Creates a diagonal matrix given its diagonal. |

Matrix(DVector) | Creates a matrix given its rows. |

Matrix(Int32) | Creates an empty square matrix. |

Matrix(Int32, NormalRandom) | Creates a squared matrix filled with a standard normal distribution. |

Matrix(Int32, FuncInt32, Int32, Double) | Creates a square matrix using a formula to fill its cells. |

Matrix(Int32, Int32) | Creates an empty rectangular matrix. |

Matrix(Int32, Random) | Creates a square matrix filled with a uniform distribution generator. |

Matrix(Int32, Int32, NormalRandom) | Creates a matrix filled with a standard normal distribution. |

Matrix(Int32, Int32, Double) | Creates a matrix with a given number of rows and columns, and its internal array. |

Matrix(Int32, Int32, FuncInt32, Int32, Double) | Creates a matrix using a formula to fill its cells. |

Matrix(Int32, Int32, Random) | Creates a matrix filled with a uniform distribution generator. |

Matrix(Int32, Random, Double, Double) | Creates a square matrix filled with a uniform distribution generator. |

Matrix(Int32, Int32, Random, Double, Double) | Creates a matrix filled with a uniform distribution generator. |

Cols | Gets the number of columns. |

IsInitialized | Has the matrix been properly initialized? |

IsSquare | Checks if the matrix is a square one. |

ItemIndex, Index | Gets the value of a single cell using Index. |

ItemIndex, Range | Gets a range of rows and columns as a new matrix. |

ItemInt32, Int32 | Gets or sets the value of a single cell. |

ItemInt32, Range | Gets a range of rows and columns as a new matrix. |

ItemRange, Index | Gets a range of rows and columns as a new matrix. |

ItemRange, Int32 | Gets a range of rows and columns as a new matrix. |

ItemRange, Range | Gets a range of rows and columns as a new matrix. |

Rows | Gets the number of rows. |

All | Checks whether the predicate is satified by all cells. |

AMax | Gets the cell with the maximum absolute value. |

AMin | Gets the cell with the minimum absolute value. |

Any | Checks whether the predicate is satified by at least one cell. |

Cholesky | Computes the Cholesky decomposition of this matrix. |

CholeskyMatrix | Computes the Cholesky decomposition of this matrix. |

Clone | Creates an identical rectangular matrix. |

Contains | Checks if the matrix contains the given value. |

Determinant | Gets the determinant of the matrix. |

Diagonal | Gets the main diagonal. |

Distance | Computes the maximum difference between cells. |

Equals(Matrix) | Checks if the provided argument is a matrix with the same values. |

Equals(Object) | Checks if the provided argument is a matrix with the same values. (Overrides ValueTypeEquals(Object)) |

EVD | Computes the eigenvalue decomposition. |

EVD(NullableBoolean) | Computes the eigenvalue decomposition. |

FromColumns | Creates a matrix given its columns. |

GetColumn(Index) | Gets a copy of a column as a vector, using Index. |

GetColumn(Int32) | Gets a copy of a column as a vector. |

GetHashCode | Returns the hashcode for this matrix. (Overrides ValueTypeGetHashCode) |

GetRow(Index) | Gets a copy of a row as a vector, using Index. |

GetRow(Int32) | Gets a copy of a row as a vector. |

GetType | Gets the Type of the current instance. (Inherited from Object) |

HCat(Matrix) | Horizontal concatenation of an array of matrices. |

HCat(DVector, Matrix) | Horizontal concatenation of a new column and a matrix. |

HCat(Matrix, DVector) | Horizontal concatenation of a matrix and a new column. |

HCat(Matrix, Matrix) | Horizontal concatenation of two matrices. |

Identity | Creates an identity matrix given its size. |

Inverse | Calculates the inverse of the matrix. |

IsSymmetric | Checks if the matrix is a symmetric one. |

LU | Performs the LUP decomposition of this matrix. |

Map | Applies a function to each cell of the matrix. |

Maximum | Gets the cell with the maximum value. |

Minimum | Gets the cell with the minimum value. |

MultiplyAdd(CVector, CVector) | Transforms a complex vector and adds an offset. |

MultiplyAdd(DVector, DVector) | Transforms a vector and adds an offset. |

MultiplyAdd(DVector, Double, DVector) | Transforms a vector and adds an offset. |

MultiplySubtract(CVector, CVector) | Transforms a complex vector and subtracts an offset. |

MultiplySubtract(DVector, DVector) | Transforms a vector and subtracts an offset. |

MultiplyTranspose(Matrix) | Multiplies this matrix by the transposed argument. |

MultiplyTranspose(Matrix, Double) | Multiplies this matrix by the transposed argument. |

PointwiseDivide | Cell by cell division with a second matrix. |

PointwiseMultiply | Cell by cell product with a second matrix. |

Redim(Int32) | Creates a new matrix with different dimensions. |

Redim(Int32, Int32) | Creates a new matrix with different dimensions. |

Solve(DVector) | Solves the equation Ax = b for x. |

Solve(Matrix) | Solves the equation AX = B for the matrix X. |

Square | Multiplies this matrix by itself. |

Stats | Gets statistics on the matrix cells. |

SubtractMultiply(CVector, CVector) | Optimized subtraction of transformed complex vector. |

SubtractMultiply(DVector, DVector) | Optimized subtraction of transformed vector. |

Sum | Calculates the sum of the matrix cells. |

SymEVD | Computes the eigenvalue decomposition for a symmetric matrix. |

ToString | Gets a textual representation of this matrix. (Overrides ValueTypeToString) |

ToString(String, IFormatProvider) | Gets a textual representation of this matrix. |

Trace | Calculates the trace of a matrix. |

Transform | Transforms a vector using a matrix and a preallocated buffer. |

Transpose | Transposes the matrix. |

TransposeMultiply | Transforms a vector using the transpose of this matrix. |

TryCholesky | Tentative Cholesky decomposition. |

VCat(Matrix) | Vertical concatenation of an array of matrices. |

VCat(DVector, Matrix) | Vertical concatenation of a row vector and a matrix. |

VCat(Matrix, DVector) | Vertical concatenation of a matrix and a row vector. |

VCat(Matrix, Matrix) | Vertical concatenation of two matrices. |

Addition(Double, Matrix) | Adds a scalar to a matrix. |

Addition(LMatrix, Matrix) | Adds a lower triangular matrix to a full matrix. |

Addition(Matrix, LMatrix) | Adds a full matrix to a lower triangular matrix. |

Addition(Matrix, Matrix) | Sums two matrices with the same size. |

Addition(Matrix, RMatrix) | Adds a full matrix to an upper triangular matrix. |

Addition(Matrix, Double) | Adds a scalar to a matrix. |

Addition(RMatrix, Matrix) | Adds an upper triangular matrix to a full matrix. |

Division(DVector, Matrix) | Solves the equation m*x = v for the vector x. |

Division(Matrix, Matrix) | Solves the equation m2*x = m1 for the matrix x. |

Division(Matrix, Double) | Divides a matrix by a scalar value. |

Equality(Matrix, LMatrix) | Checks two matrices for equality. |

Equality(Matrix, Matrix) | Checks two matrices for equality. |

Equality(Matrix, RMatrix) | Checks two matrices for equality. |

(Matrix to Double) | Explicit conversion from a matrix to a 1D-array. |

(Matrix to Double) | Explicit conversion from a matrix to a 2D-array. |

Inequality(Matrix, LMatrix) | Checks two matrices for inequality. |

Inequality(Matrix, Matrix) | Checks two matrices for inequality. |

Inequality(Matrix, RMatrix) | Checks two matrices for inequality. |

Multiply(CVector, Matrix) | Transform a complex vector using the transposed matrix. |

Multiply(Double, Matrix) | Multiplies a matrix by a scalar value. |

Multiply(DVector, Matrix) | Transform a vector using the transposed matrix. |

Multiply(Matrix, CVector) | Transform a complex vector using a matrix. |

Multiply(Matrix, DVector) | Transform a vector using a matrix. |

Multiply(Matrix, Matrix) | Multiplies two compatible matrices. |

Multiply(Matrix, Double) | Multiplies a matrix by a scalar value. |

Subtraction(Double, Matrix) | Subtracts a matrix from a scalar. |

Subtraction(LMatrix, Matrix) | Subtracts a full matrix from a lower-triangular matrix. |

Subtraction(Matrix, LMatrix) | Subtracts a lower-triangular matrix from a full matrix. |

Subtraction(Matrix, Matrix) | Subtracts two matrices with the same size. |

Subtraction(Matrix, RMatrix) | Subtracts an upper-triangular matrix from a full matrix. |

Subtraction(Matrix, Double) | Subtracts a scalar from a matrix. |

Subtraction(RMatrix, Matrix) | Subtracts a full matrix from an upper-triangular matrix. |

UnaryNegation(Matrix) | Negates a matrix. |