jrlMathTools::Matrix3x3< T > Struct Template Reference

Generic 3x3 matrix. More...

#include <jrl/mathtools/matrix3x3.hh>

List of all members.

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.
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

m [9]
 The data array.

Detailed Description

template<typename T>
struct jrlMathTools::Matrix3x3< T >

Generic 3x3 matrix.

This matrix has been designed to be as simple and efficient as possible.


Constructor & Destructor Documentation

template<typename T>
jrlMathTools::Matrix3x3< T >::Matrix3x3 ( ) [inline]

Default constructor.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
jrlMathTools::Matrix3x3< T >::Matrix3x3 ( const T  x) [inline]

Constructor form a scalar.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
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.

template<typename T>
jrlMathTools::Matrix3x3< T >::Matrix3x3 ( const Matrix3x3< T > &  v) [inline]

Copy constructor.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
template<typename T2 >
jrlMathTools::Matrix3x3< T >::Matrix3x3 ( const Matrix3x3< T2 > &  v) [inline]

Hybrid copy constructor.

References jrlMathTools::Matrix3x3< T >::m.


Member Function Documentation

template<typename T>
void jrlMathTools::Matrix3x3< T >::CeqthismulB ( const Matrix3x3< T > &  B,
Matrix3x3< T > &  C 
) const [inline]
template<typename T>
T jrlMathTools::Matrix3x3< T >::determinant ( ) const [inline]
template<typename T>
std::ostream& jrlMathTools::Matrix3x3< T >::display ( std::ostream &  os) const [inline]
template<typename T>
void jrlMathTools::Matrix3x3< T >::Fill ( value) [inline]

Fills with value.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::Inversion ( Matrix3x3< T > &  A) const [inline]
template<typename T>
bool jrlMathTools::Matrix3x3< T >::IsIdentity ( ) const [inline]

returns true if matrix is identity.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
T& jrlMathTools::Matrix3x3< T >::operator() ( unsigned int  i,
unsigned int  j 
) [inline]

Access by giving the (i,j) element.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
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.

template<typename T>
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator* ( const Matrix3x3< T > &  B) const [inline]

Multiplication operator with another matrix.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator* ( const T &  r) const [inline]

Multiplication operator with a constant.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::operator*= ( const Matrix3x3< T > &  B) [inline]

Local matrix multiplication.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::operator*= ( const T &  t) [inline]

Matrix product with a scalar.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator+ ( const Matrix3x3< T > &  B) const [inline]

Adition operator.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::operator+= ( const Matrix3x3< T > &  B) [inline]

Self matrix addition.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::operator- ( const Matrix3x3< T > &  B) const [inline]

Substraction operator.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::operator-= ( const Matrix3x3< T > &  B) [inline]

Local matrix subtraction.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
T& jrlMathTools::Matrix3x3< T >::operator[] ( unsigned int  i) [inline]

i-th element considering the matrix as an array.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
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.

template<typename T>
void jrlMathTools::Matrix3x3< T >::setIdentity ( ) [inline]

Set to identity.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::setZero ( ) [inline]

Set to zero matrix.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
Matrix3x3<T> jrlMathTools::Matrix3x3< T >::Transpose ( ) const [inline]

Transposition.

References jrlMathTools::Matrix3x3< T >::m.

template<typename T>
void jrlMathTools::Matrix3x3< T >::Transpose ( Matrix3x3< T > &  A) const [inline]

Transposition.

References jrlMathTools::Matrix3x3< T >::m.


Member Data Documentation

 All Classes Namespaces Files Functions Variables Typedefs Defines