lin
Public Types | Public Member Functions | List of all members
lin::internal::RowVectorView< T, N, MN > Class Template Reference

Generic row vector view. More...

#include <lin/views/vector_view.hpp>

Inheritance diagram for lin::internal::RowVectorView< T, N, MN >:
lin::internal::TensorView< RowVectorView< T, N, MN > > lin::internal::Base< RowVectorView< T, N, MN > > lin::internal::Mapping< RowVectorView< T, N, MN > > lin::internal::Dimensions< RowVectorView< T, N, MN > > lin::internal::Stream< RowVectorView< T, N, MN > >

Public Types

typedef traits< RowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
typedef vector_traits< RowVectorView< T, N, MN > > VectorTraits
 Vector traits information for this type. More...
 
- Public Types inherited from lin::internal::TensorView< RowVectorView< T, N, MN > >
typedef traits< RowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
- Public Types inherited from lin::internal::Base< RowVectorView< T, N, MN > >
typedef traits< RowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
- Public Types inherited from lin::internal::Mapping< RowVectorView< T, N, MN > >
typedef traits< RowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
- Public Types inherited from lin::internal::Stream< RowVectorView< T, N, MN > >
typedef traits< RowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 

Public Member Functions

constexpr RowVectorView (RowVectorView< T, N, MN > const &)=default
 
constexpr RowVectorView (RowVectorView< T, N, MN > &&)=default
 
constexpr RowVectorView< T, N, MN > & operator= (RowVectorView< T, N, MN > const &)=default
 
constexpr RowVectorView< T, N, MN > & operator= (RowVectorView< T, N, MN > &&)=default
 
constexpr RowVectorView (typename Traits::elem_t *elems, size_t n)
 Constructs a vector view with the provided backing array and requested length. More...
 
constexpr void resize (size_t n)
 Resizes the row vector view's length. More...
 
- Public Member Functions inherited from lin::internal::TensorView< RowVectorView< T, N, MN > >
constexpr TensorView (TensorView< RowVectorView< T, N, MN > > const &)=default
 
constexpr TensorView (TensorView< RowVectorView< T, N, MN > > &&)=default
 
constexpr TensorView (typename Traits::elem_t *elems)
 Constructs a new tensor tensor view with the provided backing array. More...
 
constexpr TensorView (typename Traits::elem_t *elems, size_t r, size_t c)
 Constructs a new tensor tensor view with the provided backing array and requested dimensions. More...
 
constexpr TensorView< RowVectorView< T, N, MN > > & operator= (TensorView< RowVectorView< T, N, MN > > const &)=default
 
constexpr TensorView< RowVectorView< T, N, MN > > & operator= (TensorView< RowVectorView< T, N, MN > > &&)=default
 
constexpr Traits::elem_tdata ()
 Retrives a pointer to the element backing array. More...
 
- Public Member Functions inherited from lin::internal::Base< RowVectorView< T, N, MN > >
constexpr Base (Base< RowVectorView< T, N, MN > > const &)=default
 
constexpr Base (Base< RowVectorView< T, N, MN > > &&)=default
 
constexpr Base< RowVectorView< T, N, MN > > & operator= (Base< RowVectorView< T, N, MN > > const &)=default
 
constexpr Base< RowVectorView< T, N, MN > > & operator= (Base< RowVectorView< T, N, MN > > &&)=default
 
constexpr Traits::elem_tdata ()
 Retrives a pointer to the element backing array. More...
 
constexpr Traits::elem_t const * data () const
 Retrives a constant pointer to the element backing array. More...
 
constexpr Traits::elem_toperator() (size_t i, size_t j)
 Provides read and write access to tensor elements. More...
 
constexpr Traits::elem_toperator() (size_t i)
 Provides read and write access to tensor elements. More...
 
- Public Member Functions inherited from lin::internal::Mapping< RowVectorView< T, N, MN > >
constexpr Mapping (Mapping< RowVectorView< T, N, MN > > const &)=default
 
