cotila  1.2.1
A compile time linear algebra system
All Classes Files Functions Variables Modules Pages

◆ submat()

template<std::size_t P, std::size_t Q, std::size_t M, std::size_t N, typename T >
constexpr matrix<T, P, Q> cotila::submat ( const matrix< T, M, N > &  m,
std::size_t  a,
std::size_t  b 
)
Parameters
man $ M \times N $ matrix of type T
athe starting index into the rows
bthe starting index into the columns
Returns
an $ P \times Q $ submatrix $ \textbf{m}' $ of type T such that $ {\textbf{m}'}_{ij} = \textbf{m}_{\left(a + i\right),\ \left(b + j\right)} $

Extracts the submatrix of a matrix.