eLynx SDK v3.3.0
C++ image processing API reference
Public Member Functions

eLynx::Math::Matrix Class Reference

Basic M x N matrix implementation as rectangular array of doubles. More...

#include <Matrix.h>

Inheritance diagram for eLynx::Math::Matrix:
eLynx::Math::IMatrix

List of all members.

Public Member Functions

 Matrix (uint32 iHeight, uint32 iWidth)
 Constructor, creates matrix with specified height (M) and width (N).
 Matrix (const IMatrix &iMatrix)
 Constructor, creates matrix as a copy of given matrix.
 Matrix (const Matrix &iOther)
 Copy constructor.
Matrixoperator= (const Matrix &iOther)
 An assignement operator.
virtual uint32 GetWidth () const
 Returns width (number of columns, N) of the matrix.
virtual uint32 GetHeight () const
 Returns height (number of rows, M) of the matrix.
virtual const double & operator() (uint32 iRow, uint32 iCol) const
 Matrix content access operator.
virtual double & operator() (uint32 iRow, uint32 iCol)
 Matrix content access operator.
virtual void SwapRows (uint32 iRow1, uint32 iRow2)
 Swaps specified rows of the matrix.
virtual void SwapCols (uint32 iCol1, uint32 iCol2)
 Swaps specified columns of the matrix.
void Resize (uint32 iHeight, uint32 iWidth)
 Resizes the matrix to specified height and width.

Detailed Description

Basic M x N matrix implementation as rectangular array of doubles.

Matrix uses row-first indexing and indices are zero-based.


Constructor & Destructor Documentation

eLynx::Math::Matrix::Matrix ( uint32  iHeight,
uint32  iWidth 
)

Constructor, creates matrix with specified height (M) and width (N).

The content of the matrix is not initialized.

Parameters:
iHeightthe height (number of rows, M) of the matrix
iWidththe width (number of columns, N) of the matrix
eLynx::Math::Matrix::Matrix ( const IMatrix iMatrix )

Constructor, creates matrix as a copy of given matrix.

Parameters:
iMatrixthe matrix to copy
eLynx::Math::Matrix::Matrix ( const Matrix iOther )

Copy constructor.

Parameters:
iOtherthe matrix to copy

Member Function Documentation

virtual uint32 eLynx::Math::Matrix::GetHeight (  ) const [inline, virtual]

Returns height (number of rows, M) of the matrix.

Returns:
number of matrix rows

Implements eLynx::Math::IMatrix.

virtual uint32 eLynx::Math::Matrix::GetWidth (  ) const [inline, virtual]

Returns width (number of columns, N) of the matrix.

Returns:
number of matrix columns

Implements eLynx::Math::IMatrix.

virtual const double& eLynx::Math::Matrix::operator() ( uint32  iRow,
uint32  iCol 
) const [virtual]

Matrix content access operator.

Can be used in form Matrix(r, c). () operator is prefered on [] operator, because it can have more params.

Parameters:
iRowthe row index
iColthe column index
Returns:
the const reference to specified matrix value

Implements eLynx::Math::IMatrix.

virtual double& eLynx::Math::Matrix::operator() ( uint32  iRow,
uint32  iCol 
) [virtual]

Matrix content access operator.

Can be used in form Matrix(r, c). () operator is prefered on [] operator, because it can have more params.

Parameters:
iRowthe row index
iColthe column index
Returns:
the reference to specified matrix value

Implements eLynx::Math::IMatrix.

Matrix& eLynx::Math::Matrix::operator= ( const Matrix iOther )

An assignement operator.

Parameters:
iOtherthe matrix to copy
Returns:
reference to this matrix
void eLynx::Math::Matrix::Resize ( uint32  iHeight,
uint32  iWidth 
)

Resizes the matrix to specified height and width.

The matrix content is not defined after this operation.

Parameters:
iHeightthe height (number of rows, M) of the matrix
iWidththe width (number of columns, N) of the matrix
virtual void eLynx::Math::Matrix::SwapCols ( uint32  iCol1,
uint32  iCol2 
) [virtual]

Swaps specified columns of the matrix.

Parameters:
iCol1the index of the first column to swap
iCol2the index of the second column to swap

Implements eLynx::Math::IMatrix.

virtual void eLynx::Math::Matrix::SwapRows ( uint32  iRow1,
uint32  iRow2 
) [virtual]

Swaps specified rows of the matrix.

Parameters:
iRow1the index of the first row to swap
iRow2the index of the second row to swap

Implements eLynx::Math::IMatrix.


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

Generated on Thu Dec 9 2010 by doxygen 1.7.2