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.AnyRectangularMatrix Class Reference

Describes the form of all real matrices. More...

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

Public Member Functions

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

Protected Member Functions

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

Static Private Member Functions

static bool InternalEquals (AnyRectangularMatrix A, AnyRectangularMatrix B)
 

Additional Inherited Members

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

Detailed Description

Describes the form of all real matrices.

This is an abstract class that describes any real matrix. If you wish to create a concrete instance of a real, non-square matrix, use the RectangularMatrix class. If, on the other hand, you wish to write a function that can operate on any real matrix, it's probably a good idea to accept a AnyRectangularMatrix, so that any concrete implementation can also be passed into your function.

Constructor & Destructor Documentation

Meta.Numerics.Matrices.AnyRectangularMatrix.AnyRectangularMatrix ( )
inlineprotected

Member Function Documentation

virtual double Meta.Numerics.Matrices.AnyRectangularMatrix.OneNorm ( )
inlinevirtual

Computes the 1-norm of the matrix.

Returns
||M||1

The 1-norm of a matrix is the largest column sum.

Reimplemented in Meta.Numerics.Matrices.SquareMatrix, and Meta.Numerics.Matrices.RectangularMatrix.

Referenced by Test.SymmetricMatrixTest.SymmetricMatrixNorms().

virtual double Meta.Numerics.Matrices.AnyRectangularMatrix.InfinityNorm ( )
inlinevirtual

Computes the &#x221E;-norm of the matrix.

Returns
||M||&#x221E;

The &#x221E;-norm of a matrix is the largest row sum.

Reimplemented in Meta.Numerics.Matrices.SquareMatrix, and Meta.Numerics.Matrices.RectangularMatrix.

Referenced by Meta.Numerics.Analysis.FunctionMath.FindZero(), and Test.SymmetricMatrixTest.SymmetricMatrixNorms().

virtual double Meta.Numerics.Matrices.AnyRectangularMatrix.FrobeniusNorm ( )
inlinevirtual

Computes the Frobenius-norm of the matrix.

Returns
||M||F

The Frobenius-norm of a matrix the square root of the sum of the squares of all the elements. In the case of a row or column vector, this reduces to the Euclidean vector norm.

References Meta.Numerics.MoreMath.Sqr().

Referenced by Test.RectangularMatrixTest.RectangularMatrixNorms(), Meta.Numerics.Matrices.SparseSquareMatrix.Solve(), Test.SquareMatrixTest.SquareMatrixNorms(), and Test.SymmetricMatrixTest.SymmetricMatrixNorms().

virtual ColumnVector Meta.Numerics.Matrices.AnyRectangularMatrix.Column ( int  c)
inlinevirtual

Gets a copy of the specified column.

Parameters
cThe (zero-based) column index.
Returns
An independent copy of the specified column.

Reimplemented in Meta.Numerics.Matrices.SparseSquareMatrix, Meta.Numerics.Matrices.SquareMatrix, and Meta.Numerics.Matrices.RectangularMatrix.

Referenced by Test.RectangularMatrixTest.RectangularMatrixAccess(), and Test.SymmetricMatrixTest.SymmetricMatrixAccess().

virtual RowVector Meta.Numerics.Matrices.AnyRectangularMatrix.Row ( int  r)
inlinevirtual

Gets a copy of the specified row.

Parameters
rThe (zero-based) row index.
Returns
An independent copy of the specified row.

Reimplemented in Meta.Numerics.Matrices.SparseSquareMatrix, Meta.Numerics.Matrices.RectangularMatrix, and Meta.Numerics.Matrices.SquareMatrix.

Referenced by Test.RectangularMatrixTest.RectangularMatrixAccess(), and Test.SymmetricMatrixTest.SymmetricMatrixAccess().

static RectangularMatrix Meta.Numerics.Matrices.AnyRectangularMatrix.operator+ ( AnyRectangularMatrix  A,
AnyRectangularMatrix  B 
)
inlinestatic

Adds any two real, rectangular matrices.

Parameters
AThe first matrix.
BThe second matrix.
Returns
The sum matrix A + B.

Matrix addition is an O(N2) process.

References Meta.Numerics.Matrices.AnyMatrix< T >.ColumnCount, Meta.Numerics.Matrices.RectangularMatrix.ColumnCount, Meta.Numerics.Matrices.AnyMatrix< T >.RowCount, and Meta.Numerics.Matrices.RectangularMatrix.RowCount.

static RectangularMatrix Meta.Numerics.Matrices.AnyRectangularMatrix.operator- ( AnyRectangularMatrix  A,
AnyRectangularMatrix  B 
)
inlinestatic

Subtracts any two real, rectangular matrices.

Parameters
AThe first matrix.
BThe second matrix.
Returns
The difference matrix A - B.