constexpr Mapping (Mapping< RowVectorView< T, N, MN > > &&)=default
 
constexpr Mapping< RowVectorView< T, N, MN > > & operator= (Mapping< RowVectorView< T, N, MN > > const &)=default
 
constexpr Mapping< RowVectorView< T, N, MN > > & operator= (Mapping< RowVectorView< T, N, MN > > &&)=default
 
constexpr RowVectorView< T, N, MN > & operator= (std::initializer_list< T > const &list)
 Copy an initializer list's elements into the tensor's elements. More...
 
constexpr RowVectorView< T, N, MN > & operator= (Stream< C > const &s)
 Copy another tensor's elements into this tenosr's elements. More...
 
constexpr Traits::elem_toperator() (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_toperator() (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_toperator[] (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...
 
- Public Member Functions inherited from lin::internal::Stream< RowVectorView< T, N, MN > >
constexpr Stream (Stream< RowVectorView< T, N, MN > > const &)=default
 
constexpr Stream (Stream< RowVectorView< T, N, MN > > &&)=default
 
constexpr Stream< RowVectorView< T, N, MN > > & operator= (Stream< RowVectorView< T, N, MN > > const &)=default
 
constexpr Stream< RowVectorView< T, N, MN > > & operator= (Stream< RowVectorView< T, 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...
 
- Public Member Functions inherited from lin::internal::Dimensions< RowVectorView< T, N, MN > >
constexpr Dimensions (Dimensions< RowVectorView< T, N, MN > > const &)=default
 
constexpr Dimensions (Dimensions< RowVectorView< T, N, MN > > &&)=default
 
constexpr Dimensions< RowVectorView< T, N, MN > > & operator= (Dimensions< RowVectorView< T, N, MN > > const &)=default
 
constexpr Dimensions< RowVectorView< T, N, MN > > & operator= (Dimensions< RowVectorView< T, 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

- Protected Member Functions inherited from lin::internal::Stream< RowVectorView< T, N, MN > >
constexpr RowVectorView< T, N, MN > & derived ()
 
constexpr RowVectorView< T, N, MN >const & derived () const
 

Detailed Description

template<typename T, size_t N, size_t MN = N>
class lin::internal::RowVectorView< T, N, MN >

Generic row vector view.

Template Parameters
TRow vector view element type.
NNumber of elements at compile time (i.e. number of rows).
MNMaximum number of elements (i.e. maximum number of rows).

The template parameters specify the row vector views's traits. The traits must qualify this type as a row vector.

See also
internal::traits
internal::is_row_vector

Member Typedef Documentation

template<typename T , size_t N, size_t MN = N>
typedef traits<RowVectorView<T, N, MN> > lin::internal::RowVectorView< T, N, MN >::Traits

Traits information for this type.

See also
internal::traits
template<typename T , size_t N, size_t MN = N>
typedef vector_traits<RowVectorView<T, N, MN> > lin::internal::RowVectorView< T, N, MN >::VectorTraits

Vector traits information for this type.

See also
internal::vector_traits

Constructor & Destructor Documentation

template<typename T , size_t N, size_t MN = N>
constexpr lin::internal::RowVectorView< T, N, MN >::RowVectorView ( typename Traits::elem_t elems,
size_t  n 
)
inline

Constructs a vector view with the provided backing array and requested length.

Parameters
elemsElement backing array.
nInitial length.

The backing array should be at least as large as the maximum length of the row vector (see internal::traits information).

Lin assertion errors will be triggered if the requested length isn't possible given the row vector view's traits.

See also
internal::has_fixed_cols
internal::has_strictly_bounded_cols

Member Function Documentation

template<typename T , size_t N, size_t MN = N>
constexpr void lin::internal::RowVectorView< T, N, MN >::resize ( size_t  n)
inline

Resizes the row vector view's length.

Parameters
nLength.

Lin assertion errors will be triggered if the requested length isn't possible given the row vector view's traits.

See also
internal::has_fixed_cols
internal::has_strictly_bounded_cols

The documentation for this class was generated from the following file: