IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Meta.Numerics.Matrices.TridiagonalMatrix Class Reference

Represents a tridiagonal matrix. More...

+ Inheritance diagram for Meta.Numerics.Matrices.TridiagonalMatrix:
+ Collaboration diagram for Meta.Numerics.Matrices.TridiagonalMatrix:

Public Member Functions

 TridiagonalMatrix (int dimension)
 Initializes a new tridiagonal matrix of the given dimension. More...
 
TridiagonalMatrix Copy ()
 Copies the matrix. More...
 
TridiagonalMatrix Transpose ()
 Creates a transpose of the matrix. More...
 
double Determinant ()
 Computes the determinant of the matrxi. More...
 
TridiagonalLUDecomposition LUDecomposition ()
 Computes the LU decomposition of the matrix. More...
 
- Public Member Functions inherited from Meta.Numerics.Matrices.AnySquareMatrix
virtual double Trace ()
 Computes the trace of the square matrix. More...
 
- Public Member Functions inherited from Meta.Numerics.Matrices.AnyRectangularMatrix
virtual double OneNorm ()
 Computes the 1-norm of the matrix. More...
 
virtual double InfinityNorm ()
 Computes the ∞-norm of the matrix. More...
 
virtual double FrobeniusNorm ()
 Computes the Frobenius-norm of the matrix. More...
 
virtual ColumnVector Column (int c)
 Gets a copy of the specified column. More...
 
virtual RowVector Row (int r)
 Gets a copy of the specified row. More...
 
virtual SymmetricMatrix MultiplySelfByTranspose ()
 Computes the product of the matrix and its transpose. More...
 
virtual SymmetricMatrix MultiplyTransposeBySelf ()
 Computes the product of the matrix's transpose and itself. More...
 
bool Equals (AnyRectangularMatrix other)
 Determines whether the given matrix equals the current matrix. More...
 
override bool Equals (object obj)
 Determines whether the given object is an equal matrix. More...
 
override int GetHashCode ()
 Not a valid operation. More...
 
- Public Member Functions inherited from Meta.Numerics.Matrices.AnyMatrix< T >
virtual void Fill (Func< int, int, T > f)
 Sets all matrix entries according to a supplied fill function. More...
 
virtual T[,] ToArray ()
 Copies the matrix into an array. More...
 

Static Public Member Functions

static TridiagonalMatrix operator+ (TridiagonalMatrix T1, TridiagonalMatrix T2)
 Adds two tridiagonal matrices. More...
 
static TridiagonalMatrix operator- (TridiagonalMatrix T1, TridiagonalMatrix T2)
 Subtracts two tridiagonal matrices. More...
 
static TridiagonalMatrix operator* (double f, TridiagonalMatrix T)
 Multiplies a tridiagonal matrix by a real constant. More...
 
- Static Public Member Functions inherited from Meta.Numerics.Matrices.AnySquareMatrix
static SquareMatrix operator+ (AnySquareMatrix A, AnySquareMatrix B)
 Adds any two real, square matrices. More...
 
static SquareMatrix operator- (AnySquareMatrix A, AnySquareMatrix B)
 Subtracts any two real, square matrices. More...
 
static SquareMatrix operator* (AnySquareMatrix A, AnySquareMatrix B)
 Multiplies any two real, square matrices. More...
 
- Static Public Member Functions inherited from Meta.Numerics.Matrices.AnyRectangularMatrix
static RectangularMatrix operator+ (AnyRectangularMatrix A, AnyRectangularMatrix B)
 Adds any two real, rectangular matrices. More...
 
static RectangularMatrix operator- (AnyRectangularMatrix A, AnyRectangularMatrix B)
 Subtracts any two real, rectangular matrices. More...
 
static RectangularMatrix operator* (AnyRectangularMatrix A, AnyRectangularMatrix B)
 Multiplies any two real, rectangular matrices. More...
 
static RectangularMatrix operator* (double alpha, AnyRectangularMatrix A)
 Multiplies any real, rectangular matrix by a real constant. More...
 
static ColumnVector operator* (AnyRectangularMatrix A, ColumnVector v)
 Multiplies any real, rectangular matrix with a real column vector. More...
 
static bool operator== (AnyRectangularMatrix A, AnyRectangularMatrix B)
 Determines whether two matrices are equal. More...
 
static bool operator!= (AnyRectangularMatrix A, AnyRectangularMatrix B)
 Determines whether two matrices are not equal. More...
 

Properties

override int Dimension [get]
 Gets the dimension of the matrix. More...
 
override double this[int r, int c] [get, set]
 Gets or sets a matrix element. More...
 
- Properties inherited from Meta.Numerics.Matrices.AnySquareMatrix
abstract int Dimension [get]
 Gets or sets the dimension of the square matrix. More...
 
override int RowCount [get]
 
override int ColumnCount [get]
 
- Properties inherited from Meta.Numerics.Matrices.AnyMatrix< T >
abstract int RowCount [get]
 Gets the number of matrix rows. More...
 
