i6engine  1.0
i6e::math::i6eMatrix< T > Class Template Reference

Implements m x n matrix. More...

#include <D:/Projekte/i6engine/libs/i6engine-math/include/i6engine/math/i6eMatrix.h>

Public Member Functions

 i6eMatrix ()
 default constructor, creates an emtpy matrix More...
 
 i6eMatrix (uint32_t m, uint32_t n)
 constructor taking dimension of the matrix setting all values to zero More...
 
 i6eMatrix (const i6eMatrix &other)
 copy constructor More...
 
 i6eMatrix (const i6eVector &vector)
 constructor taking an i6eVector More...
 
i6eMatrix operator* (const T &value)
 multiplication of matrix with a scalar More...
 
i6eMatrixoperator*= (const T &value)
 multiplication of matrix with a scalar More...
 
i6eMatrix operator/ (const T &value)
 division of matrix with scalar More...
 
i6eMatrixoperator/= (const T &value)
 division of matrix with a scalar More...
 
i6eMatrix operator* (const i6eMatrix &other)
 multiplication with matrix More...
 
i6eMatrix operator*= (const i6eMatrix &other)
 multiplication with matrix More...
 
i6eMatrix operator+ (const i6eMatrix &other)
 operator for addition with matrix More...
 
i6eMatrixoperator+= (const i6eMatrix &other)
 operator for addition with matrix More...
 
i6eMatrix operator- (const i6eMatrix &other)
 operator for substraction of matrix More...
 
i6eMatrixoperator-= (const i6eMatrix &other)
 operator for substraction of matrix More...
 
i6eMatrix operator- ()
 flips values of the matrix More...
 
void operator() (uint32_t m, uint32_t n, const T &value)
 sets the given value to the given position More...
 
operator() (uint32_t m, uint32_t n) const
 returs the value at the given position More...
 
bool operator== (const i6eMatrix &other)
 returns true, if both matrixes are equal More...
 
bool operator!= (const i6eMatrix &other) const
 return true, if both matrixes aren't equal More...
 
void setEntry (uint32_t m, uint32_t n, T value)
 sets the given value to the given position More...
 
void setZero ()
 sets all values of the matrix to zero More...
 
void setIdentity ()
 sets matrix to be an identity matrix More...
 
uint32_t getWidth () const
 returns width of the matrix More...
 
uint32_t getHeight () const
 returns height of the matrix More...
 
getEntry (uint32_t m, uint32_t n) const
 returns entry at given position More...
 
double calculateDeterminant () const
 returns determinant of the matrix More...
 
void solveSystem (const i6eMatrix &b, i6eMatrix &x)
 solves the linear system mx = b using LU-decomposition, where m is the input square matrix and x is the result More...
 
template<>
i6eMatrix< float > operator/ (const float &value)
 
template<>
i6eMatrix< float > & operator/= (const float &value)
 

Static Public Member Functions

static i6eMatrix pow (const i6eMatrix &other, uint32_t amount)
 calculates a given amount of multiplications for the given matrix More...
 
static i6eMatrix transpose (const i6eMatrix &other)
 calculates the transposed matrix More...
 
static i6eMatrix invert (const i6eMatrix &other)
 calculates the inverted of the given matrix More...
 
static i6eMatrix adjoint (const i6eMatrix &other)
 calculates the adjoint of the given matrix More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename T>
class i6e::math::i6eMatrix< T >

Implements m x n matrix.

Definition at line 48 of file i6eMatrix.h.

Constructor & Destructor Documentation

template<typename T >
i6e::math::i6eMatrix< T >::i6eMatrix ( )
inline

default constructor, creates an emtpy matrix

Definition at line 53 of file i6eMatrix.h.

template<typename T >
i6e::math::i6eMatrix< T >::i6eMatrix ( uint32_t  m,
uint32_t  n 
)
inline

constructor taking dimension of the matrix setting all values to zero

Definition at line 59 of file i6eMatrix.h.

template<typename T >
i6e::math::i6eMatrix< T >::i6eMatrix ( const i6eMatrix< T > &  other)
inline

copy constructor

Definition at line 65 of file i6eMatrix.h.

template<typename T >
i6e::math::i6eMatrix< T >::i6eMatrix ( const i6eVector vector)
inlineexplicit

constructor taking an i6eVector

Definition at line 71 of file i6eMatrix.h.

Member Function Documentation

template<typename T >
static i6eMatrix i6e::math::i6eMatrix< T >::adjoint ( const i6eMatrix< T > &  other)
inlinestatic

calculates the adjoint of the given matrix

Definition at line 408 of file i6eMatrix.h.

template<typename T >
double i6e::math::i6eMatrix< T >::calculateDeterminant ( ) const
inline

returns determinant of the matrix

Definition at line 339 of file i6eMatrix.h.

template<typename T >
T i6e::math::i6eMatrix< T >::getEntry ( uint32_t  m,
uint32_t  n 
) const
inline

returns entry at given position

Definition at line 328 of file i6eMatrix.h.

