OpenIndy-Core  0.2.0.43
oi::math::OiMat Class Reference

The OiMat class. More...

#include <oimat.h>

Public Member Functions

 OiMat ()
 
 OiMat (const int &rows, const int &cols)
 
double getAt (const int &row, const int &col) const
 OiMat::getAt Get the value at the specified position. More...
 
unsigned int getRowCount () const
 OiMat::getRowCount. More...
 
unsigned int getColCount () const
 OiMat::getColCount. More...
 
void getRow (OiVec &result, const int &row) const
 OiMat::getRow Get row vector at the specified position. More...
 
void getCol (OiVec &result, const int &col) const
 OiMat::getCol Get column vector at the specified position. More...
 
void replace (const OiMat &m)
 OiMat::set Set this matrix to m. More...
 
void setAt (const int &row, const int &col, const double &value)
 OiMat::setAt Set the matrix element at the specified position. More...
 
void diag (vector< double > diagVec)
 OiMat::diag Set this matrix to diagonal matrix with diagVec holding the diagonal elements. More...
 
void setRow (const int &index, const OiVec &row)
 OiMat::setRow Replace the row at index by the given row. More...
 
void setCol (const int &index, const OiVec &col)
 OiMat::setCol Replace the column at index by the given column. More...
 
OiMatoperator= (const OiMat &m)
 OiMat::operator = Assign a matrix to another. More...
 
OiMat operator+ (const OiMat &m) const
 OiMat::operator + Add m to this matrix. More...
 
OiMat operator- (const OiMat &m) const
 OiMat::operator - Substract m from this matrix. More...
 
OiMatoperator+= (const OiMat &m)
 OiMat::operator += Add m to this matrix. More...
 
OiMatoperator-= (const OiMat &m)
 OiMat::operator += Substract m from this matrix. More...
 
OiMat operator* (const OiMat &m) const
 OiMat::operator * Multiply m by this matrix. More...
 
OiMat operator* (const double &value) const
 
OiVec operator* (const OiVec &v) const
 OiMat::operator * Multiply v by this matrix. More...
 
OiMat t () const
 OiMat::t Calculate the transposed matrix. More...
 
OiMat inv () const
 OiMat::inv Calculate the inverse matrix. More...
 
double det () const
 OiMat::det Calculate the determinant of the matrix. More...
 
void svd (OiMat &u, OiVec &d, OiMat &v) const
 OiMat::svd Calculate singular value decomposition. More...
 

Static Public Member Functions

static bool solve (OiVec &x, const OiMat &A, const OiVec &b)
 OiMat::solve Solves a linear equation of the form A*x = b (x = inv(A)*b) More...
 
static bool solve (OiMat &X, const OiMat &A, const OiMat &B)
 OiMat::solve Solves a linear equation of the form A*X = B (X = inv(A)*B) More...
 
static OiMat getRotationMatrix (double angle, OiVec axis)
 OiMat::getRotationMatrix Get the rotation matrix corresponding to a rotation around an arbitrary rotation axis by the given amount. More...
 
static OiMat getRotationMatrix (double angle, Rotation::RotationAxis axis)
 OiMat::getRotationMatrix Get the rotation matrix corresponding to a rotation around the X, Y or Z axis by the given amount. More...
 
static OiMat getRotationMatrix (RotationChain rotationChain)
 OiMat::getRotationMatrix Get the rotation matrix corresponding to the given chain of rotations around X, Y or Z axes. More...
 

Static Public Attributes

static LinearAlgebramyLinearAlgebra = NULL
 

Friends

OiMat operator* (const double &value, const OiMat &m)
 
OiMat operator/ (const OiMat &m, const double &value)
 

Detailed Description

The OiMat class.

Constructor & Destructor Documentation

OiMat::OiMat ( )
OiMat::OiMat ( const int &  rows,
const int &  cols 
)

Member Function Documentation

double OiMat::det ( ) const

OiMat::det Calculate the determinant of the matrix.

Returns
void OiMat::diag ( vector< double >  diagVec)

