17template <
typename T, std::
size_t Dim>
21template <
typename T, std::
size_t Dim>
46template <
typename T, std::
size_t Rows, std::
size_t Cols>
51 static constexpr std::size_t ROWS = Rows;
53 static constexpr std::size_t COLS = Cols;
60 template <
typename...
Ts>
62 static_assert(
sizeof...(xs) == Rows * Cols,
63 "mat_traits::operator() requires Rows*Cols coordinates");
67 const auto col =
i % Cols;
68 const auto row =
i / Cols;
77 static constexpr auto fill(
const T& x) {
79 for (std::size_t
i = 0;
i < Rows; ++
i)
80 for (std::size_t
j = 0;
j < Cols; ++
j)
matrix(
i,
j) = x;
104template <std::
size_t Dim>
107template <std::
size_t Dim>
110template <std::
size_t Dim>
113template <std::
size_t Dim>
116template <std::
size_t Rows, std::
size_t Cols>
119template <std::
size_t Dim>
122template <std::
size_t Dim>
125template <std::
size_t Rows, std::
size_t Cols>
128template <std::
size_t Dim>
131template <std::
size_t Dim>
134template <std::
size_t Rows, std::
size_t Cols>
137template <std::
size_t Dim>
140template <std::
size_t Dim>
143template <std::
size_t Rows, std::
size_t Cols>
146template <std::
size_t Dim>
149template <std::
size_t Dim>
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
constexpr std::size_t mat_cols_v
Registered compile-time column count after cv/ref normalization.
typename mat_traits< remove_cvref_t< Mat > >::value_type matrix_scalar_t
Registered matrix scalar type after cv/ref normalization.
Owning, fixed-size, row-major matrix container over a scalar field.
Owning, fixed-size vector container.
static constexpr auto operator()(Ts &&... xs)
Construct a matrix from Rows * Cols row-major coordinates.
T value_type
Scalar field stored by the matrix.
static constexpr auto fill(const T &x)
Construct a matrix whose elements are all equal to x.
Customization point for compile-time matrix metadata.