eLynx SDK v3.0.1
C++ image processing API reference

eLynx::Math::Matrix Class Reference

#include <Matrix.h>

Inheritance diagram for eLynx::Math::Matrix:

eLynx::Math::IMatrix

List of all members.


Public Member Functions

 Matrix (uint32 iHeight, uint32 iWidth)
 Matrix (const IMatrix &iMatrix)
 Matrix (const Matrix &iOther)
Matrixoperator= (const Matrix &iOther)
virtual uint32 GetWidth () const
virtual uint32 GetHeight () const
virtual const double & operator() (uint32 iRow, uint32 iCol) const
virtual double & operator() (uint32 iRow, uint32 iCol)
virtual void SwapRows (uint32 iRow1, uint32 iRow2)
virtual void SwapCols (uint32 iCol1, uint32 iCol2)
void Resize (uint32 iHeight, uint32 iWidth)

Detailed Description

Basic M x N matrix implementation as rectangular array of doubles. Matrix uses row-first indexing and indices are zero-based.

Definition at line 31 of file Matrix.h.


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:
iHeight the height (number of rows, M) of the matrix
iWidth the 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:
iMatrix the matrix to copy

eLynx::Math::Matrix::Matrix ( const Matrix iOther  ) 

Copy constructor.

Parameters:
iOther the matrix to copy


Member Function Documentation

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

An assignement operator

Parameters:
iOther the matrix to copy
Returns:
reference to this matrix

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.

Definition at line 56 of file Matrix.h.

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.

Definition at line 60 of file Matrix.h.

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:
iRow the row index
iCol the 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:
iRow the row index
iCol the column index
Returns:
the reference to specified matrix value

Implements eLynx::Math::IMatrix.

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

Swaps specified rows of the matrix.

Parameters:
iRow1 the index of the first row to swap
iRow2 the index of the second row to swap

Implements eLynx::Math::IMatrix.

virtual void eLynx::Math::Matrix::SwapCols ( uint32  iCol1,
uint32  iCol2 
) [virtual]

Swaps specified columns of the matrix.

Parameters:
iCol1 the index of the first column to swap
iCol2 the index of the second column to swap

Implements eLynx::Math::IMatrix.

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:
iHeight the height (number of rows, M) of the matrix
iWidth the width (number of columns, N) of the matrix


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

Generated on 14 Apr 2009 by doxygen 1.5.8