emlabcpp
modern opinionated embedded C++ library
emlabcpp::matrix< N, M, T > Class Template Reference

#include <matrix.h>

Public Types

using value_type = T
 
using row_type = std::array< value_type, M >
 

Public Member Functions

constexpr matrix ()
 
constexpr matrix (std::array< row_type, N > data)
 
constexpr auto begin () const
 
constexpr auto end () const
 
constexpr row_type const & operator[] (std::size_t i) const
 
constexpr row_typeoperator[] (std::size_t i)
 
constexpr bool operator== (matrix const &other) const =default
 

Static Public Attributes

static constexpr std::size_t rows = N
 
static constexpr std::size_t cols = M
 

Member Typedef Documentation

◆ row_type

template<std::size_t N, std::size_t M, typename T = float>
using emlabcpp::matrix< N, M, T >::row_type = std::array< value_type, M >

◆ value_type

template<std::size_t N, std::size_t M, typename T = float>
using emlabcpp::matrix< N, M, T >::value_type = T

Constructor & Destructor Documentation

◆ matrix() [1/2]

template<std::size_t N, std::size_t M, typename T = float>
constexpr emlabcpp::matrix< N, M, T >::matrix ( )
inlineconstexpr

◆ matrix() [2/2]

template<std::size_t N, std::size_t M, typename T = float>
constexpr emlabcpp::matrix< N, M, T >::matrix ( std::array< row_type, N data)
inlineconstexpr

Member Function Documentation

◆ begin()

template<std::size_t N, std::size_t M, typename T = float>
constexpr auto emlabcpp::matrix< N, M, T >::begin ( ) const
inlineconstexpr

◆ end()

template<std::size_t N, std::size_t M, typename T = float>
constexpr auto emlabcpp::matrix< N, M, T >::end ( ) const
inlineconstexpr

◆ operator==()

template<std::size_t N, std::size_t M, typename T = float>
constexpr bool emlabcpp::matrix< N, M, T >::operator== ( matrix< N, M, T > const &  other) const
constexprdefault

◆ operator[]() [1/2]

template<std::size_t N, std::size_t M, typename T = float>
constexpr row_type& emlabcpp::matrix< N, M, T >::operator[] ( std::size_t  i)
inlineconstexpr

◆ operator[]() [2/2]

template<std::size_t N, std::size_t M, typename T = float>
constexpr row_type const& emlabcpp::matrix< N, M, T >::operator[] ( std::size_t  i) const
inlineconstexpr

Member Data Documentation

◆ cols

template<std::size_t N, std::size_t M, typename T = float>
constexpr std::size_t emlabcpp::matrix< N, M, T >::cols = M
staticconstexpr

◆ rows

template<std::size_t N, std::size_t M, typename T = float>
constexpr std::size_t emlabcpp::matrix< N, M, T >::rows = N
staticconstexpr

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