|
|
| Matrix_view (T *data, std::size_t rows, std::size_t cols) |
| |
| | Matrix_view (Matrix< std::remove_const_t< T > > &m) |
| | Implicit conversion from mutable Matrix (works for both mutable and const view)
|
| |
| template<typename U = T, typename = std::enable_if_t<std::is_const_v<U>>> |
| | Matrix_view (const Matrix< std::remove_const_t< T > > &m) |
| | Implicit conversion from const Matrix (only for Matrix_view<const T>)
|
| |
|
std::size_t | rows () const |
| |
|
std::size_t | cols () const |
| |
|
std::size_t | size () const |
| |
|
bool | empty () const |
| |
|
T * | data () |
| |
|
const T * | data () const |
| |
| T * | operator[] (std::size_t i) |
| | [] index access (no range checking). [i] returns pointer to ith row
|
| |
|
const T * | operator[] (std::size_t i) const |
| |
| T & | at (std::size_t i, std::size_t j) |
| | at(i,j): element access with range checking
|
| |
|
T | at (std::size_t i, std::size_t j) const |
| |
|
const T & | atc (std::size_t i, std::size_t j) const |
| |
| T & | operator() (std::size_t i, std::size_t j) |
| | (i,j): same as at(i,j)
|
| |
|
T | operator() (std::size_t i, std::size_t j) const |
| |
|
auto | begin () |
| |
|
auto | end () |
| |
|
auto | cbegin () const |
| |
|
auto | cend () const |
| |
template<typename T>
class LinAlg::Matrix_view< T >
Provides a non-owning view onto a Matrix (read/write, but no resize)
Non-owning 2D view onto a Matrix. Supports element access but not resize. Use Matrix_view<const T> for a read-only view.