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 () |
TCArrayWrapper< T > & | operator= (const TCArrayWrapper< T > &other) |
assignment operator More... | |
reference | operator[] (size_t i) |
const_reference | operator[] (size_t i) const |
size_type | size () const |
TCArrayWrapper (size_t n, bool clean=true) | |
*/ More... | |
TCArrayWrapper (const TCArrayWrapper< T > &other) | |
TCArrayWrapper (size_t n, T *init) | |
TCArrayWrapper (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 75 of file core/vector.hh.
|
inline |
*/
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 93 of file core/vector.hh.
|
inline |
copy constructor, this is a shallow copy, i.e. the data is shared between the original and the copied vector
other |
Definition at line 106 of file core/vector.hh.
|
inline |
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 128 of file core/vector.hh.
|
inline |
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 141 of file core/vector.hh.
|
inline |
STL compatible iterator, begin of range
Definition at line 171 of file core/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW.
Referenced by Transformation< C3DImage, C3DInterpolatorFactory >::get_energy_penalty().
|
inline |
STL compatible const_iterator, begin of range
Definition at line 194 of file core/vector.hh.
|
inline |
STL compatible iterator, end of range
Definition at line 182 of file core/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW.
Referenced by Transformation< C3DImage, C3DInterpolatorFactory >::get_energy_penalty().
|
inline |
STL compatible const_iterator, end of range
Definition at line 201 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 218 of file core/vector.hh.
|
inline |
assignment operator
Definition at line 114 of file core/vector.hh.
|
inline |
Standard array access operator, read-write version
Definition at line 151 of file core/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW.
|
inline |
Standard array access operator, read-only version
Definition at line 163 of file core/vector.hh.
|
inline |
Definition at line 208 of file core/vector.hh.