Loading...
Searching...
No Matches
terra::dense::Mat< T, Rows, Cols > Struct Template Reference

#include <mat.hpp>

Public Member Functions

T & operator() (int i, int j)
 
const T & operator() (int i, int j) const
 
template<int RHSRows, int RHSCols>
Mat< T, Rows, RHSCols > operator* (const Mat< T, RHSRows, RHSCols > &rhs) const
 
Vec< T, Rows > operator* (const Vec< T, Cols > &vec) const
 
Mat operator* (const T &scalar) const
 
Matoperator+= (const Mat &mat)
 
Mat operator+ (const Mat &mat)
 
Matoperator= (const Mat &mat)
 
constexpr Mat< T, Cols, Rows > transposed () const
 
void fill (const T value)
 
Mathadamard_product (const Mat &mat)
 
double_contract (const Mat &mat)
 
constexpr T det () const
 
constexpr Mat inv () const
 
constexpr Mat inv_transposed () const
 
constexpr Mat inv_transposed (const T &det) const
 
constexpr Mat diagonal () const
 

Static Public Member Functions

static constexpr Mat from_row_vecs (const Vec< T, Cols > &row0, const Vec< T, Cols > &row1, const Vec< T, Cols > &row2)
 
static constexpr Mat from_col_vecs (const Vec< T, Rows > &col0, const Vec< T, Rows > &col1)
 
static constexpr Mat from_col_vecs (const Vec< T, Rows > &col0, const Vec< T, Rows > &col1, const Vec< T, Rows > &col2)
 
static constexpr Mat from_single_col_vec (const Vec< T, Cols > &col, const int d)
 
static constexpr Mat diagonal_from_vec (const Vec< T, Rows > &diagonal)
 

Public Attributes

data [Rows][Cols] = {}
 

Static Public Attributes

static constexpr int rows = Rows
 
static constexpr int cols = Cols
 

Member Function Documentation

◆ det()

template<typename T , int Rows, int Cols>
constexpr T terra::dense::Mat< T, Rows, Cols >::det ( ) const
inlineconstexpr

◆ diagonal()

template<typename T , int Rows, int Cols>
constexpr Mat terra::dense::Mat< T, Rows, Cols >::diagonal ( ) const
inlineconstexpr

◆ diagonal_from_vec()

template<typename T , int Rows, int Cols>
static constexpr Mat terra::dense::Mat< T, Rows, Cols >::diagonal_from_vec ( const Vec< T, Rows > &  diagonal)
inlinestaticconstexpr

◆ double_contract()

template<typename T , int Rows, int Cols>
T terra::dense::Mat< T, Rows, Cols >::double_contract ( const Mat< T, Rows, Cols > &  mat)
inline

◆ fill()

template<typename T , int Rows, int Cols>
void terra::dense::Mat< T, Rows, Cols >::fill ( const T  value)
inline

◆ from_col_vecs() [1/2]

template<typename T , int Rows, int Cols>
static constexpr Mat terra::dense::Mat< T, Rows, Cols >::from_col_vecs ( const Vec< T, Rows > &  col0,
const Vec< T, Rows > &  col1 
)
inlinestaticconstexpr

◆ from_col_vecs() [2/2]

template<typename T , int Rows, int Cols>
static constexpr Mat terra::dense::Mat< T, Rows, Cols >::from_col_vecs ( const Vec< T, Rows > &  col0,
const Vec< T, Rows > &  col1,
const Vec< T, Rows > &  col2 
)
inlinestaticconstexpr

◆ from_row_vecs()

template<typename T , int Rows, int Cols>
static constexpr Mat terra::dense::Mat< T, Rows, Cols >::from_row_vecs ( const Vec< T, Cols > &  row0,
const Vec< T, Cols > &  row1,
const Vec< T, Cols > &  row2 
)
inlinestaticconstexpr

◆ from_single_col_vec()

template<typename T , int Rows, int Cols>
static constexpr Mat terra::dense::Mat< T, Rows, Cols >::from_single_col_vec ( const Vec< T, Cols > &  col,
const int  d 
)
inlinestaticconstexpr

◆ hadamard_product()

template<typename T , int Rows, int Cols>
Mat & terra::dense::Mat< T, Rows, Cols >::hadamard_product ( const Mat< T, Rows, Cols > &  mat)
inline

◆ inv()

template<typename T , int Rows, int Cols>
constexpr Mat terra::dense::Mat< T, Rows, Cols >::inv ( ) const
inlineconstexpr

◆ inv_transposed() [1/2]

template<typename T , int Rows, int Cols>
constexpr Mat terra::dense::Mat< T, Rows, Cols >::inv_transposed ( ) const
inlineconstexpr

◆ inv_transposed() [2/2]

template<typename T , int Rows, int Cols>
constexpr Mat terra::dense::Mat< T, Rows, Cols >::inv_transposed ( const T &  det) const
inlineconstexpr

◆ operator()() [1/2]

template<typename T , int Rows, int Cols>
T & terra::dense::Mat< T, Rows, Cols >::operator() ( int  i,
int  j 
)
inline

◆ operator()() [2/2]

template<typename T , int Rows, int Cols>
const T & terra::dense::Mat< T, Rows, Cols >::operator() ( int  i,
int  j 
) const
inline

◆ operator*() [1/3]

template<typename T , int Rows, int Cols>
template<int RHSRows, int RHSCols>
Mat< T, Rows, RHSCols > terra::dense::Mat< T, Rows, Cols >::operator* ( const Mat< T, RHSRows, RHSCols > &  rhs) const
inline

◆ operator*() [2/3]

template<typename T , int Rows, int Cols>
Mat terra::dense::Mat< T, Rows, Cols >::operator* ( const T &  scalar) const
inline

◆ operator*() [3/3]

template<typename T , int Rows, int Cols>
Vec< T, Rows > terra::dense::Mat< T, Rows, Cols >::operator* ( const Vec< T, Cols > &  vec) const
inline

◆ operator+()

template<typename T , int Rows, int Cols>
Mat terra::dense::Mat< T, Rows, Cols >::operator+ ( const Mat< T, Rows, Cols > &  mat)
inline

◆ operator+=()

template<typename T , int Rows, int Cols>
Mat & terra::dense::Mat< T, Rows, Cols >::operator+= ( const Mat< T, Rows, Cols > &  mat)
inline

◆ operator=()

template<typename T , int Rows, int Cols>
Mat & terra::dense::Mat< T, Rows, Cols >::operator= ( const Mat< T, Rows, Cols > &  mat)
inline

◆ transposed()

template<typename T , int Rows, int Cols>
constexpr Mat< T, Cols, Rows > terra::dense::Mat< T, Rows, Cols >::transposed ( ) const
inlineconstexpr

Member Data Documentation

◆ cols

template<typename T , int Rows, int Cols>
constexpr int terra::dense::Mat< T, Rows, Cols >::cols = Cols
staticconstexpr

◆ data

template<typename T , int Rows, int Cols>
T terra::dense::Mat< T, Rows, Cols >::data[Rows][Cols] = {}

◆ rows

template<typename T , int Rows, int Cols>
constexpr int terra::dense::Mat< T, Rows, Cols >::rows = Rows
staticconstexpr

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