<T>LAPACK 0.1.2
C++ Template Linear Algebra PACKage
|
Concept for a matrix that can be sliced into submatrices. More...
#include <concepts.hpp>
Concept for a matrix that can be sliced into submatrices.
A sliceable matrix is a tlapack::concepts::Matrix that can be sliced into submatrices. A submatrix is a light-weight view of the original matrix. That means that the value of the entries should not be copied. It also means that any changes in the submatrix will automatically reflect a change in the original matrix, and vice-versa. Routines in <T>LAPACK use the following operations to slice a matrix:
slice(matrix_t&, pair_t&&, pair_t&&)
. The call slice(A, pair{i,j}, pair{k,l})
returns a (j-i)-by-(l-k) matrix whose type satisfy tlapack::concepts::Matrix.rows(matrix_t&, pair)
. The call rows(A, pair{i,j})
returns a (j-i)-by-n matrix whose type satisfy tlapack::concepts::Matrix.cols(matrix_t&, pair)
. The call cols(A, pair{i,j})
returns a m-by-(j-i) matrix whose type satisfy tlapack::concepts::Matrix.row(matrix_t&, idx_t)
. The call row(A, i)
returns a vector of length n whose type satisfy tlapack::concepts::Vector.col(matrix_t&, idx_t)
. The call col(A, i)
returns a vector of length m whose type satisfy tlapack::concepts::Vector.slice(matrix_t&,
idx_t, pair)
. The call slice(A, k, pair{i,j})
returns a vector of length (j-i) whose type satisfy tlapack::concepts::Vector.slice(matrix_t&, pair, idx_t)
. The call slice(A, pair{i,j}, k)
returns a vector of length (j-i) whose type satisfy tlapack::concepts::Vector.diag
(matrix_t&, idx_t = 0). The call diag(A, i)
returns a vector of length min(m,n)-abs(i)
whose type satisfy tlapack::concepts::Vector.slice
, rows
, cols
, row
, col
, and diag
are required to be callable from the namespace tlapack
.pair_t
is a std::pair
of two types satisfying tlapack::concepts::Index.matrix_t | Matrix type. |