A wrapper around the c-array to provide an STL like interface for iterators. More...
#include <mia/core/vector.hh>
Public Member Functions | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | make_unique () |
Vector< T > & | operator= (const Vector< T > &other) |
assignment operator More... | |
reference | operator[] (size_t i) |
const_reference | operator[] (size_t i) const |
size_type | size () const |
Vector (size_t n, bool clean=true) | |
*/ More... | |
Vector (const Vector< T > &other) | |
Vector (size_t n, T *init) | |
Vector (size_t n, const T *init) | |
A wrapper around the c-array to provide an STL like interface for iterators.
c-array envelope that supports some facilities of STL like vectors and that allows holding pre-allocated data. Handling of the optinal deleting of the array is done by a destructor template passed to the std::shared_ptr constructor
the | data type of the C-array |
Definition at line 74 of file core/vector.hh.
*/
Create a vector, the data is owned by this vector and will be deleted if the reference count reaches zero
n | |
clean | initialize vector to 0 |
Definition at line 92 of file core/vector.hh.
copy constructor, this is a shallow copy, i.e. the data is shared between the original and the copied vector
other |
Definition at line 105 of file core/vector.hh.
Constructor that creates the STL-like vector as an envelop around a C-array. The data will not be freed at destruction time.
n | size of input array |
init | allocated input data |
Definition at line 127 of file core/vector.hh.
Constructor that creates the STL-like vector as an envelop around a C-array. The data will not be freed at destruction time.
n | size of input array |
init | allocated input data |
Definition at line 140 of file core/vector.hh.
|
inline |
STL compatible iterator, begin of range
Definition at line 170 of file core/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW.
|
inline |
STL compatible const_iterator, begin of range
Definition at line 193 of file core/vector.hh.
|
inline |
STL compatible iterator, end of range
Definition at line 181 of file core/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW.
|
inline |
STL compatible const_iterator, end of range
Definition at line 200 of file core/vector.hh.
|
inline |
If the wrapped data is referenced more than once or is read-only, make a copy inside this object that is refereneces only once and writable.
Definition at line 217 of file core/vector.hh.
assignment operator
Definition at line 113 of file core/vector.hh.
|
inline |
Standard array access operator, read-write version
Definition at line 150 of file core/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW.
|
inline |
Standard array access operator, read-only version
Definition at line 162 of file core/vector.hh.
|
inline |
Definition at line 207 of file core/vector.hh.