26#ifndef LIBSBX_MATH_MATRIX_HPP_
27#define LIBSBX_MATH_MATRIX_HPP_
46template<std::
size_t Columns, std::
size_t Rows, scalar Type>
47requires (Columns > 1u && Rows > 1u)
63 inline static constexpr auto columns = Columns;
68 inline static constexpr auto rows = Rows;
70 using value_type = Type;
71 using reference = value_type&;
72 using const_reference =
const value_type&;
73 using size_type = std::size_t;
88 template<
scalar Other = value_type>
98 template<
scalar Other = value_type>
116 [[nodiscard]] constexpr auto operator[](size_type index) noexcept ->
column_type&;
125 [[nodiscard]] constexpr auto operator[](size_type index) const noexcept -> const
column_type&;
182 constexpr auto row(const size_type row) const noexcept ->
basic_vector<Columns, value_type>;
189 constexpr auto data() noexcept -> value_type*;
196 constexpr auto data() const noexcept -> const value_type*;
210 template<typename... Args>
220 constexpr static auto identity(const value_type value = static_cast<value_type>(1)) noexcept ->
basic_matrix;
241template<std::
size_t Columns, std::
size_t Rows,
scalar Lhs,
scalar Rhs>
242[[nodiscard]] constexpr auto operator==(const
basic_matrix<Columns, Rows, Lhs>& lhs, const
basic_matrix<Columns, Rows, Rhs>& rhs) noexcept ->
bool;
257template<std::
size_t Columns, std::
size_t Rows,
scalar Lhs,
scalar Rhs>
273template<std::
size_t Columns, std::
size_t Rows,
scalar Lhs,
scalar Rhs>
289template<std::
size_t Columns, std::
size_t Rows,
scalar Lhs,
scalar Rhs>
290[[nodiscard]] constexpr auto operator*(
basic_matrix<Columns, Rows, Lhs> lhs, Rhs rhs) noexcept ->
basic_matrix<Columns, Rows, Lhs>;
305template<std::
size_t Columns, std::
size_t Rows,
scalar Lhs,
scalar Rhs>
306[[nodiscard]] constexpr auto operator*(Lhs lhs,
basic_matrix<Columns, Rows, Rhs> rhs) noexcept ->
basic_matrix<Columns, Rows, Rhs>;
317template<typename Matrix>
318[[nodiscard]] constexpr auto from_array(std::span<typename Matrix::value_type, Matrix::columns * Matrix::rows> array) -> Matrix;
322#include <libsbx/math/matrix.ipp>
Fixed-size column-major matrix.
Definition: matrix.hpp:48
direction
Matrix traversal direction.
Definition: matrix.hpp:55
Fixed-size vector type.
Definition: vector.hpp:55
Concept for scalar numeric types.
Definition: concepts.hpp:150
Core numeric concepts and type traits.
Generic fixed-size vector type.