Khangai Robot Play - Naive  01
THe naive play of the Khangai Robot
Mat Class Reference

#include <mat.h>

Public Member Functions

 Mat ()
 
template<size_t M, size_t N>
 Mat (const float(&mat)[M][N])
 
 Mat (uint8_t rows, uint8_t columns)
 
 Mat (Mat &&)=default
 
Matoperator= (Mat &&)=default
 
 ~Mat ()
 
uint8_t rows () const
 
uint8_t cols () const
 
float & at (uint8_t i, uint8_t j)
 
 Mat (const Mat &m)
 
Matoperator= (const Mat &m)
 
Matoperator+= (const Mat &rhs)
 
Matoperator-= (const Mat &rhs)
 
Matoperator *= (const Mat &rhs)
 
Matoperator *= (const Vec3< float > &rhs)
 
Mat mult (const Mat &m)
 
Mat mult_EW (float num)
 
Mat transpose ()
 
Mat trans ()
 
void fill (float num)
 
template<size_t M, size_t N>
void fill (const float(&mat)[M][N])
 
void add_Rows (uint8_t r)
 
void add_Cols (uint8_t c)
 
bool is_Zero () const
 
void swap_Rows (uint8_t a, uint8_t b)
 
void swap_Cols (size_t a, size_t b)
 
bool inv (Mat &inv) const
 
Mat inv () const
 
void print () const
 

Static Public Member Functions

static Mat eye (uint8_t n)
 

Private Attributes

float matrix_ [MAX_MATRIX_ROWS][MAX_MATRIX_COLS]
 
uint8_t rows_
 
uint8_t cols_
 

Friends

Mat operator+ (Mat lhs, const Mat &rhs)
 
Mat operator- (Mat lhs, const Mat &rhs)
 
Mat operator * (Mat lhs, const Mat &rhs)
 
Mat operator * (Mat lhs, const Vec3< float > &rhs)
 
void swap (Mat &first, Mat &second)
 

Constructor & Destructor Documentation

◆ Mat() [1/5]

Mat::Mat ( )
inline

◆ Mat() [2/5]

template<size_t M, size_t N>
Mat::Mat ( const float(&)  mat[M][N])
inline
Here is the call graph for this function:

◆ Mat() [3/5]

Mat::Mat ( uint8_t  rows,
uint8_t  columns 
)
Here is the call graph for this function:

◆ Mat() [4/5]

Mat::Mat ( Mat &&  )
default

◆ ~Mat()

Mat::~Mat ( )
inline

◆ Mat() [5/5]

Mat::Mat ( const Mat m)

Member Function Documentation

◆ add_Cols()

void Mat::add_Cols ( uint8_t  c)
inline

◆ add_Rows()

void Mat::add_Rows ( uint8_t  r)
inline

◆ at()

float& Mat::at ( uint8_t  i,
uint8_t  j 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cols()

uint8_t Mat::cols ( ) const
inline
Here is the caller graph for this function:

◆ eye()

Mat Mat::eye ( uint8_t  n)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill() [1/2]

void Mat::fill ( float  num)
inline
Here is the caller graph for this function:

◆ fill() [2/2]

template<size_t M, size_t N>
void Mat::fill ( const float(&)  mat[M][N])
inline
Here is the call graph for this function:

◆ inv() [1/2]

bool Mat::inv ( Mat inv) const

inverse based on LU factorization with partial pivotting

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inv() [2/2]

Mat Mat::inv ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_Zero()

bool Mat::is_Zero ( ) const

◆ mult()

Mat Mat::mult ( const Mat m)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mult_EW()

Mat Mat::mult_EW ( float  num)

◆ operator *=() [1/2]

Mat & Mat::operator *= ( const Mat rhs)
Here is the call graph for this function:

◆ operator *=() [2/2]

Mat & Mat::operator *= ( const Vec3< float > &  rhs)
Here is the call graph for this function:

◆ operator+=()

Mat & Mat::operator+= ( const Mat rhs)
Here is the call graph for this function:

◆ operator-=()

Mat & Mat::operator-= ( const Mat rhs)
Here is the call graph for this function:

◆ operator=() [1/2]

Mat& Mat::operator= ( Mat &&  )
default

◆ operator=() [2/2]

Mat& Mat::operator= ( const Mat m)
inline

◆ print()

void Mat::print ( ) const
inline

◆ rows()

uint8_t Mat::rows ( ) const
inline
Here is the caller graph for this function:

◆ swap_Cols()

void Mat::swap_Cols ( size_t  a,
size_t  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap_Rows()

void Mat::swap_Rows ( uint8_t  a,
uint8_t  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ trans()

Mat Mat::trans ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transpose()

Mat Mat::transpose ( )
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator * [1/2]

Mat operator * ( Mat  lhs,
const Mat rhs 
)
friend

◆ operator * [2/2]

Mat operator * ( Mat  lhs,
const Vec3< float > &  rhs 
)
friend

◆ operator+

Mat operator+ ( Mat  lhs,
const Mat rhs 
)
friend

◆ operator-

Mat operator- ( Mat  lhs,
const Mat rhs 
)
friend

◆ swap

void swap ( Mat first,
Mat second 
)
friend

Member Data Documentation

◆ cols_

uint8_t Mat::cols_
private

◆ matrix_

float Mat::matrix_[MAX_MATRIX_ROWS][MAX_MATRIX_COLS]
private

◆ rows_

uint8_t Mat::rows_
private

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