Maipa's Standard Library Extension 1.5.6
mstd
Loading...
Searching...
No Matches
mstd::mat< C, R, T > Class Template Reference

#include <mat.hpp>

Inheritance diagram for mstd::mat< C, R, T >:
[legend]
Collaboration diagram for mstd::mat< C, R, T >:
[legend]

Classes

class  mat_column
class  const_mat_column

Public Types

using column_type = vec<R, T>
using row_type = vec<C, T>
using value_type = T

Public Member Functions

_MSTD_CONSTEXPR20 mat ()
template<arithmetic OT>
_MSTD_CONSTEXPR20 mat (const OT *values, size_t size)
template<arithmetic OT>
_MSTD_CONSTEXPR20 mat (const OT *values, size_t columns, size_t rows)
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 mat (const OT(&values)[ON])
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mat (const OT(&values)[OC][OR])
template<arithmetic... Ts>
_MSTD_CONSTEXPR20 mat (const Ts &... values)
template<size_t VN, arithmetic OT>
_MSTD_CONSTEXPR20 mat (const vec< VN, OT > *columns, size_t size)
template<size_t N, size_t VN, arithmetic OT>
_MSTD_CONSTEXPR20 mat (const vec< VN, OT >(&columns)[N])
template<size_t VN, arithmetic... Ts>
_MSTD_CONSTEXPR20 mat (const vec< VN, Ts > &... columns)
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mat (const mat< OC, OR, OT > &other)
_MSTD_CONSTEXPR20 ~mat () noexcept=default
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 mat< C, R, T > & operator= (const OT(&values)[ON])
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mat< C, R, T > & operator= (const OT(&values)[OC][OR])
template<size_t VN, arithmetic OT, size_t N>
_MSTD_CONSTEXPR20 mat< C, R, T > & operator= (const vec< VN, OT >(&columns)[N])
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mat< C, R, T > & operator= (const mat< OC, OR, OT > &other)
static _MSTD_CONSTEXPR20 mat< C, R, T > T fill_identity (const T &value) _MSTD_REQUIRES(C

Static Public Member Functions

static _MSTD_CONSTEXPR20 mat< C, R, T > zero ()
static _MSTD_CONSTEXPR20 mat< C, R, T > one ()
static _MSTD_CONSTEXPR20 mat< C, R, T > fill (const T &value)
static _MSTD_CONSTEXPR20 mat< C, R, T > identity () _MSTD_REQUIRES(C

Public Attributes

static _MSTD_CONSTEXPR20 mat< C, R, T > R
static _MSTD_CONSTEXPR20 mat< C, R, T > T R

Static Public Attributes

static _MSTD_CONSTEXPR17 const size_t columns = C
static _MSTD_CONSTEXPR17 const size_t rows = R
static _MSTD_CONSTEXPR17 const size_t size = R * C

Private Member Functions

template<arithmetic... Ts, size_t... Idxs>
_MSTD_CONSTEXPR20 void _set_values (const std::index_sequence< Idxs... > &, const Ts &... values)
template<size_t VN, arithmetic VT>
_MSTD_CONSTEXPR20 void _set_column (const size_t idx, const vec< VN, VT > &column)
template<size_t VN, arithmetic... Ts, size_t... Idxs>
_MSTD_CONSTEXPR20 void _set_values (const std::index_sequence< Idxs... > &, const vec< VN, Ts > &... columns)
_MSTD_CONSTEXPR20 void _fill_column (size_t colIdx, const T &value)
_MSTD_CONSTEXPR20 void _fill_column_from (size_t firstIdx, size_t colIdx, const T &value)
_MSTD_CONSTEXPR20 void _fill_values (const T &value)
_MSTD_CONSTEXPR20 void _fill_values_from (size_t firstIdx, const T &value)
_MSTD_CONSTEXPR20 void _set_identity_values (const T &value)
template<arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const OT *values, size_t size)
template<arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const OT *values, size_t columns, size_t rows)
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const OT(&values)[ON])
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const OT(&values)[OC][OR])
template<size_t VN, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const vec< VN, OT > *columns, size_t size)
template<size_t VN, size_t N, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const vec< VN, OT >(&columns)[N])
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 void _copy_values_from (const mat< OC, OR, OT > &other)

Private Attributes

_values [C][R] = {}

Member Typedef Documentation

◆ column_type

template<size_t C, size_t R, arithmetic T>
using mstd::mat< C, R, T >::column_type = vec<R, T>

◆ row_type

template<size_t C, size_t R, arithmetic T>
using mstd::mat< C, R, T >::row_type = vec<C, T>

◆ value_type

template<size_t C, size_t R, arithmetic T>
using mstd::mat< C, R, T >::value_type = T

Constructor & Destructor Documentation

◆ mat() [1/10]

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( )
inline

◆ mat() [2/10]

template<size_t C, size_t R, arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const OT * values,
size_t size )
inline

◆ mat() [3/10]

template<size_t C, size_t R, arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const OT * values,
size_t columns,
size_t rows )
inline

◆ mat() [4/10]

template<size_t C, size_t R, arithmetic T>
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const OT(&) values[ON])
inline

◆ mat() [5/10]

template<size_t C, size_t R, arithmetic T>
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const OT(&) values[OC][OR])
inline

◆ mat() [6/10]

template<size_t C, size_t R, arithmetic T>
template<arithmetic... Ts>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const Ts &... values)
inline

