Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
Matrix2d2C::Matrix2d2C(void)
Matrix2d2C::Matrix2d2C(RealT,RealT,RealT,RealT)
Matrix2d2C::Matrix2d2C(const Matrix2d2C &)
Matrix2d2C::Matrix2d2C(const Point2dC &,const Point2dC &,const InputDataT)
Matrix2d2C::Matrix2d2C(const MatrixC &)
Matrix2d2C::operator=(const Matrix2d2C &)
Matrix2d2C::operator==(const Matrix2d2C &) const
Matrix2d2C::IsSymmetric(void) const
Matrix2d2C::Set(const Matrix2d2C &)
Matrix2d2C::Set(RealT,RealT,RealT,RealT)
Matrix2d2C::SetZero(void)
Matrix2d2C::SetRow(IndexT,const Point2dC &)
Matrix2d2C::SetColumn(IndexT,const Point2dC &)
Matrix2d2C::RDim(void) const
Matrix2d2C::CDim(void) const
Matrix2d2C::Matrix(void) const
Matrix2d2C::Matrix(void)
Matrix2d2C::operator[](IndexT) const
Matrix2d2C::operator[](IndexT)
Matrix2d2C::operator()(IndexT,IndexT) const
Matrix2d2C::operator()(IndexT,IndexT)
Matrix2d2C::A00(void) const
Matrix2d2C::A01(void) const
Matrix2d2C::A10(void) const
Matrix2d2C::A11(void) const
Matrix2d2C::A00(void)
Matrix2d2C::A01(void)
Matrix2d2C::A10(void)
Matrix2d2C::A11(void)
Matrix2d2C::G(IndexT,IndexT) const
Matrix2d2C::Column(IndexT) const
Matrix2d2C::Row(IndexT) const
Matrix2d2C::Diagonal(void) const
Matrix2d2C::operator+=(const Matrix2d2C &)
Matrix2d2C::operator-=(const Matrix2d2C &)
Matrix2d2C::operator*=(RealT)
Matrix2d2C::operator/=(RealT)
Matrix2d2C::operator+(const Matrix2d2C &) const
Matrix2d2C::operator-(const Matrix2d2C &) const
Matrix2d2C::operator*(RealT) const
Matrix2d2C::operator/(RealT) const
Matrix2d2C::operator*(const Matrix2d2C &) const
Matrix2d2C::operator*(const Vector2dC &) const
Matrix2d2C::operator*(const Point2dC &) const
Matrix2d2C::Sum(void) const
Matrix2d2C::Sum2(void) const
Matrix2d2C::Sqr(void) const
Matrix2d2C::T(void) const
Matrix2d2C::I(void) const
Matrix2d2C::Det(void) const
Matrix2d2C::Tr(void) const
Matrix2d2C::EigenValues(void) const
Matrix2d2C::SingularValues(void) const
Matrix2d2C::EigenSystem(void) const
Matrix2d2C::SVD(Matrix2d2C &,Matrix2d2C &,Matrix2d2C &) const
Matrix2d2C::LinearSolver(const Point2dC &) const
Matrix2d2C::ProductT(const Vector2dC &)
Matrix2d2C::ErrOutOfRange(IndexT,const char *) const
Matrix2d2C::EigenVectors(const Matrix2d2C &) const
Matrix2d2C::operator<<(ostream &,const Matrix2d2C &)
Matrix2d2C::operator>>(istream &,Matrix2d2C &)
Matrix2d2C
 
The class Matrix2d2C provides a quick implementation of a 2x2 matrix.
 
include "amma/Matrix2d.hh"
User Level:Default
Library:Mag2
Example:exMat2d.cc
Section:Geometry.2-D Basic Types.Numerical.Specialised
In Scope:std

Comments:
The 'C' convention of indexing from 0 is followed.

Derived Classes: Enumerated types:
enum InputDataT { ROWS, COLUMNS } ;
The kind of input data.

enum anon_enum?13 { dim = 2 } ;
the dimension of matrix

Variables:
RealT a[][];
The matrix elements.

Methods:
Matrix2d2C()
Creates the zero matrix.

Matrix2d2C(RealT b00,RealT b01,RealT b10,RealT b11)
Creates the matrix from 4 numbers.

Matrix2d2C(const Matrix2d2C & mat)
Copy constructor.

Matrix2d2C(const Point2dC & p0,const Point2dC & p1,const InputDataT dType = ROWS)
Creates a new matrix and assign the values according to the points coordinates.
If 'dType' is equal to ROWS, the points are treated as rows of the matrix. If 'dType' is equal to COLUMNS, the points are treated as columns of the matrix.

Matrix2d2C(const MatrixC & mat)
Creates the matrix from the upper-left submatrix of the matrix 'mat'.

const Matrix2d2C & operator=(const Matrix2d2C & mat)
Assigment.
Tests of states of a matrix.

BooleanT operator==(const Matrix2d2C & mat) const
Returns TRUE if all elements of this matrix are equal to the related elements of the matrix 'mat'.

BooleanT IsSymmetric() const
Returns TRUE if this matrix is symmetric.
Setting of matrix elements.

void Set(const Matrix2d2C & mat)
Sets all elements of the matrix according to the matrix 'mat'.

void Set(RealT b00,RealT b01,RealT b10,RealT b11)
Sets the elements of this matrix according to the values 'b00', 'b01', 'b10', and 'b11'.

Matrix2d2C & SetZero()
Sets all elements to be 0.0.

