The blo Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
blo::SmallMatrix< T, M, N > Class Template Reference

Small matrix. More...

#include <SmallMatrix.h>

Inheritance diagram for blo::SmallMatrix< T, M, N >:
blo::Array2DFixed< T, M, N >

Public Member Functions

 SmallMatrix ()=default
 Default constructor.
 
 SmallMatrix (const T &val)
 Constructs matrix of specified value.
 
 SmallMatrix (const std::initializer_list< const std::initializer_list< T > > &lists)
 Constructs matrix that is a copy of specified initializer lists.
 
 SmallMatrix (const T *pSrc, int srcStride1, int srcStride2)
 Constructs matrix that is a copy of specified matrix.
 
 SmallMatrix (const SmallMatrixTranspose< T, N, M > &transpose)
 Constructs matrix that is a copy of specified matrix transpose.
 
 SmallMatrix (const SmallMatrix< T, M, N > &rhs)=default
 Copy constructor.
 
virtual ~SmallMatrix ()=default
 Destructor.
 
SmallMatrix< T, M, N > & operator= (const SmallMatrix< T, M, N > &rhs)=default
 Assignment operator.
 
SmallMatrix< T, M, N > & operator= (const SmallMatrixTranspose< T, N, M > &transpose)
 Assignment operator.
 
SmallMatrix< T, M, N > & operator+= (const T &scalar)
 
SmallMatrix< T, M, N > & operator+= (const SmallMatrix< T, M, N > &rhs)
 
SmallMatrix< T, M, N > & operator+= (const SmallMatrixTranspose< T, N, M > &transpose)
 
SmallMatrix< T, M, N > & operator-= (const T &scalar)
 
SmallMatrix< T, M, N > & operator-= (const SmallMatrix< T, M, N > &rhs)
 
SmallMatrix< T, M, N > & operator-= (const SmallMatrixTranspose< T, N, M > &transpose)
 
SmallMatrix< T, M, N > & operator*= (const T &scalar)
 
SmallMatrix< T, M, N > & operator/= (const T &scalar)
 
SmallMatrix< T, M, N > & operator*= (const SmallMatrix< T, N, N > &rhs)
 
SmallMatrix< T, M, N > & operator*= (const SmallMatrixTranspose< T, N, N > &transpose)
 
- Public Member Functions inherited from blo::Array2DFixed< T, M, N >
 Array2DFixed ()=default
 Default constructor.
 
 Array2DFixed (const T &val)
 Constructs array of specified value.
 
 Array2DFixed (const std::initializer_list< const std::initializer_list< T > > &lists)
 Constructs array that is a copy of specified initializer lists.
 
 Array2DFixed (const Array2DFixed< T, M, N > &rhs)=default
 Copy constructor.
 
virtual ~Array2DFixed ()=default
 Destructor.
 
Array2DFixed< T, M, N > & operator= (const Array2DFixed< T, M, N > &rhs)=default
 Copy assignment operator.
 
T * operator[] (int i)
 Index array row.
 
const T * operator[] (int i) const
 Index array row.
 
T * ptrData ()
 Retrieves the pointer to the beginning of the array.
 
const T * ptrData () const
 Retrieves the pointer to the beginning of the array.
 
void set (const T &val)
 Sets array elements to a value.
 

Additional Inherited Members

- Static Public Member Functions inherited from blo::Array2DFixed< T, M, N >
static int rows ()
 Number of rows in the array.
 
static int height ()
 Height of the array.
 
static int columns ()
 Number of columns in the array.
 
static int width ()
 Width of the array.
 
static int stride1 ()
 Stride in bytes between the rows in the array.
 
static int step ()
 Step in bytes between the rows in the array.
 
static int ld ()
 Leading dimension between the rows in the array.
 
static int stride2 ()
 Stride in bytes between the elements in the array.
 

Detailed Description

template<typename T, size_t M, size_t N>
class blo::SmallMatrix< T, M, N >

Small matrix.

Template Parameters
TData type.
MNumber of rows.
NNumber of columns.

Constructor & Destructor Documentation

◆ SmallMatrix() [1/6]

template<typename T , size_t M, size_t N>
blo::SmallMatrix< T, M, N >::SmallMatrix ( )
default

Default constructor.

◆ SmallMatrix() [2/6]

template<typename T , size_t M, size_t N>
blo::SmallMatrix< T, M, N >::SmallMatrix ( const T &  val)
explicit

Constructs matrix of specified value.

Parameters
valConstant value to assign to each element in the matrix.

◆ SmallMatrix() [3/6]

template<typename T , size_t M, size_t N>
blo::SmallMatrix< T, M, N >::SmallMatrix ( const std::initializer_list< const std::initializer_list< T > > &  lists)

Constructs matrix that is a copy of specified initializer lists.

Parameters
listsInitializer lists.

◆ SmallMatrix() [4/6]

template<typename T , size_t M, size_t N>
blo::SmallMatrix< T, M, N >::SmallMatrix ( const T *  pSrc,
int  srcStride1,
int  srcStride2 
)

Constructs matrix that is a copy of specified matrix.

Parameters
pSrcPointer to the source matrix.
srcStride1Stride in bytes between the rows in the source matrix.
srcStride2Stride in bytes between the elements in the source matrix.

◆ SmallMatrix() [5/6]

template<typename T , size_t M, size_t N>
blo::SmallMatrix< T, M, N >::SmallMatrix ( const SmallMatrixTranspose< T, N, M > &  transpose)
explicit

Constructs matrix that is a copy of specified matrix transpose.

Parameters
transposeThe source matrix transpose.

◆ SmallMatrix() [6/6]

template<typename T , size_t M, size_t N>
blo::SmallMatrix< T, M, N >::SmallMatrix ( const SmallMatrix< T, M, N > &  rhs)
default

Copy constructor.

◆ ~SmallMatrix()

template<typename T , size_t M, size_t N>
virtual blo::SmallMatrix< T, M, N >::~SmallMatrix ( )
virtualdefault

Destructor.

Member Function Documentation

◆ operator*=() [1/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator*= ( const SmallMatrix< T, N, N > &  rhs)

◆ operator*=() [2/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator*= ( const SmallMatrixTranspose< T, N, N > &  transpose)

◆ operator*=() [3/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator*= ( const T &  scalar)

◆ operator+=() [1/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator+= ( const SmallMatrix< T, M, N > &  rhs)

◆ operator+=() [2/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator+= ( const SmallMatrixTranspose< T, N, M > &  transpose)

◆ operator+=() [3/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator+= ( const T &  scalar)

◆ operator-=() [1/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator-= ( const SmallMatrix< T, M, N > &  rhs)

◆ operator-=() [2/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator-= ( const SmallMatrixTranspose< T, N, M > &  transpose)

◆ operator-=() [3/3]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator-= ( const T &  scalar)

◆ operator/=()

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator/= ( const T &  scalar)

◆ operator=() [1/2]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator= ( const SmallMatrix< T, M, N > &  rhs)
default

Assignment operator.

◆ operator=() [2/2]

template<typename T , size_t M, size_t N>
SmallMatrix< T, M, N > & blo::SmallMatrix< T, M, N >::operator= ( const SmallMatrixTranspose< T, N, M > &  transpose)

Assignment operator.

Parameters
transposeThe source matrix transpose.

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