File view.hpp¶
Typedefs
-
template<typename T>
class BaseView¶ - #include <view.hpp>
A view that provides access to values stored in a pre-allocated array.
- Template Parameters:
T – The type of the values, the view provides access to
Subclassed by const_iterator< T >, const_iterator< value_type >, iterator< value_type >, const_iterator< index_type >, iterator< index_type >, iterator< float32 >, const_iterator< float32 >, iterator< int32 >, const_iterator< int32 >, iterator< uint32 >, const_iterator< uint32 >, iterator< ScoreType >, const_iterator< ScoreType >, DenseMatrix< T >, View< T >
Public Functions
-
inline BaseView(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 explicit BaseView(T *array)¶
- Parameters:
array – A pointer to an array of template type
Tthat stores the values, the view should provide access to
-
inline BaseView(const BaseView<T> &other)¶
- Parameters:
other – A const reference to an object of type
Viewthat should be copied
-
inline BaseView(BaseView<T> &&other)¶
- Parameters:
other – A reference to an object of type
Viewthat should be moved
-
inline virtual ~BaseView()¶
-
inline value_type *release()¶
Releases the ownership of the array that stores the values, the view provides access to. As a result, the behavior of this view becomes undefined and it should not be used anymore. The caller is responsible for freeing the memory that is occupied by the array.
- Returns:
A pointer to the array that stores the values, the view provided access to
-
template<typename T>
class View : public BaseView<T>¶ - #include <view.hpp>
A view that provides random access, as well as access via iterators, to values stored in a pre-allocated array.
- Template Parameters:
T – The type of the values, the view provides access to
Subclassed by Allocator< View< T > >, Vector< uint32 >, Allocator< View >, ClearableViewDecorator< View >, IndexableViewDecorator< View >, Vector< T >
Public Types
Public Functions
-
inline View(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 explicit View(T *array)¶
- Parameters:
array – A pointer to an array of template type
Tthat stores the values, the view should provide access to
-
inline View(const View<T> &other)¶
- Parameters:
other – A const reference to an object of type
Viewthat should be copied
-
inline View(View<T> &&other)¶
- Parameters:
other – A reference to an object of type
Viewthat should be moved
-
inline virtual ~View() override¶
-
inline const_iterator cbegin() const¶
Returns a
const_iteratorto the beginning of the view.- Returns:
A
const_iteratorto the beginning
-
inline iterator begin()¶
Returns an
iteratorto the beginning of the view.- Returns:
An
iteratorto the beginning
-
template<typename View>
class Allocator : public View<T>¶ - #include <view.hpp>
Allocates the memory, a view provides access to.
- Template Parameters:
View – The type of the view
Subclassed by BitVectorAllocator< BitView >, BitVectorAllocator< View >, ResizableAllocator< View >
Public Functions
-
inline explicit Allocator(uint32 numElements, bool init = false)¶
- Parameters:
numElements – The number of elements in the view
init – True, if all elements in the view should be value-initialized, false otherwise
-
inline Allocator(const Allocator<View> &other)¶
- Parameters:
other – A reference to an object of type
Allocatorthat should be copied
-
inline Allocator(Allocator<View> &&other)¶
- Parameters:
other – A reference to an object of type
Allocatorthat should be moved
-
inline virtual ~Allocator() override¶
-
template<typename View>
class ResizableAllocator : public Allocator<View>¶ - #include <view.hpp>
Allocates the memory, a view provides access to, and allows to resize it afterwards.
- Template Parameters:
View – The type of the view
Public Functions
-
inline explicit ResizableAllocator(uint32 numElements, bool init = false)¶
- Parameters:
numElements – The number of elements in the view
init – True, if all elements in the view should be value-initialized, false otherwise
-
inline ResizableAllocator(const ResizableAllocator<View> &other)¶
- Parameters:
other – A reference to an object of type
ResizableAllocatorthat should be copied
-
inline ResizableAllocator(ResizableAllocator<View> &&other)¶
- Parameters:
other – A reference to an object of type
ResizableAllocatorthat should be moved
-
inline virtual ~ResizableAllocator() override¶
-
template<typename View>
class ViewDecorator¶ - #include <view.hpp>
A base class for all data structures that are backed by a view.
- Template Parameters:
View – The type of the view, the data structure is backed by
Subclassed by IndexableViewDecorator< ViewDecorator< Array > >, BitVectorDecorator< View >, MatrixDecorator< View >, VectorDecorator< View >
Public Functions
-
inline explicit ViewDecorator(View &&view)¶
- Parameters:
view – The view, the data structure should be backed by
-
inline virtual ~ViewDecorator()¶
-
template<typename View>
class IndexableViewDecorator : public View<T>¶ - #include <view.hpp>
Provides random access to the values stored in a view.
- Template Parameters:
View – The type of the view
Public Types
Public Functions
-
inline explicit IndexableViewDecorator(typename View::view_type &&view)¶
- Parameters:
view – The view, the view should be backed by
-
inline virtual ~IndexableViewDecorator() override¶
-
inline const_iterator cbegin() const¶
Returns a
const_iteratorto the beginning of the view.- Returns:
A
const_iteratorto the beginning
-
inline iterator begin()¶
Returns an
iteratorto the beginning of the view.- Returns:
An
iteratorto the beginning