File view_vector.hpp¶
Typedefs
-
template<typename T>
class Vector : public View<T>¶ - #include <view_vector.hpp>
A one-dimensional view that provides access to values stored in a pre-allocated array of a specific size.
- Template Parameters:
T – The type of the values, the view provides access to
Subclassed by Allocator< Vector< T > >, IndexableViewDecorator< Vector >, BinaryDokVectorAllocator< Vector >, BinnedVectorDecorator< Vector >, IterableIndexedVectorDecorator< Vector >, ResizableVectorDecorator< Vector >
Public Functions
-
inline Vector(T *array, std::initializer_list<uint32> dimensions)¶
- Parameters:
array – A pointer to an array of template type
Tthat stores the values, the view should provide access todimensions – The number of elements in each dimension of the view
-
inline Vector(T *array, uint32 numElements)¶
- Parameters:
array – A pointer to an array of template type
Tthat stores the values, the view should provide access tonumElements – The number of elements in the view
-
inline Vector(const Vector<T> &other)¶
- Parameters:
other – A const reference to an object of type
Vectorthat should be copied
-
inline Vector(Vector<T> &&other)¶
- Parameters:
other – A reference to an object of type
Vectorthat should be moved
-
inline virtual ~Vector() override¶
-
inline View<T>::const_iterator cend() const¶
Returns a
const_iteratorto the end of the vector.- Returns:
A
const_iteratorto the end
-
inline View<T>::iterator end()¶
Returns an
iteratorto the end of the vector.- Returns:
An
iteratorto the end
-
inline void clear()¶
Sets all values stored in the view to zero.
-
template<typename View>
class VectorDecorator : public ViewDecorator<View>¶ - #include <view_vector.hpp>
A vector that is backed by a one-dimensional view of a specific size.
- Template Parameters:
View – The type of view, the vector is backed by
-
template<typename Vector>
class IterableVectorDecorator : public IndexableViewDecorator<Vector>¶ - #include <view_vector.hpp>
Provides access via iterators to the values stored in a vector.
- Template Parameters:
Vector – The type of the vector
Public Functions
-
inline explicit IterableVectorDecorator(typename Vector::view_type &&view)¶
- Parameters:
view – The view, the vector should be backed by
-
inline virtual ~IterableVectorDecorator() override¶
-
inline IndexableViewDecorator<Vector>::const_iterator cend() const¶
Returns a
const_iteratorto the end of the vector.- Returns:
A
const_iteratorto the end
-
inline IndexableViewDecorator<Vector>::iterator end()¶
Returns an
iteratorto the end of the vector.- Returns:
An
iteratorto the end