LMatrix Structure

Represents a lower triangular matrix.

Definition

Namespace: Austra.Library
Assembly: Austra.Library (in Austra.Library.dll) Version: 2.5.0+44e7797405725ef3cf24b3ff0eba94ce6c649601
C#
public readonly struct LMatrix : IFormattable, 
	IEquatable<LMatrix>, IEqualityOperators<LMatrix, LMatrix, bool>, 
	IEqualityOperators<LMatrix, RMatrix, bool>, IEqualityOperators<LMatrix, Matrix, bool>, 
	IAdditionOperators<LMatrix, LMatrix, LMatrix>, IAdditionOperators<LMatrix, RMatrix, Matrix>, 
	IAdditionOperators<LMatrix, double, LMatrix>, ISubtractionOperators<LMatrix, LMatrix, LMatrix>, 
	ISubtractionOperators<LMatrix, RMatrix, Matrix>, ISubtractionOperators<LMatrix, double, LMatrix>, 
	IMultiplyOperators<LMatrix, Matrix, Matrix>, IMultiplyOperators<LMatrix, DVector, DVector>, 
	IMultiplyOperators<LMatrix, double, LMatrix>, IDivisionOperators<LMatrix, double, LMatrix>, 
	IUnaryNegationOperators<LMatrix, LMatrix>, IMatrix
Inheritance
Object    ValueType    LMatrix
Implements
IMatrix, IEquatableLMatrix, IFormattable, IAdditionOperatorsLMatrix, LMatrix, LMatrix, IAdditionOperatorsLMatrix, RMatrix, Matrix, IAdditionOperatorsLMatrix, Double, LMatrix, IDivisionOperatorsLMatrix, Double, LMatrix, IEqualityOperatorsLMatrix, LMatrix, Boolean, IEqualityOperatorsLMatrix, RMatrix, Boolean, IEqualityOperatorsLMatrix, Matrix, Boolean, IMultiplyOperatorsLMatrix, Matrix, Matrix, IMultiplyOperatorsLMatrix, DVector, DVector, IMultiplyOperatorsLMatrix, Double, LMatrix, ISubtractionOperatorsLMatrix, LMatrix, LMatrix, ISubtractionOperatorsLMatrix, RMatrix, Matrix, ISubtractionOperatorsLMatrix, Double, LMatrix, IUnaryNegationOperatorsLMatrix, LMatrix

Remarks

Having a separate type for lower-triangular matrices is not a matter of storage, but of semantics. For instance, the Cholesky factorization always returns either a lower or upper triangular matrix, so it's important for the API to make clear which type of matrix is returning.

Lower-triangular matrices may have a different number of rows and columns.

Constructors

LMatrix(DVector)Creates a diagonal matrix given its diagonal.
LMatrix(Int32)Creates an empty square matrix.
LMatrix(Int32, NormalRandom)Creates a squared matrix with a standard normal distribution.
LMatrix(Int32, Int32)Creates an empty rectangular matrix.
LMatrix(Int32, Random) Creates a square lower matrix filled with a uniform distribution generator.
LMatrix(Int32, Int32, NormalRandom) Creates a matrix filled with a standard normal distribution.
LMatrix(Int32, Int32, Double) Creates a matrix with a given number of rows and columns, and its internal array.
LMatrix(Int32, Int32, Random) Creates a matrix filled with a uniform distribution generator.
LMatrix(Int32, Random, Double, Double)Creates a square matrix filled with a uniform distribution generator.
LMatrix(Int32, Int32, Random, Double, Double)Creates a matrix filled with a uniform distribution generator.

Properties

ColsGets the number of columns.
IsInitializedHas the matrix been properly initialized?
IsSquareChecks if the matrix is a square one.
ItemGets the value at a single cell.
RowsGets the number of rows.

Methods

AMaxGets the cell with the maximum absolute value.
AMinGets the cell with the minimum absolute value.
CloneCreates an identical lower triangular matrix.
ContainsChecks if the matrix contains the given value.
DeterminantGets the determinant of the matrix.
DiagonalGets the main diagonal.
Equals(LMatrix)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))
GetHashCodeReturns the hashcode for this matrix.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IdentityCreates an identity matrix given its size.
InverseCalculates the inverse of the matrix.
MaximumGets the cell with the maximum value.
MinimumGets the cell with the minimum value.
MultiplyAdd(DVector, DVector)Transforms a vector and adds an offset.
MultiplyAdd(DVector, DVector, Double)Transforms a vector and adds an offset.
MultiplySubtract(DVector, DVector)Transforms a vector and subtracts an offset.
MultiplySubtract(DVector, DVector, Double)Transforms a vector and subtracts an offset.
MultiplyTransposeMultiplies this matrix by the transposed argument.
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(DVector, DVector)Solves the equation Ax = b for x.
SquareMultiplies this matrix by its own transposed.
StatsGets statistics on the matrix cells.
SumCalculates the sum of the matrix cells.
ToStringGets a textual representation of this matrix.
(Overrides ValueTypeToString)
ToString(String, IFormatProvider)Gets a textual representation of this matrix.
TraceCalculates the trace of a matrix.
TransposeTransposes the matrix.

Operators

Addition(Double, LMatrix)Adds a scalar value to a lower triangular matrix.
Addition(LMatrix, LMatrix)Sums two lower matrices with the same size.
Addition(LMatrix, RMatrix)Adds a lower-triangular matrix and an upper-triangular one.
Addition(LMatrix, Double)Adds a scalar value to a lower triangular matrix.
Division(DVector, LMatrix)Solves the equation m*x = v for the vector x.
Division(LMatrix, Double)Divides a matrix by a scalar value.
Division(Matrix, LMatrix)Solves the equation m2*x = m1 for the matrix x.
Equality(LMatrix, LMatrix)Checks two matrices for equality.
Equality(LMatrix, Matrix)Checks two matrices for equality.
Equality(LMatrix, RMatrix)Checks two matrices for equality.
(LMatrix to Matrix) Explicit conversion from a triangular matrix to a rectangular one.
(LMatrix to Double) Explicit conversion from a matrix to a onedimensional array.
(Matrix to LMatrix) Implicit conversion from a rectangular to a lower triangular matrix.
Inequality(LMatrix, LMatrix)Checks two matrices for inequality.
Inequality(LMatrix, Matrix)Checks two matrices for inequality.
Inequality(LMatrix, RMatrix)Checks two matrices for inequality.
Multiply(Double, LMatrix)Multiplies a lower triangular matrix by a scalar value.
Multiply(LMatrix, DVector)Transform a vector using a matrix.
Multiply(LMatrix, LMatrix)Multiplies two lower-triangular matrices.
Multiply(LMatrix, Matrix)Multiplies a lower triangular matrix by a rectangular one.
Multiply(LMatrix, RMatrix)Multiplies a lower-triangular matrix with an upper-triangular one.
Multiply(LMatrix, Double)Multiplies a lower triangular matrix by a scalar value.
Multiply(Matrix, LMatrix)Multiplies a rectangular matrix by a lower triangular one.
Multiply(RMatrix, LMatrix)Multiplies an upper-triangular matrix with a lower-triangular one.
Subtraction(Double, LMatrix)Subtracts a lower triangular matrix from a scalar value.
Subtraction(LMatrix, LMatrix)Subtracts two lower matrices with the same size.
Subtraction(LMatrix, RMatrix)Subtracts an upper triangular matrix from a lower triangular one.
Subtraction(LMatrix, Double)Subtracts a scalar value from a lower triangular matrix.
UnaryNegation(LMatrix)Negates a lower matrix.

See Also