Generic 3x3 matrix. More...
#include <jrl/mathtools/matrix3x3.hh>
Public Member Functions | |
Matrix3x3 () | |
Default constructor. | |
Matrix3x3 (const T x) | |
Constructor form a scalar. | |
Matrix3x3 (const T x0, const T x1, const T x2, const T x3, const T x4, const T x5, const T x6, const T x7, const T x8) | |
Constructor from 9 scalars. | |
Matrix3x3 (const Matrix3x3< T > &v) | |
Copy constructor. | |
template<typename T2 > | |
Matrix3x3 (const Matrix3x3< T2 > &v) | |
Hybrid copy constructor. | |
T & | operator[] (unsigned int i) |
i-th element considering the matrix as an array. | |
const T & | operator[] (unsigned int i) const |
i-th element considering the matrix as an array. | |
T & | operator() (unsigned int i, unsigned int j) |
Access by giving the (i,j) element. | |
const T & | operator() (unsigned int i, unsigned int j) const |
Access by giving the (i,j) element. | |
void | setZero () |
Set to zero matrix. | |
void | setIdentity () |
Set to identity. | |
Matrix3x3< T > | operator+ (const Matrix3x3< T > &B) const |
Adition operator. | |
Matrix3x3< T > | operator- (const Matrix3x3< T > &B) const |
Substraction operator. | |
Matrix3x3< T > | operator* (const Matrix3x3< T > &B) const |
Multiplication operator with another matrix. | |
void | CeqthismulB (const Matrix3x3< T > &B, Matrix3x3< T > &C) const |
Matrix3x3< T > | operator* (const T &r) const |
Multiplication operator with a constant. | |
Matrix3x3< T > | Transpose () const |
Transposition. | |
void | Transpose (Matrix3x3< T > &A) const |
Transposition. | |
void | Inversion (Matrix3x3< T > &A) const |
Inversion. | |
T | determinant () const |
Determinant. | |
void | Fill (T value) |
Fills with value. | |
bool | IsIdentity () const |
returns true if matrix is identity. | |
void | operator+= (const Matrix3x3< T > &B) |
Self matrix addition. | |
void | operator-= (const Matrix3x3< T > &B) |
Local matrix subtraction. | |
void | operator*= (const Matrix3x3< T > &B) |
Local matrix multiplication. | |
void | operator*= (const T &t) |
Matrix product with a scalar. | |
std::ostream & | display (std::ostream &os) const |
Public Attributes | |
T | m [9] |
The data array. |
Generic 3x3 matrix.
This matrix has been designed to be as simple and efficient as possible.
jrlMathTools::Matrix3x3< T >::Matrix3x3 | ( | ) | [inline] |
Default constructor.
References jrlMathTools::Matrix3x3< T >::m.
jrlMathTools::Matrix3x3< T >::Matrix3x3 | ( | const T | x | ) | [inline] |
Constructor form a scalar.
References jrlMathTools::Matrix3x3< T >::m.
jrlMathTools::Matrix3x3< T >::Matrix3x3 | ( | const T | x0, |
const T | x1, | ||
const T | x2, | ||
const T | x3, | ||
const T | x4, | ||
const T | x5, | ||
const T | x6, | ||
const T | x7, | ||
const T | x8 | ||
) | [inline, explicit] |
Constructor from 9 scalars.
References jrlMathTools::Matrix3x3< T >::m.
jrlMathTools::Matrix3x3< T >::Matrix3x3 | ( | const Matrix3x3< T > & | v | ) | [inline] |
Copy constructor.
References jrlMathTools::Matrix3x3< T >::m.
jrlMathTools::Matrix3x3< T >::Matrix3x3 | ( | const Matrix3x3< T2 > & | v | ) | [inline] |
Hybrid copy constructor.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::CeqthismulB | ( | const Matrix3x3< T > & | B, |
Matrix3x3< T > & | C | ||
) | const [inline] |
References jrlMathTools::Matrix3x3< T >::m.
T jrlMathTools::Matrix3x3< T >::determinant | ( | ) | const [inline] |
Determinant.
References jrlMathTools::Matrix3x3< T >::m.
Referenced by jrlMathTools::Matrix3x3< T >::Inversion().
std::ostream& jrlMathTools::Matrix3x3< T >::display | ( | std::ostream & | os | ) | const [inline] |
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::Fill | ( | T | value | ) | [inline] |
Fills with value.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::Inversion | ( | Matrix3x3< T > & | A | ) | const [inline] |
Inversion.
References jrlMathTools::Matrix3x3< T >::determinant(), and jrlMathTools::Matrix3x3< T >::m.
bool jrlMathTools::Matrix3x3< T >::IsIdentity | ( | ) | const [inline] |
returns true if matrix is identity.
References jrlMathTools::Matrix3x3< T >::m.
T& jrlMathTools::Matrix3x3< T >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) | [inline] |
Access by giving the (i,j) element.
References jrlMathTools::Matrix3x3< T >::m.
const T& jrlMathTools::Matrix3x3< T >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) | const [inline] |
Access by giving the (i,j) element.
References jrlMathTools::Matrix3x3< T >::m.
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator* | ( | const Matrix3x3< T > & | B | ) | const [inline] |
Multiplication operator with another matrix.
References jrlMathTools::Matrix3x3< T >::m.
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator* | ( | const T & | r | ) | const [inline] |
Multiplication operator with a constant.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::operator*= | ( | const Matrix3x3< T > & | B | ) | [inline] |
Local matrix multiplication.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::operator*= | ( | const T & | t | ) | [inline] |
Matrix product with a scalar.
References jrlMathTools::Matrix3x3< T >::m.
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator+ | ( | const Matrix3x3< T > & | B | ) | const [inline] |
Adition operator.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::operator+= | ( | const Matrix3x3< T > & | B | ) | [inline] |
Self matrix addition.
References jrlMathTools::Matrix3x3< T >::m.
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator- | ( | const Matrix3x3< T > & | B | ) | const [inline] |
Substraction operator.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::operator-= | ( | const Matrix3x3< T > & | B | ) | [inline] |
Local matrix subtraction.
References jrlMathTools::Matrix3x3< T >::m.
T& jrlMathTools::Matrix3x3< T >::operator[] | ( | unsigned int | i | ) | [inline] |
i-th element considering the matrix as an array.
References jrlMathTools::Matrix3x3< T >::m.
const T& jrlMathTools::Matrix3x3< T >::operator[] | ( | unsigned int | i | ) | const [inline] |
i-th element considering the matrix as an array.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::setIdentity | ( | ) | [inline] |
Set to identity.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::setZero | ( | ) | [inline] |
Set to zero matrix.
References jrlMathTools::Matrix3x3< T >::m.
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::Transpose | ( | ) | const [inline] |
Transposition.
References jrlMathTools::Matrix3x3< T >::m.
void jrlMathTools::Matrix3x3< T >::Transpose | ( | Matrix3x3< T > & | A | ) | const [inline] |
Transposition.
References jrlMathTools::Matrix3x3< T >::m.
T jrlMathTools::Matrix3x3< T >::m[9] |
The data array.
Referenced by jrlMathTools::Matrix3x3< T >::CeqthismulB(), jrlMathTools::Matrix3x3< T >::determinant(), jrlMathTools::Matrix3x3< T >::display(), jrlMathTools::Matrix3x3< T >::Fill(), jrlMathTools::Matrix3x3< T >::Inversion(), jrlMathTools::Matrix3x3< T >::IsIdentity(), jrlMathTools::Matrix3x3< T >::Matrix3x3(), jrlMathTools::Matrix3x3< T >::operator()(), jrlMathTools::Matrix3x3< T >::operator*(), jrlMathTools::Matrix3x3< T >::operator*=(), jrlMathTools::Matrix3x3< T >::operator+(), jrlMathTools::Matrix3x3< T >::operator+=(), jrlMathTools::Matrix4x4< T >::operator+=(), jrlMathTools::Matrix3x3< T >::operator-(), jrlMathTools::Matrix3x3< T >::operator-=(), jrlMathTools::Matrix3x3< T >::operator[](), jrlMathTools::Matrix3x3< T >::setIdentity(), jrlMathTools::Matrix3x3< T >::setZero(), and jrlMathTools::Matrix3x3< T >::Transpose().