7 #ifndef LIN_VIEWS_VECTOR_VIEW_HPP_ 8 #define LIN_VIEWS_VECTOR_VIEW_HPP_ 10 #include "../core.hpp" 30 template <
typename T,
size_t N,
size_t MN = N>
33 "Invalid VectorView<...> parameters");
84 :
TensorView<VectorView<T, N, MN>>(elems, n, 1) { }
115 template <
typename T,
size_t N,
size_t MN = N>
118 "Invalid RowVectorView<...> parameters");
169 :
TensorView<RowVectorView<T, N, MN>>(elems, 1, n) { }
186 template <
typename T,
size_t N,
size_t MN>
191 template <
typename T,
size_t N,
size_t MN>
193 static constexpr
size_t rows = N;
194 static constexpr
size_t cols = 1;
195 static constexpr
size_t max_rows = MN;
196 static constexpr
size_t max_cols = 1;
199 template <
typename T,
size_t N,
size_t MN>
204 template <
typename T,
size_t N,
size_t MN>
206 static constexpr
size_t rows = 1;
207 static constexpr
size_t cols = N;
208 static constexpr
size_t max_rows = 1;
209 static constexpr
size_t max_cols = MN;
Collection of compile time information describing a tensor type which is deemed a vector...
Definition: vector.hpp:103
traits< RowVectorView< T, N, MN > > Traits
Traits information for this type.
Definition: vector_view.hpp:118
constexpr size_t size() const
Definition: stream.hpp:90
Generic vector view.
Definition: vector_view.hpp:31
Provides a tensor type's element type.
Definition: tensor.hpp:28
constexpr size_t cols() const
Definition: dimensions.hpp:60
Collection of compile time information about a specific tensor class.
Definition: tensor.hpp:75
constexpr VectorView< T, N, MN > & derived()
Definition: stream.hpp:57
constexpr size_t rows() const
Definition: dimensions.hpp:56
constexpr void resize(size_t n)
Resizes the row vector view's length.
Definition: vector_view.hpp:181
Member pointer backed tensor.
Definition: tensor_view.hpp:31
constexpr Traits::elem_t * data()
Retrives a pointer to the element backing array.
Definition: tensor_view.hpp:113
constexpr VectorView(typename Traits::elem_t *elems, size_t n)
Constructs a vector view with the provided backing array and requested length.
Definition: vector_view.hpp:83
Generic row vector view.
Definition: vector_view.hpp:116
traits< VectorView< T, N, MN > > Traits
Traits information for this type.
Definition: vector_view.hpp:33
vector_traits< RowVectorView< T, N, MN > > VectorTraits
Vector traits information for this type.
Definition: vector_view.hpp:131
Tests if a tensor type is a column vector.
Definition: vector.hpp:54
vector_traits< VectorView< T, N, MN > > VectorTraits
Vector traits information for this type.
Definition: vector_view.hpp:46
_elem_t< C > elem_t
Tensor's element type.
Definition: tensor.hpp:81
constexpr void resize(size_t n)
Resizes the vector view's length.
Definition: vector_view.hpp:96
Definition: config.hpp:27
Tests if a tensor type is a row vector.
Definition: vector.hpp:33
constexpr RowVectorView(typename Traits::elem_t *elems, size_t n)
Constructs a vector view with the provided backing array and requested length.
Definition: vector_view.hpp:168
Provides a specific tensor type's compile time dimensions.
Definition: tensor.hpp:60
constexpr Traits::eval_t eval() const
Forces evaluation of this stream to a value backed type.
Definition: stream.hpp:157