Matrix subtraction is an O(N2) process.

References Meta.Numerics.Matrices.AnyMatrix< T >.ColumnCount, Meta.Numerics.Matrices.RectangularMatrix.ColumnCount, Meta.Numerics.Matrices.AnyMatrix< T >.RowCount, and Meta.Numerics.Matrices.RectangularMatrix.RowCount.

static RectangularMatrix Meta.Numerics.Matrices.AnyRectangularMatrix.operator* ( AnyRectangularMatrix  A,
AnyRectangularMatrix  B 
)
inlinestatic

Multiplies any two real, rectangular matrices.

Parameters
AThe first matrix.
BThe second matrix.
Returns
The product matrix AB.

For matrix multiplication, the column count of the first matrix must equal the row count of the second matrix.

Matrix multiplication is an O(N3) process.

References Meta.Numerics.Matrices.AnyMatrix< T >.ColumnCount, and Meta.Numerics.Matrices.AnyMatrix< T >.RowCount.

virtual SymmetricMatrix Meta.Numerics.Matrices.AnyRectangularMatrix.MultiplySelfByTranspose ( )
inlinevirtual

Computes the product of the matrix and its transpose.

Returns
The product matrix A AT.

Referenced by Test.RectangularMatrixTest.MatrixSelfMultiplication().

virtual SymmetricMatrix Meta.Numerics.Matrices.AnyRectangularMatrix.MultiplyTransposeBySelf ( )
inlinevirtual

Computes the product of the matrix's transpose and itself.

Returns
The product matrix AT A.

Referenced by Test.RectangularMatrixTest.MatrixSelfMultiplication().

static RectangularMatrix Meta.Numerics.Matrices.AnyRectangularMatrix.operator* ( double  alpha,
AnyRectangularMatrix  A 
)
inlinestatic

Multiplies any real, rectangular matrix by a real constant.

Parameters
alphaThe constant.
AThe matrix.
Returns
The product matrix.

References Meta.Numerics.Matrices.AnyMatrix< T >.ColumnCount, and Meta.Numerics.Matrices.AnyMatrix< T >.RowCount.

static ColumnVector Meta.Numerics.Matrices.AnyRectangularMatrix.operator* ( AnyRectangularMatrix  A,
ColumnVector  v 
)
inlinestatic

Multiplies any real, rectangular matrix with a real column vector.

Parameters
AThe matrix.
vThe column vector.
Returns
The product column vector.

References Meta.Numerics.Matrices.AnyMatrix< T >.ColumnCount, Meta.Numerics.Matrices.VectorBase.Dimension, and Meta.Numerics.Matrices.AnyMatrix< T >.RowCount.

static bool Meta.Numerics.Matrices.AnyRectangularMatrix.InternalEquals ( AnyRectangularMatrix  A,
AnyRectangularMatrix  B 
)
inlinestaticprivate
static bool Meta.Numerics.Matrices.AnyRectangularMatrix.operator== ( AnyRectangularMatrix  A,
AnyRectangularMatrix  B 
)
inlinestatic

Determines whether two matrices are equal.

Parameters
AThe first matrix.
BThe second matrix.
Returns
True if A and B are equal, otherwise false.
static bool Meta.Numerics.Matrices.AnyRectangularMatrix.operator!= ( AnyRectangularMatrix  A,
AnyRectangularMatrix  B 
)
inlinestatic

Determines whether two matrices are not equal.

Parameters
AThe first matrix.
BThe second matrix.
Returns
False if A and B are equal, otherwise true.
bool Meta.Numerics.Matrices.AnyRectangularMatrix.Equals ( AnyRectangularMatrix  other)
inline

Determines whether the given matrix equals the current matrix.

Parameters
otherThe matrix to compare.
Returns
True if the other is equal to the current matrix, otherwise false.

Referenced by Test.RectangularMatrixTest.RectangularMatrixEquality().

override bool Meta.Numerics.Matrices.AnyRectangularMatrix.Equals ( object  obj)
inline

Determines whether the given object is an equal matrix.

Parameters
objThe object to compare.
Returns
True if obj is an equal matrix, otherwise false.
override int Meta.Numerics.Matrices.AnyRectangularMatrix.GetHashCode ( )
inline

Not a valid operation.

Returns
Throws an InvalidOperationException.

The Object.GetHashCode method is used to provide a quick equality test when an object is used as a key in a System.Collections.Generic.Dictionary{TKey,TValue} or System.Collections.Hashtable. Since a useful hash code of a matrix would need to involve all its elements, it is not possible to make this a fast operation. Also, since matrices are not immutable, they should not be used as hash keys. (A matrix might be changed after it had already been used as a key.) For these reasons, requesting a hash code for a matrix is not supported.

Exceptions
NotSupportedExceptionThis method always throws this exception.

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