IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Num::IMatrix Interface Reference

Real matrix interface. More...

Inheritance diagram for IG::Num::IMatrix:

List of all members.

Public Member Functions

IMatrix GetCopy ()
 Creates and returns a copy of the current matrix.
IMatrix GetNew (int rowCount, int columnCount)
 Creates and returns a new matrix with the specified dimensions, and of the same type as the current matrix.
IMatrix GetNew ()
 Creates and returns a new matrix with the same dimensions and of the same type as the current matrix.
IVector GetNewVector (int length)
 Creates and returns a new vector with the specified dimension, and of the type that is consistent with the type of the current vector.
void SetConstant (double elementValue)
 Sets all components of the current matrix to the specified value.
void SetIdentity ()
 Sets the current matrix to identity matrix.
void SetRandom ()
 Sets the current matrix such that it contains random elements on the interval (0,1].
void SetRandom (IRandomGenerator rnd)
 Sets the current matrix such that it contains random elements on the interval (0,1].
void SetDiagonal (double diagonalElement)
 Sets the current matrix to the diagonal matrix with all diagonal elements equal to the specified value. Matrix does not need to be a square matrix.
void SetDiagonal (IVector diagonal)
 Sets the current matrix to the diagonal matrix with diagonal element specified by a vector.
bool IsSquare ()
 Returns true if the current matrix is a square matrix, and false if not.
bool IsSymmetric ()
 Returns true if the current matrix is symmetric, and false if not. If the matrix is not a square matrix then false is returned.
bool IsSymmetric (double relativeRMSTolerance)
 Returns true if the specified matrix is symmetric within some tolerance, and false if not. If the matrix is null then false is returned.
string ToStringNewlines ()
 Returns a string representation of this matrix with newlines inserted after each row. Rows and elements are printed in comma separated lists in curly brackets.
string ToStringNewlines (string elementFormat)
 Returns a string representation of this matrix with newlines inserted after each row, with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets.
string ToStringMath ()
 Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.
string ToString ()
 Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.
string ToString (string elementFormat)
 Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix.
string ToStringMath (string elementFormat)
 Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix.
int GetHashFunctionInt ()
 Returns an integer valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionInt method.
string GetHashFunctionString ()
 Returns a string valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionString method.

Detailed Description

Real matrix interface.

$A Igor Sep08 Dec09;


Member Function Documentation

IMatrix IG::Num::IMatrix::GetCopy ( )

Creates and returns a copy of the current matrix.

Returns:
A new copy of the current matrix. The copy is supposed to be of the same type as the current matrix.

Implemented in IG::Num::MatrixBase.

IMatrix IG::Num::IMatrix::GetNew ( int  rowCount,
int  columnCount 
)

Creates and returns a new matrix with the specified dimensions, and of the same type as the current matrix.

Parameters:
rowCountNumber fo rows of the newly created matrix.
columnCountNumber of columns of the newly created matrix.
Returns:
A newly created matrix of the specified dimensions and of the same type as the current matrix.

Implemented in IG::Num::MatrixBase.

IMatrix IG::Num::IMatrix::GetNew ( )

Creates and returns a new matrix with the same dimensions and of the same type as the current matrix.

Implemented in IG::Num::MatrixBase.

IVector IG::Num::IMatrix::GetNewVector ( int  length)

Creates and returns a new vector with the specified dimension, and of the type that is consistent with the type of the current vector.

Parameters:
lengthDimension of the newly created vector.
Returns:
A newly created vector of the specified dimension and of the same type as the current vector.

Implemented in IG::Num::MatrixBase.

void IG::Num::IMatrix::SetConstant ( double  elementValue)

Sets all components of the current matrix to the specified value.

Parameters:
elementValueValue to which elements are set.

Implemented in IG::Num::MatrixBase.

void IG::Num::IMatrix::SetIdentity ( )

Sets the current matrix to identity matrix.

Implemented in IG::Num::MatrixBase.

void IG::Num::IMatrix::SetRandom ( )

Sets the current matrix such that it contains random elements on the interval (0,1].

Implemented in IG::Num::MatrixBase.

void IG::Num::IMatrix::SetRandom ( IRandomGenerator  rnd)

Sets the current matrix such that it contains random elements on the interval (0,1].

Parameters:
rndRandom generator used to generate matrix elements.

Implemented in IG::Num::MatrixBase.

void IG::Num::IMatrix::SetDiagonal ( double  diagonalElement)

Sets the current matrix to the diagonal matrix with all diagonal elements equal to the specified value. Matrix does not need to be a square matrix.

Parameters:
diagonalElementValue of diagonal elements.

Implemented in IG::Num::MatrixBase.

void IG::Num::IMatrix::SetDiagonal ( IVector  diagonal)

Sets the current matrix to the diagonal matrix with diagonal element specified by a vector.

Parameters:
diagonalVector of diagonal elements.

Implemented in IG::Num::MatrixBase.

bool IG::Num::IMatrix::IsSquare ( )

Returns true if the current matrix is a square matrix, and false if not.

Implemented in IG::Num::MatrixBase.

bool IG::Num::IMatrix::IsSymmetric ( )

Returns true if the current matrix is symmetric, and false if not. If the matrix is not a square matrix then false is returned.

Implemented in IG::Num::MatrixBase.

bool IG::Num::IMatrix::IsSymmetric ( double  relativeRMSTolerance)

Returns true if the specified matrix is symmetric within some tolerance, and false if not. If the matrix is null then false is returned.

Parameters:
relativeRMSToleranceTolerance on the ratio between RMS of differences between out of diagonal terms and their transposes and between RMS of out of diagonal terms, below which matrix is considered symmetric.

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::ToStringNewlines ( )

Returns a string representation of this matrix with newlines inserted after each row. Rows and elements are printed in comma separated lists in curly brackets.

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::ToStringNewlines ( string  elementFormat)

Returns a string representation of this matrix with newlines inserted after each row, with the specified format for elements of the matrix. Rows and elements are printed in comma separated lists in curly brackets.

Parameters:
elementFormatFormat specification for printing individual element.

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::ToStringMath ( )

Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::ToString ( )

Returns string representation of the current matrix in the standard IGLib form (Mathematica-like format but with C representation of numbers). Rows and elements are printed in comma separated lists in curly brackets.

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::ToString ( string  elementFormat)

Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix.

Parameters:
elementFormatFormat specification for printing individual element.

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::ToStringMath ( string  elementFormat)

Returns a string representation of the current matrix in a standard IGLib form (Mathematica-like format but with C representation of numbers), with the specified format for elements of the matrix.

Parameters:
elementFormatFormat specification for printing individual element.

Implemented in IG::Num::MatrixBase.

int IG::Num::IMatrix::GetHashFunctionInt ( )

Returns an integer valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionInt method.

See also:
Util.GetHashFunctionInt

Implemented in IG::Num::MatrixBase.

string IG::Num::IMatrix::GetHashFunctionString ( )

Returns a string valued hash function of the current matrix object. The returned value is calculated by the Util.GetHashFunctionString method.

The returned string is always on the same length, and is based on the ToString method. Therefore it is convenient for use in file or directory names that have one part related to a specific matrix.

See also:
Util.GetHashFunctionString

Implemented in IG::Num::MatrixBase.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events