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

Generic constant row vector view. More...

#include <lin/views/const_vector_view.hpp>

Inheritance diagram for lin::internal::ConstRowVectorView< T, N, MN >:
lin::internal::ConstTensorView< ConstRowVectorView< T, N, MN > > lin::internal::ConstBase< ConstRowVectorView< T, N, MN > > lin::internal::Stream< ConstRowVectorView< T, N, MN > > lin::internal::Dimensions< ConstRowVectorView< T, N, MN > >

Public Types

typedef traits< ConstRowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
typedef vector_traits< ConstRowVectorView< T, N, MN > > VectorTraits
 Vector traits information for this type. More...
 
- Public Types inherited from lin::internal::ConstTensorView< ConstRowVectorView< T, N, MN > >
typedef traits< ConstRowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
- Public Types inherited from lin::internal::ConstBase< ConstRowVectorView< T, N, MN > >
typedef traits< ConstRowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 
- Public Types inherited from lin::internal::Stream< ConstRowVectorView< T, N, MN > >
typedef traits< ConstRowVectorView< T, N, MN > > Traits
 Traits information for this type. More...
 

Public Member Functions

constexpr ConstRowVectorView (ConstRowVectorView< T, N, MN > const &)=default
 
constexpr ConstRowVectorView (ConstRowVectorView< T, N, MN > &&)=default
 
constexpr ConstRowVectorView< T, N, MN > & operator= (ConstRowVectorView< T, N, MN > const &)=default
 
constexpr ConstRowVectorView< T, N, MN > & operator= (ConstRowVectorView< T, N, MN > &&)=default
 
constexpr ConstRowVectorView (typename Traits::elem_t const *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::ConstTensorView< ConstRowVectorView< T, N, MN > >
constexpr ConstTensorView (ConstTensorView< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr ConstTensorView (ConstTensorView< ConstRowVectorView< T, N, MN > > &&)=default
 
constexpr ConstTensorView (typename Traits::elem_t const *elems)
 Constructs a new constant tensor tensor view with the provided backing array. More...
 
constexpr ConstTensorView (typename Traits::elem_t const *elems, size_t r, size_t c)
 Constructs a new constant tensor tensor view with the provided backing array and requested dimensions. More...
 
constexpr ConstTensorView< ConstRowVectorView< T, N, MN > > & operator= (ConstTensorView< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr ConstTensorView< ConstRowVectorView< T, N, MN > > & operator= (ConstTensorView< ConstRowVectorView< T, N, MN > > &&)=default
 
constexpr Traits::elem_t const * data () const
 Retrives a constant pointer to the element backing array. More...
 
- Public Member Functions inherited from lin::internal::ConstBase< ConstRowVectorView< T, N, MN > >
constexpr ConstBase (ConstBase< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr ConstBase (ConstBase< ConstRowVectorView< T, N, MN > > &&)=default
 
constexpr ConstBase< ConstRowVectorView< T, N, MN > > & operator= (ConstBase< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr ConstBase< ConstRowVectorView< T, N, MN > > & operator= (ConstBase< ConstRowVectorView< T, N, MN > > &&)=default
 
constexpr Traits::elem_t const * data () const
 Retrives a constant pointer to the element backing array. More...
 
constexpr Traits::elem_t const & operator() (size_t i, size_t j) const
 Provides read only access to tensor elements. More...
 
constexpr Traits::elem_t const & operator() (size_t i)
 Provides read only access to tensor elements. More...
 
- Public Member Functions inherited from lin::internal::Stream< ConstRowVectorView< T, N, MN > >
constexpr Stream (Stream< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr Stream (Stream< ConstRowVectorView< T, N, MN > > &&)=default
 
constexpr Stream< ConstRowVectorView< T, N, MN > > & operator= (Stream< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr Stream< ConstRowVectorView< T, N, MN > > & operator= (Stream< ConstRowVectorView< 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< ConstRowVectorView< T, N, MN > >
constexpr Dimensions (Dimensions< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr Dimensions (Dimensions< ConstRowVectorView< T, N, MN > > &&)=default
 
constexpr Dimensions< ConstRowVectorView< T, N, MN > > & operator= (Dimensions< ConstRowVectorView< T, N, MN > > const &)=default
 
constexpr Dimensions< ConstRowVectorView< T, N, MN > > & operator= (Dimensions< ConstRowVectorView< 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< ConstRowVectorView< T, N, MN > >
constexpr ConstRowVectorView< T, N, MN > & derived ()
 
constexpr ConstRowVectorView< T, N, MN >const & derived () const
 

Detailed Description

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

Generic constant row vector view.

Template Parameters
TConstant row 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<ConstRowVectorView<T, N, MN> > lin::internal::ConstRowVectorView< 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<ConstRowVectorView<T, N, MN> > lin::internal::ConstRowVectorView< 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::ConstRowVectorView< T, N, MN >::ConstRowVectorView ( typename Traits::elem_t const *  elems,
size_t  n 
)
inline

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

Parameters
elemsConstant element 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::ConstRowVectorView< 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: