[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
MultiArray Class Template Reference | ![]() |
---|
Main MultiArray
class containing the memory management.
More...
#include "vigra/multi_array.hxx"
Inheritance diagram for MultiArray:
Public Types | |
typedef A | allocator_type |
typedef MultiArrayView< N, T > | view_type |
typedef MultiArray< N, T, A > | matrix_type |
typedef view_type::value_type | value_type |
typedef view_type::pointer | pointer |
typedef view_type::const_pointer | const_pointer |
typedef view_type::reference | reference |
typedef view_type::const_reference | const_reference |
typedef view_type::size_type | size_type |
typedef view_type::difference_type | difference_type |
typedef detail::MultiIteratorChooser< UnstridedArrayTag >::template Traverser< N, T, T &, T * >::type | traverser |
typedef detail::MultiIteratorChooser< UnstridedArrayTag >::template Traverser< N, T, T const &, T const * >::type | const_traverser |
typedef T * | iterator |
typedef T * | const_iterator |
typedef view_type::SquaredNormType | SquaredNormType |
typedef view_type::NormType | NormType |
Public Methods | |
MultiArray () | |
MultiArray (allocator_type const &alloc) | |
MultiArray (const difference_type &shape, allocator_type const &alloc=allocator_type()) | |
MultiArray (const difference_type &shape, const_reference init, allocator_type const &alloc=allocator_type()) | |
MultiArray (const difference_type &shape, const_pointer init, allocator_type const &alloc=allocator_type()) | |
MultiArray (const MultiArray &rhs) | |
template<class U, class C> | MultiArray (const MultiArrayView< N, U, C > &rhs, allocator_type const &alloc=allocator_type()) |
MultiArray & | operator= (const MultiArray &rhs) |
template<class U, class C> MultiArray & | operator= (const MultiArrayView< N, U, C > &rhs) |
~MultiArray () | |
void | reshape (const difference_type &shape) |
void | reshape (const difference_type &shape, const_reference init) |
void | swap (MultiArray &other) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
allocator_type const & | allocator () const |
Protected Methods | |
void | allocate (pointer &ptr, std::size_t s, const_reference init) |
template<class U> void | allocate (pointer &ptr, std::size_t s, U const *init) |
template<class U, class C> void | allocate (pointer &ptr, MultiArrayView< N, U, C > const &init) |
void | deallocate (pointer &ptr, std::size_t s) |
Protected Attributes | |
allocator_type | m_alloc |
Detailed Description |
MultiArray
class containing the memory management.
This class inherits the interface of MultiArrayView, and implements the memory ownership. MultiArray's are always unstrided, striding them creates a MultiArrayView.
The template parameters are as follows
N: the array dimension T: the type of the array elements A: the allocator used for internal storage management (default: std::allocator<T>)
#include "vigra/multi_array.hxx"
Namespace: vigra
|
the allocator type used to allocate the memory Reimplemented in Matrix. |
|
sequential (random access) const iterator type |
|
const pointer type Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
const reference type (result of operator[] const) Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
traverser type to const data Reimplemented from MultiArrayView< N, T >. |
|
difference type (used for offsetting) Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
sequential (random access) iterator type |
|
the matrix type associated with this array. Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
the norm type (return type of norm(array)). Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
pointer type Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
reference type (result of operator[]) Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
size type Reimplemented from MultiArrayView< N, T >. |
|
the squared norm type (return type of squaredNorm(array)). Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
traverser type Reimplemented from MultiArrayView< N, T >. |
|
the array's value type Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
the view type associated with this array. Reimplemented from MultiArrayView< N, T >. Reimplemented in Matrix. |
|
default constructor |
|
construct with given allocator |
|
construct with given shape |
|
construct from shape with an initial value |
|
construct from shape and copy values from the given array |
|
copy constructor |
|
construct by copying from a MultiArrayView |
|
destructor |
|
allocate memory, write its address into the given pointer and initialize it by copying the data from the given MultiArrayView. |
|
allocate memory for s pixels, write its address into the given pointer and initialize the linearized pixels to the values of init. |
|
allocate memory for s pixels, write its address into the given pointer and initialize the pixels with init. |
|
get the allocator. |
|
sequential const iterator pointing to the first array element. |
|
sequential iterator pointing to the first array element. |
|
deallocate the memory (of length s) starting at the given address. |
|
sequential const iterator pointing beyond the last array element. |
|
sequential iterator pointing beyond the last array element. |
|
assignment from arbitrary MultiArrayView. |
|
assignment. |
|
change the shape, allocate new memory and initialize it with the given value. |
|
change the shape and allocate new memory. |
|
Swap the contents with another MultiArray. This is fast, because no data are copied, but only pointers and shapes swapped. Note: this operation invalidates all dependent objects (array views and iterators) |
|
the allocator used to allocate the memory |
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|