◆ mat() [7/10]

template<size_t C, size_t R, arithmetic T>
template<size_t VN, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const vec< VN, OT > * columns,
size_t size )
inline

◆ mat() [8/10]

template<size_t C, size_t R, arithmetic T>
template<size_t N, size_t VN, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const vec< VN, OT >(&) columns[N])
inline

◆ mat() [9/10]

template<size_t C, size_t R, arithmetic T>
template<size_t VN, arithmetic... Ts>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const vec< VN, Ts > &... columns)
inline

◆ mat() [10/10]

template<size_t C, size_t R, arithmetic T>
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::mat ( const mat< OC, OR, OT > & other)
inline

◆ ~mat()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mstd::mat< C, R, T >::~mat ( )
defaultnoexcept

Member Function Documentation

◆ _copy_values_from() [1/7]

template<size_t C, size_t R, arithmetic T>
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const mat< OC, OR, OT > & other)
inlineprivate

◆ _copy_values_from() [2/7]

template<size_t C, size_t R, arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const OT * values,
size_t columns,
size_t rows )
inlineprivate

◆ _copy_values_from() [3/7]

template<size_t C, size_t R, arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const OT * values,
size_t size )
inlineprivate

◆ _copy_values_from() [4/7]

template<size_t C, size_t R, arithmetic T>
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const OT(&) values[OC][OR])
inlineprivate

◆ _copy_values_from() [5/7]

template<size_t C, size_t R, arithmetic T>
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const OT(&) values[ON])
inlineprivate

◆ _copy_values_from() [6/7]

template<size_t C, size_t R, arithmetic T>
template<size_t VN, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const vec< VN, OT > * columns,
size_t size )
inlineprivate

◆ _copy_values_from() [7/7]

template<size_t C, size_t R, arithmetic T>
template<size_t VN, size_t N, arithmetic OT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_copy_values_from ( const vec< VN, OT >(&) columns[N])
inlineprivate

◆ _fill_column()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_fill_column ( size_t colIdx,
const T & value )
inlineprivate

◆ _fill_column_from()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_fill_column_from ( size_t firstIdx,
size_t colIdx,
const T & value )
inlineprivate

◆ _fill_values()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_fill_values ( const T & value)
inlineprivate

◆ _fill_values_from()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_fill_values_from ( size_t firstIdx,
const T & value )
inlineprivate

◆ _set_column()

template<size_t C, size_t R, arithmetic T>
template<size_t VN, arithmetic VT>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_set_column ( const size_t idx,
const vec< VN, VT > & column )
inlineprivate

◆ _set_identity_values()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_set_identity_values ( const T & value)
inlineprivate

◆ _set_values() [1/2]

template<size_t C, size_t R, arithmetic T>
template<arithmetic... Ts, size_t... Idxs>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_set_values ( const std::index_sequence< Idxs... > & ,
const Ts &... values )
inlineprivate

◆ _set_values() [2/2]

template<size_t C, size_t R, arithmetic T>
template<size_t VN, arithmetic... Ts, size_t... Idxs>
_MSTD_CONSTEXPR20 void mstd::mat< C, R, T >::_set_values ( const std::index_sequence< Idxs... > & ,
const vec< VN, Ts > &... columns )
inlineprivate

◆ fill()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > mstd::mat< C, R, T >::fill ( const T & value)
inlinestatic

◆ fill_identity()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > T mstd::mat< C, R, T >::fill_identity ( const T & value)

◆ identity()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > mstd::mat< C, R, T >::identity ( )
static

◆ one()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > mstd::mat< C, R, T >::one ( )
inlinestatic

◆ operator=() [1/4]

template<size_t C, size_t R, arithmetic T>
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mat< C, R, T > & mstd::mat< C, R, T >::operator= ( const mat< OC, OR, OT > & other)
inline

◆ operator=() [2/4]

template<size_t C, size_t R, arithmetic T>
template<size_t OC, size_t OR, arithmetic OT>
_MSTD_CONSTEXPR20 mat< C, R, T > & mstd::mat< C, R, T >::operator= ( const OT(&) values[OC][OR])
inline

◆ operator=() [3/4]

template<size_t C, size_t R, arithmetic T>
template<size_t ON, arithmetic OT>
_MSTD_CONSTEXPR20 mat< C, R, T > & mstd::mat< C, R, T >::operator= ( const OT(&) values[ON])
inline

◆ operator=() [4/4]

template<size_t C, size_t R, arithmetic T>
template<size_t VN, arithmetic OT, size_t N>
_MSTD_CONSTEXPR20 mat< C, R, T > & mstd::mat< C, R, T >::operator= ( const vec< VN, OT >(&) columns[N])
inline

◆ zero()

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > mstd::mat< C, R, T >::zero ( )
inlinestatic

Member Data Documentation

◆ _values

template<size_t C, size_t R, arithmetic T>
T mstd::mat< C, R, T >::_values[C][R] = {}
private

◆ columns

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR17 const size_t mstd::mat< C, R, T >::columns = C
static

◆ R [1/2]

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > T mstd::mat< C, R, T >::R

◆ R [2/2]

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR20 mat< C, R, T > mstd::mat< C, R, T >::R

◆ rows

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR17 const size_t mstd::mat< C, R, T >::rows = R
static

◆ size

template<size_t C, size_t R, arithmetic T>
_MSTD_CONSTEXPR17 const size_t mstd::mat< C, R, T >::size = R * C
static