Template Class matrix_fixed

Inheritance Relationships

Base Type

Class Documentation

template<typename F, std::size_t M, std::size_t N>
class matrix_fixed : public cif::matrix_expression<matrix_fixed<F, M, N>>

Storage class implementation of matrix_expression with compile time fixed size.

matrix is m x n, addressing i,j is 0 <= i < m and 0 <= j < n element m i,j is mapped to [i * n + j] and thus storage is row major

Template Parameters

F – The type of the stored values

Public Types

using value_type = F

The value type

Public Functions

template<typename M2>
inline matrix_fixed(const M2 &m)

Copy constructor

inline matrix_fixed(value_type v = 0)

default constructor

inline matrix_fixed(const F (&v)[kSize])

Alternate constructor taking an array of values to store

template<std::size_t... Ixs>
inline matrix_fixed &fill(const F (&a)[kSize], std::index_sequence<Ixs...>)

Store the values in a in the matrix

inline constexpr std::size_t dim_m() const

Return dimension m.

inline constexpr std::size_t dim_n() const

Return dimension n.

inline constexpr value_type operator()(std::size_t i, std::size_t j) const

Return the value of element [ i, j ]

inline constexpr value_type &operator()(std::size_t i, std::size_t j)

Return a reference to element [ i, j ]

Public Static Attributes

static constexpr std::size_t kSize = M * N

The storage size