Matrix2d2C & SetRow(IndexT i,const Point2dC & p)
Sets the elements of the row 'i' according to the elements of the point 'p'.

Matrix2d2C & SetColumn(IndexT i,const Point2dC & p)
Sets the elements of the column 'i' according to the elements of the point 'p'.
Access to the parameters of the object.

SizeT RDim() const
Returns the number of rows.

SizeT CDim() const
Returns the number of columns.

const Matrix2d2C & Matrix() const
Access to the constant matrix.

Matrix2d2C & Matrix()
Access to the matrix.

const SizeBufferAccessC<RealT> operator[](IndexT r) const
Access to the row of the constant matrix.

SizeBufferAccessC<RealT> operator[](IndexT r)
Access to the row of the matrix.

RealT operator()(IndexT i,IndexT j) const
Returns the value of the element a[ij].

RealT & operator()(IndexT i,IndexT j)
Access to the value of the element a[ij].

const RealT & A00() const
Access to the value of the constant element a00.

const RealT & A01() const
Access to the value of the constant element a01.

const RealT & A10() const
Access to the value of the constant element a10.

const RealT & A11() const
Access to the value of the constant element a11.

RealT & A00()
Access to the value of the element a00.

RealT & A01()
Access to the value of the element a01.

RealT & A10()
Access to the value of the element a10.

RealT & A11()
Access to the value of the element a11.

RealT G(IndexT i,IndexT j) const
Returns the value of the element (i,j).

Vector2dC Column(IndexT i) const
Returns the i-th column of this matrix.

Vector2dC Row(IndexT i) const
Returns the i-th row of this matrix.

Vector2dC Diagonal() const
Returns the vector of main diagonal item.
Arithmetic operations

const Matrix2d2C & operator+=(const Matrix2d2C & mat)
Adds the matrix 'mat' to this matrix.

const Matrix2d2C & operator-=(const Matrix2d2C & mat)
Subtracts the matrix 'mat' from this matrix.

const Matrix2d2C & operator*=(RealT lambda)
Multiplies all element of this matrix by the scalar 'lambda'.

const Matrix2d2C & operator/=(RealT lambda)
Divides all element of this matrix by the scalar 'lambda'.

Matrix2d2C operator+(const Matrix2d2C & mat) const
Adds the matrix 'mat' and this matrix.

Matrix2d2C operator-(const Matrix2d2C & mat) const
Subtracts the matrix 'mat' from this matrix.

Matrix2d2C operator*(RealT lambda) const
Multiplies all element of this matrix by the scalar 'lambda'.

Matrix2d2C operator/(RealT lambda) const
Divides all element of this matrix by the scalar 'lambda'.

Matrix2d2C operator*(const Matrix2d2C & mat) const
Multiplies this matrix by the matrix 'mat'.

Vector2dC operator*(const Vector2dC & v) const
Multiplies this matrix and the vector 'v'.

Point2dC operator*(const Point2dC & p) const
Multiplies this matrix and the point 'p'.
Matrix operators. =================

RealT Sum() const
Returns the sum of all elements of this matrix.

RealT Sum2() const
Returns the sum of square values of all elements of this matrix.

Matrix2d2C Sqr() const
Returns the matrix which elements are squares of the elements of this matrix.

Matrix2d2C T() const
Returns the transposition of this matrix.

Matrix2d2C I() const
Returns the inversion of this matrix.

RealT Det() const
Returns the value of the determinant of this matrix.

RealT Tr() const
Returns the sum of the diagonal elements of this matrix.

Matrix2d2C EigenValues() const
Returns the diagonal matrix containing the eigenvalues of this matrix.
The matrix must be symmetric. The element A00() will contain the bigger eigenvalue according to its absolute value.

Matrix2d2C SingularValues() const
Returns the diagonal matrix containing the singular values of this matrix.
The element A00() will contain the bigger singular value according to its absolute value.

VecMat2dC EigenSystem() const
Returns the vector with eigenvalues of this symmetric matrix and the matrix whose columns are related eigenvectors of this matrix.
The eigenvalues are ordered according to their absolute values. The eigenvectors are normalized to be unit. The first eigenvector will point to the I. or IV. quadrant.

void SVD(Matrix2d2C & u,Matrix2d2C & s,Matrix2d2C & v) const
Singular Value Decomposition.
Updates the matrices 'u', 's', 'v' to be the solution of the singular value decomposition of this matrix 'm = u * s * v.T()', where 'u' and 'v' are orthogonal matrices and 's' is the diagonal matrix containing singular values ordered according to their absolute values. The first eigenvector of both matrices will point to the I. or IV. quadrant.

Point2dC LinearSolver(const Point2dC & rightSide) const
Returns the solution of 2 linear equations determined by the matrix and the right side vector 'rightSide'

Matrix2d2C ProductT(const Vector2dC & a)
Returns the matrix that is result of a*a.T().
Error checking. ===============

void ErrOutOfRange(IndexT i,const char * functionName) const
Triggers the error handling if the index 'i' is smaller than 0 or bigger than 1.
The name of the calling function 'functionName' is passed to the error handler.

Matrix2d2C EigenVectors(const Matrix2d2C & eigenVal) const
Calculate the Eigen Vectors
Returns the matrix which columns are eigenvectors related to the eigenvalues of this matrix stored in the diagonal matrix 'eigenVal'. The eigenvectors are normalize to be unit. The first eigenvector will point to the I. or IV. quadrant.

ostream & operator<<(ostream & outS,const Matrix2d2C & matrix)

istream & operator>>(istream & inS,Matrix2d2C & matrix)


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001