Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::MatrixOp Namespace Reference

Functions

template<class D >
double Determinant (const Matrix< D > &mat)
 Compute and return the determinant of this matrix. More...
 
template<class D >
CompareToIdentity (const Matrix< D > &mat)
 Computes the absolute maximum difference between the matrix and the identity. More...
 
template<class D >
void Identity (Matrix< D > &mat)
 Resets to identity matrix. More...
 
template<class D >
Matrix< D > Cofactor (const Matrix< D > &mat)
 Compute and return cofactors matrix. More...
 
template<class D >
void Inverse (Matrix< D > &mat)
 Computes LU decomposition based inverse of 'this' matrix, overwriting data Vector. More...
 
template<class D >
Matrix< D > Inverse (const Matrix< D > &mat)
 Compute and return LU decomposition based inverse of 'this' matrix. More...
 
template<class D >
void Inverse2 (Matrix< D > &mat)
 Computes eigen Vector based inverse of 'this' matrix, overwriting data Vector. More...
 
template<class D >
Matrix< D > Inverse2 (const Matrix< D > &mat)
 Compute and return eigen Vector based inverse of 'this' matrix. More...
 
template<class D >
void Inverse3 (Matrix< D > &mat)
 Computes the inverse based on the cofactor matrix of 'this' matrix. More...
 
template<class D >
Matrix< D > Inverse3 (const Matrix< D > &mat)
 Computes and returns the inverse based on the cofactor matrix of 'this' matrix. More...
 
template<class D >
double MinimumRowNorm (const Matrix< D > &mat)
 Computes and returns the minimum norm (sum or elements) among all matrix rows. More...
 
template<class D >
double MinimumColNorm (const Matrix< D > &mat)
 Computes and returns the minimum norm (sum or elements) among all matrix colunms. More...
 
template<class D >
void Polar (Matrix< D > &mat)
 Computes and returns polar matrix. More...
 
template<class D >
Matrix< D > Polar (const Matrix< D > &mat)
 
template<class D >
Matrix< D > Resize (const Matrix< D > &mat, const Vector< size_t > &new_min, const Vector< size_t > &new_max)
 Returns a submatrix from this matrix. If this matrix has more dimensions than the input, than all elements of these Dimensions are included in the submatrix. More...
 
template<class D >
Matrix< D > Resize (const Matrix< D > &mat, const std::string &coordinates)
 Returns a submatrix from this matrix. The coordinates string must be given in a similar way as used by MatLab, or in some other variations. More...
 
