[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]

details MultiIterator Class Template Reference VIGRA

A multi-dimensional hierarchical iterator to be used with vigra::MultiArrayView if it is not strided. More...

#include "vigra/multi_iterator.hxx"


Public Types

typedef MultiIteratorBase<
N >::template type< T, REFERENCE,
POINTER > 
base_type
typedef T value_type
typedef value_typereference
typedef const value_typeconst_reference
typedef value_typepointer
typedef const value_typeconst_pointer
typedef ptrdiff_t difference_type
typedef TinyVector< difference_type,
N > 
multi_difference_type
typedef base_type::next_type next_type
typedef multi_dimensional_traverser_tag iterator_category

Public Methods

 MultiIterator ()
 MultiIterator (pointer ptr, const difference_type *stride, const difference_type *shape)
MultiIterator operator+ (difference_type n) const
MultiIterator operator+ (multi_difference_type const &d) const
MultiIterator operator- (difference_type n) const
MultiIterator operator- (multi_difference_type const &d) const
template<unsigned int K> MultiIterator< K+1, T, REFERENCE,
POINTER > & 
dim ()


Detailed Description


template<unsigned int N, class T, class REFERENCE, class POINTER>
class vigra::MultiIterator< N, T, REFERENCE, POINTER >

A multi-dimensional hierarchical iterator to be used with vigra::MultiArrayView if it is not strided.

This class wraps the MultiIteratorBase in a template of arity two.

#include "vigra/multi_iterator.hxx"

Namespace: vigra


Member Typedef Documentation


typedef MultiIteratorBase<N>::template type<T, REFERENCE, POINTER> base_type

 

the type of the parent in the inheritance hierarchy.

Reimplemented in type.


typedef const value_type* const_pointer

 

const pointer type


typedef const value_type& const_reference

 

const reference type (result of operator[] const)


typedef ptrdiff_t difference_type

 

difference type (used for offsetting)

Reimplemented in type.


typedef multi_dimensional_traverser_tag iterator_category

 

the iterator tag (image traverser)

Reimplemented in type.


typedef TinyVector<difference_type, N> multi_difference_type

 

multi difference type (used for offsetting along all axes simultaneously)

Reimplemented in type.


typedef base_type::next_type next_type

 

the MultiIterator for the next lower dimension.

Reimplemented in type.


typedef value_type* pointer

 

pointer type

Reimplemented in type.


typedef value_type& reference

 

reference type (result of operator[])

Reimplemented in type.


typedef T value_type

 

the iterator's value type

Reimplemented in type.


Constructor & Destructor Documentation


MultiIterator   [inline]

 

default constructor.


MultiIterator pointer    ptr,
const difference_type   stride,
const difference_type   shape
[inline]

 

construct from pointer, strides (offset of a sample to the next) for every dimension, and the shape.


Member Function Documentation


MultiIterator<K+1, T, REFERENCE, POINTER>& dim   [inline]

 

Return the multi-iterator that operates on dimension K in order to manipulate this dimension directly. Usage:

            MultiIterator<3, int> i3 = ...;
                
            i3.dim<2>()++;  // increment outer dimension
            i3.dim<0>()++;  // increment inner dimension


MultiIterator operator+ multi_difference_type const &    d const [inline]

 

addition along all dimensions


MultiIterator operator+ difference_type    n const [inline]

 

addition within current dimension


MultiIterator operator- multi_difference_type const &    d const [inline]

 

subtraction along all dimensions


MultiIterator operator- difference_type    n const [inline]

 

subtraction within current dimension


The documentation for this class was generated from the following file:

© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
Cognitive Systems Group, University of Hamburg, Germany

html generated using doxygen and Python
VIGRA 1.2.0 (7 Aug 2003)