<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
SliceableMatrix Interface Reference

Concept for a matrix that can be sliced into submatrices. More...

#include <concepts.hpp>

Detailed Description

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:

  • Submatrix view A(i:j,k:l) of a m-by-n matrix A(0:m,0:n), where 0 <= i <= j <= m and 0 <= k <= l <= n, using the function 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.
  • View of rows i to j, excluding j, of a m-by-n matrix A(0:m,0:n), where 0 <= i <= j <= m, using the function rows(matrix_t&, pair). The call rows(A, pair{i,j}) returns a (j-i)-by-n matrix whose type satisfy tlapack::concepts::Matrix.
  • View of columns i to j, excluding j, of a m-by-n matrix A(0:m,0:n), where 0 <= i <= j <= n, using the function cols(matrix_t&, pair). The call cols(A, pair{i,j}) returns a m-by-(j-i) matrix whose type satisfy tlapack::concepts::Matrix.
  • View of row i of a m-by-n matrix A(0:m,0:n), where 0 <= i < m, using the function row(matrix_t&, idx_t). The call row(A, i) returns a vector of length n whose type satisfy tlapack::concepts::Vector.
  • View of column i of a m-by-n matrix A(0:m,0:n), where 0 <= i < n, using the function col(matrix_t&, idx_t). The call col(A, i) returns a vector of length m whose type satisfy tlapack::concepts::Vector.
  • View of entries i to j, excluding j, of row k of a m-by-n matrix, where 0 <= i <= j <= n and 0 <= k < m, using the function 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.
  • View of entries i to j, excluding j, of column k of a m-by-n matrix, where 0 <= i <= j <= m and 0 <= k < n, using the function 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.
  • View of the i-th diagonal of a m-by-n matrix A(0:m,0:n), where -m < i < n, using the function 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.
Note
The functions 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.
Template Parameters
matrix_tMatrix type.

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