abstract int ColumnCount [get]
 Gets the number of matrix columns. More...
 
abstract T this[int r, int c] [get, set]
 Gets or sets the value of a matrix entry. More...
 
bool IsReadOnly [get, set]
 Gets a flag indicating whether the matrix is read-only. More...
 

Private Member Functions

int BoundsCheck (int r, int c)
 

Static Private Member Functions

static void TridiagonalLUDecompose (double[] L, double[] D, double[] U, out double[] V, out int[] P, out int pi)
 

Private Attributes

int dimension
 
double[] U
 
double[] D
 
double[] L
 

Additional Inherited Members

- Protected Member Functions inherited from Meta.Numerics.Matrices.AnyRectangularMatrix
 AnyRectangularMatrix ()
 
- Protected Member Functions inherited from Meta.Numerics.Matrices.AnyMatrix< T >
 AnyMatrix ()
 

Detailed Description

Represents a tridiagonal matrix.

Constructor & Destructor Documentation

Meta.Numerics.Matrices.TridiagonalMatrix.TridiagonalMatrix ( int  dimension)
inline

Initializes a new tridiagonal matrix of the given dimension.

Parameters
dimensionThe dimension of the matrix, which must be positive.

Member Function Documentation

int Meta.Numerics.Matrices.TridiagonalMatrix.BoundsCheck ( int  r,
int  c 
)
inlineprivate
TridiagonalMatrix Meta.Numerics.Matrices.TridiagonalMatrix.Copy ( )
inline

Copies the matrix.

Returns
An independent copy of the matrix.

Referenced by Test.TridiagonalMatrixTest.TridiagonalMatrixDuplicationTest().

TridiagonalMatrix Meta.Numerics.Matrices.TridiagonalMatrix.Transpose ( )
inline

Creates a transpose of the matrix.

Returns
The matrix transpose MT.

Referenced by Test.TridiagonalMatrixTest.TridiagonalMatrixDuplicationTest().

double Meta.Numerics.Matrices.TridiagonalMatrix.Determinant ( )
inline

Computes the determinant of the matrxi.

Returns
The determinant det M.

Computing the determinant of a tridiagonal matrix is an O(N) operation.

Referenced by Test.TridiagonalMatrixTest.TridiagonalMatrixLUDecompositionTest().

TridiagonalLUDecomposition Meta.Numerics.Matrices.TridiagonalMatrix.LUDecomposition ( )
inline

Computes the LU decomposition of the matrix.

Returns
The LU decomposition of the matrix.

Computiong the LU decomposition of a tridiagonal matrix is an O(N) operation.

Referenced by Test.TridiagonalMatrixTest.TridiagonalMatrixLUDecompositionTest().

static void Meta.Numerics.Matrices.TridiagonalMatrix.TridiagonalLUDecompose ( double[]  L,
double[]  D,
double[]  U,
out double[]  V,
out int[]  P,
out int  pi 
)
inlinestaticprivate
static TridiagonalMatrix Meta.Numerics.Matrices.TridiagonalMatrix.operator+ ( TridiagonalMatrix  T1,
TridiagonalMatrix  T2 
)
inlinestatic

Adds two tridiagonal matrices.

Parameters
T1The first matrix M1.
T2The first matrix M2.
Returns
The sum M1 + M2.

References Meta.Numerics.Matrices.TridiagonalMatrix.Dimension.

static TridiagonalMatrix Meta.Numerics.Matrices.TridiagonalMatrix.operator- ( TridiagonalMatrix  T1,
TridiagonalMatrix  T2 
)
inlinestatic

Subtracts two tridiagonal matrices.

Parameters
T1The first matrix M1.
T2The first matrix M2.
Returns
The difference M1 - M2.

References Meta.Numerics.Matrices.TridiagonalMatrix.Dimension.

static TridiagonalMatrix Meta.Numerics.Matrices.TridiagonalMatrix.operator* ( double  f,
TridiagonalMatrix  T 
)
inlinestatic

Multiplies a tridiagonal matrix by a real constant.

Parameters
fThe constant.
TThe matrix.
Returns
The product matrix.

References Meta.Numerics.Matrices.TridiagonalMatrix.Dimension.

Member Data Documentation

int Meta.Numerics.Matrices.TridiagonalMatrix.dimension
private
double [] Meta.Numerics.Matrices.TridiagonalMatrix.U
private
double [] Meta.Numerics.Matrices.TridiagonalMatrix.D
private
double [] Meta.Numerics.Matrices.TridiagonalMatrix.L
private

Property Documentation

override double Meta.Numerics.Matrices.TridiagonalMatrix.this[int r, int c]
getset

Gets or sets a matrix element.

Parameters
rThe (zero-based) row number of the element.
cThe (zero-based) column number of the element.
Returns
Mr,c

Elements on the tridiagonal strip can be set and gotten normally. Other elements will always have the value zero, and any attempt to set them to a non-zero value will result in an InvalidOperationException.


The documentation for this class was generated from the following file: