lin
|
Generic row vector reference with read only access. More...
#include <lin/references/vector_stream_reference.hpp>
Public Types | |
typedef traits< RowVectorStreamReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
typedef vector_traits< RowVectorStreamReference< E, N, MN > > | VectorTraits |
Vector traits information for this type. More... | |
![]() | |
typedef traits< RowVectorStreamReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
![]() | |
typedef traits< RowVectorStreamReference< E, N, MN > > | Traits |
Traits information for this type. More... | |
Public Member Functions | |
constexpr | RowVectorStreamReference (RowVectorStreamReference< E, N, MN > const &)=default |
constexpr | RowVectorStreamReference (RowVectorStreamReference< E, N, MN > &&)=default |
constexpr RowVectorStreamReference< E, N, MN > & | operator= (RowVectorStreamReference< E, N, MN > const &)=default |
constexpr RowVectorStreamReference< E, N, MN > & | operator= (RowVectorStreamReference< E, N, MN > &&)=default |
constexpr | RowVectorStreamReference (Stream< E > const &stream, 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 | TensorStreamReference (TensorStreamReference< RowVectorStreamReference< E, N, MN >, E > const &)=default |
constexpr | TensorStreamReference (TensorStreamReference< RowVectorStreamReference< E, N, MN >, E > &&)=default |
constexpr | TensorStreamReference (Stream< E > const &stream, size_t i, size_t j) |
Constructs a new reference with the provided stream and anchor point. More... | |
constexpr | TensorStreamReference (Stream< E > const &stream, 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 TensorStreamReference< RowVectorStreamReference< E, N, MN >, E > & | operator= (TensorStreamReference< RowVectorStreamReference< E, N, MN >, E > const &)=default |
constexpr TensorStreamReference< RowVectorStreamReference< E, N, MN >, E > & | operator= (TensorStreamReference< RowVectorStreamReference< E, N, MN >, E > &&)=default |
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 | Stream (Stream< RowVectorStreamReference< E, N, MN > > const &)=default |
constexpr | Stream (Stream< RowVectorStreamReference< E, N, MN > > &&)=default |
constexpr Stream< RowVectorStreamReference< E, N, MN > > & | operator= (Stream< RowVectorStreamReference< E, N, MN > > const &)=default |
constexpr Stream< RowVectorStreamReference< E, N, MN > > & | operator= (Stream< RowVectorStreamReference< 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< RowVectorStreamReference< E, N, MN > > const &)=default |
constexpr | Dimensions (Dimensions< RowVectorStreamReference< E, N, MN > > &&)=default |
constexpr Dimensions< RowVectorStreamReference< E, N, MN > > & | operator= (Dimensions< RowVectorStreamReference< E, N, MN > > const &)=default |
constexpr Dimensions< RowVectorStreamReference< E, N, MN > > & | operator= (Dimensions< RowVectorStreamReference< 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 RowVectorStreamReference< E, N, MN > & | derived () |
constexpr RowVectorStreamReference< E, N, MN >const & | derived () const |
Generic row vector reference with read only 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<RowVectorStreamReference<E, N, MN> > lin::internal::RowVectorStreamReference< E, N, MN >::Traits |
Traits information for this type.
typedef vector_traits<RowVectorStreamReference<E, N, MN> > lin::internal::RowVectorStreamReference< 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.
stream | Underlying stream. |
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 stream.
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 stream.
Lin assertions errors will be triggered if the requested length isn't possible given the reference's traits.