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

Generic row vector. More...

#include <lin/core/types/vector.hpp>

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

Public Types

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

Public Member Functions

constexpr RowVector (RowVector< T, N, MN > const &)=default
 
constexpr RowVector (RowVector< T, N, MN > &&)=default
 
constexpr RowVector< T, N, MN > & operator= (RowVector< T, N, MN > const &)=default
 
constexpr RowVector< T, N, MN > & operator= (RowVector< T, N, MN > &&)=default
 
constexpr RowVector (size_t n)
 Constructs a row vector with zero initialized elements are the requested length. More...
 
template<typename U >
constexpr RowVector (size_t n, std::initializer_list< U > const &list)
 Constructs a row vector with elements initialized from an initializer list and the requested length. More...
 
constexpr void resize (size_t n)
 Resizes the row vector's length. More...
 
- Public Member Functions inherited from lin::internal::Tensor< RowVector< T, N, MN > >
constexpr Tensor (Tensor< RowVector< T, N, MN > > const &)=default
 
constexpr Tensor (Tensor< RowVector< T, N, MN > > &&)=default
 
constexpr Tensor ()
 Constructs a new tensor with zeros initialized elements and the largest allowable dimensions. More...
 
constexpr Tensor (size_t r, size_t c)
 Constructs a tensor with zeros initialized elements and the requested dimensions. More...
 
constexpr Tensor (std::initializer_list< T > const &list)
 Constructs a tensor with elements initialized from an initializer list. More...
 
constexpr Tensor (size_t r, size_t c, std::initializer_list< T > const &list)
 Constructs a tensor with elements initialized from an initializer list and the requested dimensions. More...
 
constexpr Tensor (Stream< C > const &s)
 Constructs a tensor by copying in dimensions and elements from another tensor stream. More...
 
constexpr Tensor< RowVector< T, N, MN > > & operator= (Tensor< RowVector< T, N, MN > > const &)=default
 
constexpr Tensor< RowVector< T, N, MN > > & operator= (Tensor< RowVector< 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< RowVector< T, N, MN > >
constexpr Base (Base< RowVector< T, N, MN > > const &)=default
 
constexpr Base (Base< RowVector< T, N, MN > > &&)=default
 
constexpr Base< RowVector< T, N, MN > > & operator= (Base< RowVector< T, N, MN > > const &)=default
 
constexpr Base< RowVector< T, N, MN > > & operator= (Base< RowVector< 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< RowVector< T, N, MN > >
constexpr Mapping (Mapping< RowVector< T, N, MN > > const &)=default
 
constexpr Mapping (Mapping< RowVector< T, N, MN > > &&)=default
 
constexpr Mapping< RowVector< T, N, MN > > & operator= (Mapping< RowVector< T, N, MN > > const &)=default
 
constexpr Mapping< RowVector< T, N, MN > > & operator= (Mapping< RowVector< T, N, MN > > &&)=default
 
constexpr RowVector< T, N, MN > & operator= (std::initializer_list< T > const &list)
 Copy an initializer list's elements into the tensor's elements. More...
 
constexpr RowVector< 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< RowVector< T, N, MN > >
constexpr Stream (Stream< RowVector< T, N, MN > > const &)=default
 
constexpr Stream (Stream< RowVector< T, N, MN > > &&)=default
 
constexpr Stream< RowVector< T, N, MN > > & operator= (Stream< RowVector< T, N, MN > > const &)=default
 
constexpr Stream< RowVector< T, N, MN > > & operator= (Stream< RowVector< 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< RowVector< T, N, MN > >
constexpr Dimensions (Dimensions< RowVector< T, N, MN > > const &)=default
 
constexpr Dimensions (Dimensions< RowVector< T, N, MN > > &&)=default
 
constexpr Dimensions< RowVector< T, N, MN > > & operator= (Dimensions< RowVector< T, N, MN > > const &)=default
 
constexpr Dimensions< RowVector< T, N, MN > > & operator= (Dimensions< RowVector< 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< RowVector< T, N, MN > >
constexpr RowVector< T, N, MN > & derived ()
 
constexpr RowVector< T, N, MN >const & derived () const
 

Detailed Description

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

Generic row vector.

Template Parameters
TRow vector 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'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 internal::traits<RowVector<T, N, MN> > lin::RowVector< T, N, MN >::Traits

Traits information for this type.

See also
internal::traits
template<typename T , size_t N, size_t MN = N>
typedef internal::vector_traits<RowVector<T, N, MN> > lin::RowVector< 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::RowVector< T, N, MN >::RowVector ( size_t  n)
inline

Constructs a row vector with zero initialized elements are the requested length.

Parameters
nInitial length.

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

See also
internal::has_fixed_rows
internal::has_strictly_bounded_rows
template<typename T , size_t N, size_t MN = N>
template<typename U >
constexpr lin::RowVector< T, N, MN >::RowVector ( size_t  n,
std::initializer_list< U > const &  list 
)
inline

Constructs a row vector with elements initialized from an initializer list and the requested length.

Parameters
nInitial length.
listInitializer list.

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

The initializer list must also be assignable to the row vector.

See also
internal::Mapping::operator=(std::initializer_list<T> const &)

Member Function Documentation

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

Resizes the row vector's length.

Parameters
nLength.

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

See also
internal::has_fixed_cols
internal::has_strictly_bounded_cols

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