OiMat::diag Set this matrix to diagonal matrix with diagVec holding the diagonal elements.

Parameters
diagVec
double OiMat::getAt ( const int &  row,
const int &  col 
) const

OiMat::getAt Get the value at the specified position.

Parameters
row
col
Returns
void OiMat::getCol ( OiVec result,
const int &  col 
) const

OiMat::getCol Get column vector at the specified position.

Parameters
col
Returns
unsigned int OiMat::getColCount ( ) const
OiMat OiMat::getRotationMatrix ( double  angle,
OiVec  axis 
)
static

OiMat::getRotationMatrix Get the rotation matrix corresponding to a rotation around an arbitrary rotation axis by the given amount.

Parameters
angle
axis
Returns
OiMat OiMat::getRotationMatrix ( double  angle,
Rotation::RotationAxis  axis 
)
static

OiMat::getRotationMatrix Get the rotation matrix corresponding to a rotation around the X, Y or Z axis by the given amount.

Parameters
angle
axis
Returns
OiMat OiMat::getRotationMatrix ( RotationChain  rotationChain)
static

OiMat::getRotationMatrix Get the rotation matrix corresponding to the given chain of rotations around X, Y or Z axes.

Parameters
rotationChain
Returns
void OiMat::getRow ( OiVec result,
const int &  row 
) const

OiMat::getRow Get row vector at the specified position.

Parameters
row
Returns
unsigned int OiMat::getRowCount ( ) const
OiMat OiMat::inv ( ) const

OiMat::inv Calculate the inverse matrix.

Returns
OiMat OiMat::operator* ( const OiMat m) const

OiMat::operator * Multiply m by this matrix.

Parameters
v
Returns
OiMat OiMat::operator* ( const double &  value) const
OiVec OiMat::operator* ( const OiVec v) const

OiMat::operator * Multiply v by this matrix.

Parameters
v
Returns
OiMat OiMat::operator+ ( const OiMat m) const

OiMat::operator + Add m to this matrix.

Parameters
v
Returns
OiMat & OiMat::operator+= ( const OiMat m)

OiMat::operator += Add m to this matrix.

Parameters
m
Returns
OiMat OiMat::operator- ( const OiMat m) const

OiMat::operator - Substract m from this matrix.

Parameters
v
Returns
OiMat & OiMat::operator-= ( const OiMat m)

OiMat::operator += Substract m from this matrix.

Parameters
m
Returns
OiMat & OiMat::operator= ( const OiMat m)

OiMat::operator = Assign a matrix to another.

Parameters
m
Returns
void OiMat::replace ( const OiMat m)

OiMat::set Set this matrix to m.

Parameters
m
void OiMat::setAt ( const int &  row,
const int &  col,
const double &  value 
)

OiMat::setAt Set the matrix element at the specified position.

Parameters
row
col
value
void OiMat::setCol ( const int &  index,
const OiVec col 
)

OiMat::setCol Replace the column at index by the given column.

Parameters
index
col
void OiMat::setRow ( const int &  index,
const OiVec row 
)

OiMat::setRow Replace the row at index by the given row.

Parameters
index
row
bool OiMat::solve ( OiVec x,
const OiMat A,
const OiVec b 
)
static

OiMat::solve Solves a linear equation of the form A*x = b (x = inv(A)*b)

Parameters
x
A
b
Returns
bool OiMat::solve ( OiMat X,
const OiMat A,
const OiMat B 
)
static

OiMat::solve Solves a linear equation of the form A*X = B (X = inv(A)*B)

Parameters
X
A
B
Returns
void OiMat::svd ( OiMat u,
OiVec d,
OiMat v 
) const

OiMat::svd Calculate singular value decomposition.

Parameters
u
d
v
OiMat OiMat::t ( ) const

OiMat::t Calculate the transposed matrix.

Returns

Friends And Related Function Documentation

OiMat operator* ( const double &  value,
const OiMat m 
)
friend
OiMat operator/ ( const OiMat m,
const double &  value 
)
friend

Member Data Documentation

LinearAlgebra * OiMat::myLinearAlgebra = NULL
static

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