MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::mat::view::map_view< Matrix > Class Template Reference

Non-owning view with index remapping via permutation vectors. More...

#include <map_view.hpp>

Public Types

using value_type = typename Matrix::value_type
using size_type = typename Matrix::size_type
using const_reference = value_type
using reference = value_type

Public Member Functions

 map_view (const Matrix &m, const std::vector< size_type > &row_map, const std::vector< size_type > &col_map)
value_type operator() (size_type r, size_type c) const
size_type num_rows () const
size_type num_cols () const
size_type size () const
const Matrix & base () const

Detailed Description

template<typename Matrix>
class mtl::mat::view::map_view< Matrix >

Non-owning view with index remapping via permutation vectors.

Every map entry must index the matrix, checked once at construction in every build (#826); an entry may repeat. Element access (r, c) is checked when bounds_checking is on, as dense2D's is.

Member Typedef Documentation

◆ const_reference

template<typename Matrix>
using mtl::mat::view::map_view< Matrix >::const_reference = value_type

◆ reference

template<typename Matrix>
using mtl::mat::view::map_view< Matrix >::reference = value_type

◆ size_type

template<typename Matrix>
using mtl::mat::view::map_view< Matrix >::size_type = typename Matrix::size_type

◆ value_type

template<typename Matrix>
using mtl::mat::view::map_view< Matrix >::value_type = typename Matrix::value_type

Constructor & Destructor Documentation

◆ map_view()

template<typename Matrix>
mtl::mat::view::map_view< Matrix >::map_view ( const Matrix & m,
const std::vector< size_type > & row_map,
const std::vector< size_type > & col_map )
inline

Member Function Documentation

◆ base()

template<typename Matrix>
const Matrix & mtl::mat::view::map_view< Matrix >::base ( ) const
inline

◆ num_cols()

template<typename Matrix>
size_type mtl::mat::view::map_view< Matrix >::num_cols ( ) const
inline

◆ num_rows()

template<typename Matrix>
size_type mtl::mat::view::map_view< Matrix >::num_rows ( ) const
inline

◆ operator()()

template<typename Matrix>
value_type mtl::mat::view::map_view< Matrix >::operator() ( size_type r,
size_type c ) const
inline

◆ size()

template<typename Matrix>
size_type mtl::mat::view::map_view< Matrix >::size ( ) const
inline

The documentation for this class was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/mat/view/map_view.hpp