Assignments Assignments

Public Member Functions | Private Attributes | List of all members
Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType > Class Template Reference

`#include <geometry.h>`

## Public Member Functions
| _BaseMatrix (void)
double & | operator() (int r, int c)
const double & | operator() (int r, int c) const
MatrixTransposeType | transpose (void) const
Point< Rows > | operator* (const Point< Cols > &p) const
MatrixType | operator* (double s) const
MatrixType | operator+ (const MatrixType &m) const
double | dot (const _BaseMatrix &p) const

## Private Attributes
double | _m [Rows][Cols]

## Detailed Description

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>
class Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >

This templated class represents a general rectangular, Rows x Cols, matrix that is the base for both rectangular and square matrices Matrices are stored in row-major order.

## Constructor & Destructor Documentation

## ◆ _BaseMatrix()

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::_BaseMatrix | ( | void |  | ) |

The default constructor generates a zero matrix

## Member Function Documentation

## ◆ dot()

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

double Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::dot | ( | const _BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType > & | p | ) | const

Dot-product method for inner-product space

## ◆ operator()() [1/2]

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

double & Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::operator() | ( | int | r,
|  | int | c )

This method returns the entry of the matrix in the r-th row and the c-th column.

## ◆ operator()() [2/2]

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

const double & Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::operator() | ( | int | r,
|  | int | c ) const

This method returns the entry of the matrix in the r-th row and the c-th column.

## ◆ operator*() [1/2]

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

Point< Rows > Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::operator* | ( | const Point< Cols > & | p | ) | const

This method transforms a Dim-dimensional point by applying the linear transformation.

## ◆ operator*() [2/2]

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

MatrixType Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::operator* | ( | double | s | ) | const

Scaling method for vector space

## ◆ operator+()

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

MatrixType Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::operator+ | ( | const MatrixType & | m | ) | const

Addition method for vector space

## ◆ transpose()

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

MatrixTransposeType Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::transpose | ( | void |  | ) | const

This method returns the transpose of a matrix.

## Member Data Documentation

## ◆ _m

template<unsigned int Rows, unsigned int Cols, typename MatrixType, typename MatrixTransposeType>

double Util::_BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType >::_m[Rows][Cols]
| private

The actual matrix entries

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

- Assignments/Util/geometry.h
- Assignments/Util/geometry.inl