Represents a Matrix whose elements above or below the main diagonal are zero.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly:   Extreme.Numerics (in Extreme.Numerics)
Version: 2.1.7017.0

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public NotInheritable Class TriangularMatrix _
	Inherits Matrix _
	Implements ISerializable, IDoubleStorage
C#
[SerializableAttribute]
public sealed class TriangularMatrix : Matrix, ISerializable, IDoubleStorage
Visual C++
[SerializableAttribute]
public ref class TriangularMatrix sealed : public Matrix, ISerializable, IDoubleStorage

Remarks

Use the TriangularMatrix class to represent dense matrices whose elements above or below the diagonal are zero. The name is derived from the shape of the non-zero elements, which form a triangle. However, this class also represents rectangular matrices, whose non-zero elements may form a trapezoid.

A TriangularMatrix can be either upper or lower-triangular, depending on which components are non-zero. This property is available as the TriangleMode property. It is of type MatrixTriangleMode, and must be specified at construction.

Sometimes, the components on the diagonal are all equal to one. In this case, the matrix is said to be unit-diagonal, and the IsUnitDiagonal property will be true. Once again, this must be specified at the time the matrix is constructed.

Only the non-zero components of a triangular matrix can be modified. The diagonal components of a unit-diagonal matrix can't be modified. An attempt to do so will result in an ComponentReadOnlyException. You can verify if a component can be modified by calling the IsComponentWritable(Int32, Int32) method.

The components of a TriangularMatrix are stored in a one-dimensional array of Double values. By default, components that are adjacent in a column of the matrix are adjacent in the storage array. The components are said to be stored in column major order. It is also possible to have elements stored in row major order.

Triangular matrices can be constructed from scratch, or they can be derived or extracted from a GeneralMatrix using one of the ExtractLowerTriangle(GeneralMatrix, Int32, Int32, MatrixDiagonalMode) or ExtractUpperTriangle(GeneralMatrix) methods.

The rows and column vectors of a triangular matrix are of type BandVector.

The TriangularMatrix class implements algorithms using the triangular matrix BLAS and LAPACK routines. These routines assume matrix components are stored in column major order. However, any necessary conversions are performed transparantly. No additional work is needed. In some cases there might be a small performance penalty.

TriangularMatrix objects are used as properties of many matrix decompositions. Both factors of the LU decomposition are triangular. So is at least one factor of the Cholesky Decomposition and the QR Decomposition.

Inheritance Hierarchy

System.Object
  Extreme.Mathematics.LinearAlgebra.LinearTransformation
    Extreme.Mathematics.LinearAlgebra.Matrix
      Extreme.Mathematics.LinearAlgebra.TriangularMatrix

See Also