lin
|
Generic row vector reference with read and write access. More...
#include <lin/references/vector_mapping_reference.hpp>
Public Types | |
typedef traits< RowVectorMappingReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
typedef vector_traits< RowVectorMappingReference< E, N, MN > > | VectorTraits |
Vector traits information for this type. More... | |
![]() | |
typedef traits< RowVectorMappingReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
![]() | |
typedef traits< RowVectorMappingReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
![]() | |
typedef traits< RowVectorMappingReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
Public Member Functions | |
constexpr | RowVectorMappingReference (RowVectorMappingReference< E, N, MN > const &)=default |
constexpr | RowVectorMappingReference (RowVectorMappingReference< E, N, MN > &&)=default |
constexpr RowVectorMappingReference< E, N, MN > & | operator= (RowVectorMappingReference< E, N, MN > const &)=default |
constexpr RowVectorMappingReference< E, N, MN > & | operator= (RowVectorMappingReference< E, N, MN > &&)=default |
constexpr | RowVectorMappingReference (Mapping< E > &mapping, size_t i, size_t j, size_t n) |
Constructs a new row vector reference with the provided mapping, anchor point, and length. More... | |
![]() | |
constexpr | TensorMappingReference (TensorMappingReference< RowVectorMappingReference< E, N, MN >, E > const &)=default |
constexpr | TensorMappingReference (TensorMappingReference< RowVectorMappingReference< E, N, MN >, E > &&)=default |
constexpr | TensorMappingReference (Mapping< E > &mapping, size_t i, size_t j) |
Constructs a new reference with the provided mapping and anchor point. More... | |
constexpr | TensorMappingReference (Mapping< E > &mapping, size_t i, size_t j, size_t r, size_t c) |
Constructs a new reference with the provided mapping, anchor point, and dimensions. More... | |
constexpr TensorMappingReference< RowVectorMappingReference< E, N, MN >, E > & | operator= (TensorMappingReference< RowVectorMappingReference< E, N, MN >, E > const &)=default |
constexpr TensorMappingReference< RowVectorMappingReference< E, N, MN >, E > & | operator= (TensorMappingReference< RowVectorMappingReference< E, N, MN >, E > &&)=default |
constexpr Traits::elem_t & | operator() (size_t i, size_t j) |
Provides read and write access to tensor elements. More... | |
constexpr Traits::elem_t & | operator() (size_t i) |
Provides read and write access to tensor elements. More... | |
![]() | |
constexpr | Mapping (Mapping< RowVectorMappingReference< E, N, MN > > const &)=default |
constexpr | Mapping (Mapping< RowVectorMappingReference< E, N, MN > > &&)=default |
constexpr Mapping< RowVectorMappingReference< E, N, MN > > & | operator= (Mapping< RowVectorMappingReference< E, N, MN > > const &)=default |
constexpr Mapping< RowVectorMappingReference< E, N, MN > > & | operator= (Mapping< RowVectorMappingReference< E, N, MN > > &&)=default |
constexpr RowVectorMappingReference< E, N, MN > & | operator= (std::initializer_list< T > const &list) |
Copy an initializer list's elements into the tensor's elements. More... | |
constexpr RowVectorMappingReference< E, N, MN > & | operator= (Stream< C > const &s) |
Copy another tensor's elements into this tenosr's elements. More... | |
constexpr Traits::elem_t & | operator() (size_t i, size_t j) |
Provides read and write access to tensor elements. More... | |
constexpr Traits::elem_t | operator() (size_t i, size_t j) const |
Provides read only access to tensor elements. More... | |
constexpr Traits::elem_t & | operator() (size_t i) |
Provides read and write access to tensor elements. More... | |
constexpr Traits::elem_t | operator() (size_t i) const |
Provides read only access to tensor elements. More... | |
constexpr Traits::elem_t & | operator[] (size_t i) |
Provides read and write access to tensor elements. More... | |
constexpr Traits::elem_t | operator[] (size_t i) const |
Provides read only access to tensor elements. More... | |
![]() | |
constexpr | Stream (Stream< RowVectorMappingReference< E, N, MN > > const &)=default |
constexpr | Stream (Stream< RowVectorMappingReference< E, N, MN > > &&)=default |
constexpr Stream< RowVectorMappingReference< E, N, MN > > & | operator= (Stream< RowVectorMappingReference< E, N, MN > > const &)=default |
constexpr Stream< RowVectorMappingReference< E, N, MN > > & | operator= (Stream< RowVectorMappingReference< E, N, MN > > &&)=default |
constexpr size_t | rows () const |
constexpr size_t | cols () const |
constexpr size_t | size () const |
constexpr Traits::elem_t | operator() (size_t i, size_t j) const |
Provides read only access to tensor elements. More... | |
constexpr Traits::elem_t | operator() (size_t i) const |
Provides read only access to tensor elements. More... | |
constexpr Traits::elem_t | operator[] (size_t i) const |
Provides read only access to tensor elements. More... | |
constexpr Traits::eval_t | eval () const |
Forces evaluation of this stream to a value backed type. More... | |
![]() | |
constexpr | Dimensions (Dimensions< RowVectorMappingReference< E, N, MN > > const &)=default |
constexpr | Dimensions (Dimensions< RowVectorMappingReference< E, N, MN > > &&)=default |
constexpr Dimensions< RowVectorMappingReference< E, N, MN > > & | operator= (Dimensions< RowVectorMappingReference< E, N, MN > > const &)=default |
constexpr Dimensions< RowVectorMappingReference< E, N, MN > > & | operator= (Dimensions< RowVectorMappingReference< E, N, MN > > &&)=default |
constexpr size_t | rows () const |
constexpr size_t | cols () const |
constexpr void | resize (size_t r, size_t c) |
Resizes a tensor's dimensions. More... | |
Additional Inherited Members | |
![]() | |
constexpr RowVectorMappingReference< E, N, MN > & | derived () |
constexpr RowVectorMappingReference< E, N, MN >const & | derived () const |
Generic row vector reference with read and write access.
E | Underlying referenced type. |
N | Length at compile time. |
MN | Maximum length at compile time. |
The template parameters specify the reference's traits. The traits must qualify the type as a row vector.
It's important to note, if the underlying type goes out of scope the reference is invalidated.
typedef traits<RowVectorMappingReference<E, N, MN> > lin::internal::RowVectorMappingReference< E, N, MN >::Traits |
Traits information for this type.
typedef vector_traits<RowVectorMappingReference<E, N, MN> > lin::internal::RowVectorMappingReference< E, N, MN >::VectorTraits |
Vector traits information for this type.
|
inline |
Constructs a new row vector reference with the provided mapping, anchor point, and length.
mapping | Underlying mapping. |
i | Anchor point row index. |
j | Anchor point column index. |
n | Reference length. |
The anchor point maps the tops left corner of the reference to an element in the underlying mapping.
The reference row vector's traits must define a type that fits within the provided mapping given the anchor point. If this is not the case, lin assertion errors will be triggered.
The anchor points specifies where the top left corner of the reference maps to in the underlying mapping.
Lin assertions errors will be triggered if the requested length isn't possible given the reference's traits.