![]() |
OpenIndy-Core
0.2.0.43
|
#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... | |
OiMat & | operator= (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... | |
OiMat & | operator+= (const OiMat &m) |
OiMat::operator += Add m to this matrix. More... | |
OiMat & | operator-= (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 LinearAlgebra * | myLinearAlgebra = NULL |
Friends | |
OiMat | operator* (const double &value, const OiMat &m) |
OiMat | operator/ (const OiMat &m, const double &value) |
The OiMat class.
OiMat::OiMat | ( | ) |
OiMat::OiMat | ( | const int & | rows, |
const int & | cols | ||
) |
double OiMat::det | ( | ) | const |
OiMat::det Calculate the determinant of the matrix.
void OiMat::diag | ( | vector< double > | diagVec | ) |
OiMat::diag Set this matrix to diagonal matrix with diagVec holding the diagonal elements.
diagVec |
double OiMat::getAt | ( | const int & | row, |
const int & | col | ||
) | const |
void OiMat::getCol | ( | OiVec & | result, |
const int & | col | ||
) | const |
unsigned int OiMat::getColCount | ( | ) | const |
OiMat::getRotationMatrix Get the rotation matrix corresponding to a rotation around an arbitrary rotation axis by the given amount.
angle | |
axis |
|
static |
OiMat::getRotationMatrix Get the rotation matrix corresponding to a rotation around the X, Y or Z axis by the given amount.
angle | |
axis |
|
static |
OiMat::getRotationMatrix Get the rotation matrix corresponding to the given chain of rotations around X, Y or Z axes.
rotationChain |
void OiMat::getRow | ( | OiVec & | result, |
const int & | row | ||
) | const |
unsigned int OiMat::getRowCount | ( | ) | const |
OiMat OiMat::inv | ( | ) | const |
OiMat::inv Calculate the inverse matrix.
OiMat OiMat::operator* | ( | const double & | value | ) | const |
void OiMat::replace | ( | const OiMat & | m | ) |
OiMat::set Set this matrix to m.
m |
void OiMat::setAt | ( | const int & | row, |
const int & | col, | ||
const double & | value | ||
) |
OiMat::setAt Set the matrix element at the specified position.
row | |
col | |
value |
void OiMat::setCol | ( | const int & | index, |
const OiVec & | col | ||
) |
OiMat::setCol Replace the column at index by the given column.
index | |
col |
void OiMat::setRow | ( | const int & | index, |
const OiVec & | row | ||
) |
OiMat::setRow Replace the row at index by the given row.
index | |
row |
OiMat::svd Calculate singular value decomposition.
u | |
d | |
v |
|
static |