A not-owning view for accessing array witha 2D interface. More...
#include <View2D.h>

Public Types | |
| using | const_iterator = const pointer |
| using | const_reference = const value_type& |
| using | element_type = View<value_type,M> |
| using | iterator = pointer |
| using | pointer = value_type* |
| using | reference = value_type& |
| using | value_type = T |
Public Member Functions | |
| View2D (const View2D &) noexcept=default | |
| template<size_t N_ = N, size_t M_ = M, typename = std::enable_if_t<N_ != helpers::dynamic_extent && M_ != helpers::dynamic_extent>> | |
| View2D (pointer p) noexcept | |
| constructor for fixed size View2D | |
| template<size_t N_ = N, size_t M_ = M, typename = std::enable_if_t<N_ == helpers::dynamic_extent && M_ != helpers::dynamic_extent>> | |
| View2D (pointer p, size_t NN) noexcept | |
| constructor for a View2D with known second dimension at compile time | |
| template<size_t N_ = N, size_t M_ = M, typename = std::enable_if_t<N_ == helpers::dynamic_extent && M_ == helpers::dynamic_extent>> | |
| View2D (pointer p, size_t NN, size_t MM) noexcept | |
| constructor for a View2D with all dimension known at run time | |
| View2D (View2D &&) noexcept=default | |
| constexpr pointer | data () const noexcept |
| return the pointer to the data | |
| View2D & | operator= (const View2D &) noexcept=default |
| View2D & | operator= (View2D &&) noexcept=default |
| constexpr const element_type | operator[] (size_t i) const noexcept |
| returns the reference i-th element | |
| constexpr element_type | operator[] (size_t i) noexcept |
| returns the View to the i-th row | |
| constexpr size_t | size () const noexcept |
| returns the size of the first dimension | |
Private Attributes | |
| pointer | ptr_ |
| std::size_t | sizeM_ {M} |
| std::size_t | sizeN_ {N} |
A not-owning view for accessing array witha 2D interface.
The main idea is to have something that works like the mdspan from c++23.
Views are CHEAP to copy (pointer and an integer), so it is better to pass them as values
| using PLMD::View2D< T, N, M >::const_iterator = const pointer |
| using PLMD::View2D< T, N, M >::const_reference = const value_type& |
| using PLMD::View2D< T, N, M >::element_type = View<value_type,M> |
| using PLMD::View2D< T, N, M >::iterator = pointer |
| using PLMD::View2D< T, N, M >::pointer = value_type* |
| using PLMD::View2D< T, N, M >::reference = value_type& |
| using PLMD::View2D< T, N, M >::value_type = T |
|
inlineexplicitnoexcept |
constructor for fixed size View2D
|
inlinenoexcept |
constructor for a View2D with known second dimension at compile time
|
inlinenoexcept |
constructor for a View2D with all dimension known at run time
|
defaultnoexcept |
|
defaultnoexcept |
|
inlineconstexprnoexcept |
return the pointer to the data
|
defaultnoexcept |
|
defaultnoexcept |
|
inlineconstexprnoexcept |
returns the reference i-th element
|
inlineconstexprnoexcept |
returns the View to the i-th row
|
inlineconstexprnoexcept |
returns the size of the first dimension
|
private |
|
private |
|
private |
Hosted by GitHub
|
1.13.2
|