template<class D >
Matrix< size_t > Coordinates (const Matrix< D > &mat, const std::string &coordinates)
 Returns vectors with minimum and maximum coordinates from this matrix. The coordinates string must be given in a similar fashion as used by MatLab, or in some other variations. Examples: img( "1, 1:2 )" = coordinates with column 1 and rows 1 and 2. img( "1:, :2 )" = coordinates with columns 1 to img.size( 0 ) and rows 0 to 2. img( "1:, : )" = coordinates with columns 1 to img.size( 0 ) and all rows. If this matrix has more dimensions than the input string, than all elements of these dimensions are included in the resulting vector. More...
 
template<class D >
void Transpose (Matrix< D > &mat)
 Compute the transposed of 'this' matrix, overwriting data Vector. More...
 
template<class D >
Matrix< D > Transpose (const Matrix< D > &mat)
 Compute and return the transposed of 'this' matrix. More...
 

Function Documentation

template<class D >
Matrix< D > Bial::MatrixOp::Cofactor ( const Matrix< D > &  mat)

Compute and return cofactors matrix.

Date
2012/Oct/23
Parameters
matinput matrix.
Returns
Cofactors matrix.
Warning
'this' matrix must be square and 2D.
template<class D >
D Bial::MatrixOp::CompareToIdentity ( const Matrix< D > &  mat)

Computes the absolute maximum difference between the matrix and the identity.

Date
2012/Jun/21
Returns
mat: Input matrix
Maximum difference from identity matrix.
Warning
'this' matrix must be square and 2D.
template<class D >
Matrix< size_t > Bial::MatrixOp::Coordinates ( const Matrix< D > &  mat,
const std::string &  coordinates 
)

Returns vectors with minimum and maximum coordinates from this matrix. The coordinates string must be given in a similar fashion as used by MatLab, or in some other variations. Examples: img( "1, 1:2 )" = coordinates with column 1 and rows 1 and 2. img( "1:, :2 )" = coordinates with columns 1 to img.size( 0 ) and rows 0 to 2. img( "1:, : )" = coordinates with columns 1 to img.size( 0 ) and all rows. If this matrix has more dimensions than the input string, than all elements of these dimensions are included in the resulting vector.

Date
2012/Oct/03
Parameters
coordinatesCoordinates in this matrix to be used to generate the submatrix.
Returns
2D Matrix with converted coordinates from the input string. First dimension referes to source matrix coordinates and second dimension has lower and higher limits of each coordinate.
Warning
The input string can not have more coordinates than this matrix.
template<class D >
double Bial::MatrixOp::Determinant ( const Matrix< D > &  mat)

Compute and return the determinant of this matrix.

Date
2012/Oct/23
Parameters
matInput matrix.
Returns
Determinant of this matrix.
Warning
'this' matrix must be square and 2D.
template<class D >
void Bial::MatrixOp::Identity ( Matrix< D > &  mat)

Resets to identity matrix.

Date
2015/Jul/22
Parameters
none
Returns
mat: Input matrix
Warning
Matrix must be square.
template<class D >
void Bial::MatrixOp::Inverse ( Matrix< D > &  mat)

Computes LU decomposition based inverse of 'this' matrix, overwriting data Vector.

Date
2012/Jun/21
Parameters
matinput matrix.
Returns
none.
Warning
'this' matrix must be square and 2D.
template<class D >
Matrix< D > Bial::MatrixOp::Inverse ( const Matrix< D > &  mat)

Compute and return LU decomposition based inverse of 'this' matrix.

Date
2012/Jun/21
Parameters
matinput matrix.
Returns
The inverse of this matrix.
Warning
'this' matrix must be square and 2D.
template<class D >
void Bial::MatrixOp::Inverse2 ( Matrix< D > &  mat)

Computes eigen Vector based inverse of 'this' matrix, overwriting data Vector.

Date
2012/Jun/21
Parameters
matinput matrix.
Returns
none.
Warning
'this' matrix must be square and 2D.
template<class D >
Matrix< D > Bial::MatrixOp::Inverse2 ( const Matrix< D > &  mat)

Compute and return eigen Vector based inverse of 'this' matrix.

Date
2012/Jun/21
Parameters
matinput matrix.
Returns
The inverse of this matrix.
Warning
'this' matrix must be square and 2D.
template<class D >
void Bial::MatrixOp::Inverse3 ( Matrix< D > &  mat)

Computes the inverse based on the cofactor matrix of 'this' matrix.

Date
2012/Oct/23
Parameters
matinput matrix.
Returns
none.
Warning
'this' matrix must be square and 2D.
template<class D >
Matrix< D > Bial::MatrixOp::Inverse3 ( const Matrix< D > &  mat)

Computes and returns the inverse based on the cofactor matrix of 'this' matrix.

Date
2012/Oct/23
Parameters
matinput matrix.
Returns
The inverse of this matrix.
Warning
'this' matrix must be square and 2D.
template<class D >
double Bial::MatrixOp::MinimumColNorm ( const Matrix< D > &  mat)

Computes and returns the minimum norm (sum or elements) among all matrix colunms.

Date
2012/Oct/23
Parameters
none.
Returns
Minimum norm among all columns.
Warning
'this' matrix must be 2D.
template<class D >
double Bial::MatrixOp::MinimumRowNorm ( const Matrix< D > &  mat)

Computes and returns the minimum norm (sum or elements) among all matrix rows.

Date
2012/Oct/23
Parameters
none.
Returns
Minimum norm among all rows.
Warning
'this' matrix must be 2D.
template<class D >
void Bial::MatrixOp::Polar ( Matrix< D > &  mat)

Computes and returns polar matrix.

Date
2012/Oct/23
Parameters
none.
Returns
none or Polar matrix.
Warning
'this' matrix must be 3x3 2D.
template<class D >
Matrix< D > Bial::MatrixOp::Polar ( const Matrix< D > &  mat)
template<class D >
Matrix< D > Bial::MatrixOp::Resize ( const Matrix< D > &  mat,
const Vector< size_t > &  new_min,
const Vector< size_t > &  new_max 
)

Returns a submatrix from this matrix. If this matrix has more dimensions than the input, than all elements of these Dimensions are included in the submatrix.

Date
2013/Oct/22
Parameters
new_minVector containing the coord. of the begin of the sub_matrix dimensions
new_maxVector containing the coord. of the end of the sub_matrix dimensions
Returns
A submatrix with given coordinates.
Warning
The input vectors can not have more coordinates than this matrix.
template<class D >
Matrix< D > Bial::MatrixOp::Resize ( const Matrix< D > &  mat,
const std::string &  coordinates 
)

Returns a submatrix from this matrix. The coordinates string must be given in a similar way as used by MatLab, or in some other variations.

Examples:
img( "1, 1:2 )" = Submatrix with column 1 and rows 1 and 2.
img( "1:, :2 )" = Submatrix with columns 1 to img.size( 0 ) and rows 0 to 2.
img( "1:, : )" = Submatrix with columns 1 to img.size( 0 ) and all rows.

If this matrix has more dimensions than the input string, than all elements of these dimensions are included in the submatrix.

Date
2013/Oct/03
Parameters
coordinatesCoordinates in this matrix to be used to generate the submatrix.
Returns
A submatrix with given coordinates.
Warning
The input string can not have more coordinates than this matrix.
template<class D >
void Bial::MatrixOp::Transpose ( Matrix< D > &  mat)

Compute the transposed of 'this' matrix, overwriting data Vector.

Date
2012/Jun/21
Parameters
none.
Returns
none.
Warning
'this' matrix must be square and 2D.
template<class D >
Matrix< D > Bial::MatrixOp::Transpose ( const Matrix< D > &  mat)

Compute and return the transposed of 'this' matrix.

Date
2012/Jun/21
Parameters
none.
Returns
The transposed of 'this' matrix.
Warning
'this' matrix must be square and 2D.