template<typename T >
uint32_t i6e::math::i6eMatrix< T >::getHeight ( ) const
inline

returns height of the matrix

Definition at line 321 of file i6eMatrix.h.

template<typename T >
uint32_t i6e::math::i6eMatrix< T >::getWidth ( ) const
inline

returns width of the matrix

Definition at line 314 of file i6eMatrix.h.

template<typename T >
static i6eMatrix i6e::math::i6eMatrix< T >::invert ( const i6eMatrix< T > &  other)
inlinestatic

calculates the inverted of the given matrix

Definition at line 393 of file i6eMatrix.h.

template<typename T >
bool i6e::math::i6eMatrix< T >::operator!= ( const i6eMatrix< T > &  other) const
inline

return true, if both matrixes aren't equal

Definition at line 270 of file i6eMatrix.h.

template<typename T >
void i6e::math::i6eMatrix< T >::operator() ( uint32_t  m,
uint32_t  n,
const T &  value 
)
inline

sets the given value to the given position

Definition at line 237 of file i6eMatrix.h.

template<typename T >
T i6e::math::i6eMatrix< T >::operator() ( uint32_t  m,
uint32_t  n 
) const
inline

returs the value at the given position

Definition at line 244 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator* ( const T &  value)
inline

multiplication of matrix with a scalar

Definition at line 80 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator* ( const i6eMatrix< T > &  other)
inline

multiplication with matrix

Definition at line 132 of file i6eMatrix.h.

template<typename T >
i6eMatrix& i6e::math::i6eMatrix< T >::operator*= ( const T &  value)
inline

multiplication of matrix with a scalar

Definition at line 91 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator*= ( const i6eMatrix< T > &  other)
inline

multiplication with matrix

Definition at line 143 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator+ ( const i6eMatrix< T > &  other)
inline

operator for addition with matrix

Definition at line 166 of file i6eMatrix.h.

template<typename T >
i6eMatrix& i6e::math::i6eMatrix< T >::operator+= ( const i6eMatrix< T > &  other)
inline

operator for addition with matrix

Definition at line 177 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator- ( const i6eMatrix< T > &  other)
inline

operator for substraction of matrix

Definition at line 194 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator- ( )
inline

flips values of the matrix

Definition at line 222 of file i6eMatrix.h.

template<typename T >
i6eMatrix& i6e::math::i6eMatrix< T >::operator-= ( const i6eMatrix< T > &  other)
inline

operator for substraction of matrix

Definition at line 205 of file i6eMatrix.h.

template<typename T >
i6eMatrix i6e::math::i6eMatrix< T >::operator/ ( const T &  value)
inline

division of matrix with scalar

Definition at line 106 of file i6eMatrix.h.

template<>
i6eMatrix< float > i6e::math::i6eMatrix< float >::operator/ ( const float &  value)

Definition at line 553 of file i6eMatrix.h.

template<typename T >
i6eMatrix& i6e::math::i6eMatrix< T >::operator/= ( const T &  value)
inline

division of matrix with a scalar

Definition at line 117 of file i6eMatrix.h.

template<>
i6eMatrix< float > & i6e::math::i6eMatrix< float >::operator/= ( const float &  value)

Definition at line 562 of file i6eMatrix.h.

template<typename T >
bool i6e::math::i6eMatrix< T >::operator== ( const i6eMatrix< T > &  other)
inline

returns true, if both matrixes are equal

Definition at line 251 of file i6eMatrix.h.

template<typename T >
static i6eMatrix i6e::math::i6eMatrix< T >::pow ( const i6eMatrix< T > &  other,
uint32_t  amount 
)
inlinestatic

calculates a given amount of multiplications for the given matrix

Definition at line 365 of file i6eMatrix.h.

template<typename T >
void i6e::math::i6eMatrix< T >::setEntry ( uint32_t  m,
uint32_t  n,
value 
)
inline

sets the given value to the given position

Definition at line 277 of file i6eMatrix.h.

template<typename T >
void i6e::math::i6eMatrix< T >::setIdentity ( )
inline

sets matrix to be an identity matrix

Definition at line 299 of file i6eMatrix.h.

template<typename T >
void i6e::math::i6eMatrix< T >::setZero ( )
inline

sets all values of the matrix to zero

Definition at line 288 of file i6eMatrix.h.

template<typename T >
void i6e::math::i6eMatrix< T >::solveSystem ( const i6eMatrix< T > &  b,
i6eMatrix< T > &  x 
)
inline

solves the linear system mx = b using LU-decomposition, where m is the input square matrix and x is the result

Definition at line 450 of file i6eMatrix.h.

template<typename T >
static i6eMatrix i6e::math::i6eMatrix< T >::transpose ( const i6eMatrix< T > &  other)
inlinestatic

calculates the transposed matrix

Definition at line 378 of file i6eMatrix.h.

Friends And Related Function Documentation

template<typename T >
friend class boost::serialization::access
friend

Definition at line 467 of file i6eMatrix.h.


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