ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Math::MatrixBase< rows, cols > Class Template Reference

The base class for all the matrices. More...

#include <matrix.h>

Inheritance diagram for Math::MatrixBase< rows, cols >:

List of all members.

Classes

class  Row
 Convenient class for feeding a matrix. More...

Public Member Functions

bool isZero () const
 Returns true if this matrix's values are all 0.
Matrix< rows, cols > getNegative () const
Row getRow (int row)
 Returns an instance of Row for a particular row of this matrix.
float * getData ()
 Returns a pointer to the internal data of this matrix.
const float * getData () const
 Returns a pointer to the internal data of this matrix.
void setData (const float *data)
 Sets the internal data of this matrix.
float getValue (int row, int col) const
void setValue (int row, int col, float value)
float & operator() (int row, int col)
float operator() (int row, int col) const
 operator const Matrix< rows, cols > & () const
 operator Matrix< rows, cols > & ()
Matrix< rows, cols > & operator= (const Matrix< rows, cols > &m)
Matrix< rows, cols > & operator+= (const Matrix< rows, cols > &m)
Matrix< rows, cols > & operator-= (const Matrix< rows, cols > &m)
Matrix< rows, cols > & operator*= (float factor)
Matrix< rows, cols > & operator/= (float factor)

Static Public Member Functions

static Matrix< rows, cols > sum (const Matrix< rows, cols > &m1, const Matrix< rows, cols > &m2)
static Matrix< rows, cols > difference (const Matrix< rows, cols > &m1, const Matrix< rows, cols > &m2)
static Matrix< rows, cols > product (const Matrix< rows, cols > &m1, float factor)
static Matrix< rows, cols > quotient (const Matrix< rows, cols > &m1, float factor)

Protected Member Functions

 MatrixBase ()
 MatrixBase (const float *data)
 MatrixBase (const MatrixBase< rows, cols > &m)
const Matrix< rows, cols > & getThis () const
Matrix< rows, cols > & getThis ()

Private Attributes

float _values [rows *cols]

Detailed Description

template<int rows, int cols>
class Math::MatrixBase< rows, cols >

The base class for all the matrices.

Definition at line 71 of file matrix.h.


Constructor & Destructor Documentation

template<int rows, int cols>
Math::MatrixBase< rows, cols >::MatrixBase (  )  [protected]

Definition at line 215 of file matrix.h.

template<int rows, int cols>
Math::MatrixBase< rows, cols >::MatrixBase ( const float *  data  )  [protected]

Definition at line 222 of file matrix.h.

template<int rows, int cols>
Math::MatrixBase< rows, cols >::MatrixBase ( const MatrixBase< rows, cols > &  m  )  [protected]

Definition at line 227 of file matrix.h.


Member Function Documentation

template<int r, int c>
Matrix< r, c > Math::MatrixBase< r, c >::difference ( const Matrix< r, c > &  m1,
const Matrix< r, c > &  m2 
) [static]

Definition at line 293 of file matrix.h.

template<int rows, int cols>
const float * Math::MatrixBase< rows, cols >::getData (  )  const [inline]

Returns a pointer to the internal data of this matrix.

Definition at line 241 of file matrix.h.

template<int rows, int cols>
float * Math::MatrixBase< rows, cols >::getData (  )  [inline]

Returns a pointer to the internal data of this matrix.

Definition at line 236 of file matrix.h.

template<int r, int c>
Matrix< r, c > Math::MatrixBase< r, c >::getNegative (  )  const

Definition at line 275 of file matrix.h.

template<int rows, int cols>
MatrixBase< rows, cols >::Row Math::MatrixBase< rows, cols >::getRow ( int  row  ) 

Returns an instance of Row for a particular row of this matrix.

Row is a convenient class for feeding a matrix.

     Matrix<3, 3> m;
     m.getRow(0) << 0 << 0   << 0;
     m.getRow(1) << 1 << 2   << 0;
     m.getRow(2) << 0 << 0.5 << 1;
Parameters:
row The row to be feeded.

Definition at line 381 of file matrix.h.

template<int rows, int cols>
Matrix<rows, cols>& Math::MatrixBase< rows, cols >::getThis (  )  [inline, protected]

Definition at line 150 of file matrix.h.

template<int rows, int cols>
const Matrix<rows, cols>& Math::MatrixBase< rows, cols >::getThis (  )  const [inline, protected]

Definition at line 148 of file matrix.h.

template<int rows, int cols>
float Math::MatrixBase< rows, cols >::getValue ( int  row,
int  col 
) const [inline]

Definition at line 251 of file matrix.h.

template<int rows, int cols>
bool Math::MatrixBase< rows, cols >::isZero (  )  const

Returns true if this matrix's values are all 0.

Definition at line 265 of file matrix.h.

template<int rows, int cols>
Math::MatrixBase< rows, cols >::operator const Matrix< rows, cols > & (  )  const [inline]

Definition at line 129 of file matrix.h.

template<int rows, int cols>
Math::MatrixBase< rows, cols >::operator Matrix< rows, cols > & (  )  [inline]

Definition at line 130 of file matrix.h.

template<int rows, int cols>
float & Math::MatrixBase< rows, cols >::operator() ( int  row,
int  col 
) [inline]

Definition at line 324 of file matrix.h.

template<int rows, int cols>
float Math::MatrixBase< rows, cols >::operator() ( int  row,
int  col 
) const [inline]

Definition at line 330 of file matrix.h.

template<int rows, int cols>
Matrix< rows, cols > & Math::MatrixBase< rows, cols >::operator*= ( float  factor  ) 

Definition at line 360 of file matrix.h.

template<int rows, int cols>
Matrix< rows, cols > & Math::MatrixBase< rows, cols >::operator+= ( const Matrix< rows, cols > &  m  ) 

Definition at line 342 of file matrix.h.

template<int rows, int cols>
Matrix< rows, cols > & Math::MatrixBase< rows, cols >::operator-= ( const Matrix< rows, cols > &  m  ) 

Definition at line 351 of file matrix.h.

template<int rows, int cols>
Matrix< rows, cols > & Math::MatrixBase< rows, cols >::operator/= ( float  factor  ) 

Definition at line 369 of file matrix.h.

template<int rows, int cols>
Matrix< rows, cols > & Math::MatrixBase< rows, cols >::operator= ( const Matrix< rows, cols > &  m  ) 

Definition at line 335 of file matrix.h.

template<int r, int c>
Matrix< r, c > Math::MatrixBase< r, c >::product ( const Matrix< r, c > &  m1,
float  factor 
) [static]

Definition at line 302 of file matrix.h.

template<int r, int c>
Matrix< r, c > Math::MatrixBase< r, c >::quotient ( const Matrix< r, c > &  m1,
float  factor 
) [static]

Definition at line 311 of file matrix.h.

template<int rows, int cols>
void Math::MatrixBase< rows, cols >::setData ( const float *  data  ) 

Sets the internal data of this matrix.

Definition at line 246 of file matrix.h.

template<int rows, int cols>
void Math::MatrixBase< rows, cols >::setValue ( int  row,
int  col,
float  value 
) [inline]

Definition at line 257 of file matrix.h.

template<int r, int c>
Matrix< r, c > Math::MatrixBase< r, c >::sum ( const Matrix< r, c > &  m1,
const Matrix< r, c > &  m2 
) [static]

Definition at line 284 of file matrix.h.


Member Data Documentation

template<int rows, int cols>
float Math::MatrixBase< rows, cols >::_values[rows *cols] [private]

Definition at line 154 of file matrix.h.


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


Generated on Sat Nov 16 2019 05:03:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge