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

| StridedMultiIterator Class Template Reference |
--- | --- | ---

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

`#include "vigra/multi_iterator.hxx"`

## Public Types
typedef StridedMultiIteratorBase< N >::template type< T, REFERENCE, POINTER > | base_type
typedef T | value_type
typedef REFERENCE | reference
typedef const value_type & | const_reference
typedef POINTER | pointer
typedef const value_type * | const_pointer
typedef ptrdiff_t | difference_type
typedef TinyVector< difference_type, N > | multi_difference_type
typedef base_type::next_type | next_type
typedef StridedMultiIterator< 1, T, REFERENCE, POINTER > | iterator
typedef base_type::iterator_category | iterator_category
## Public Methods
| StridedMultiIterator ()
| StridedMultiIterator (pointer ptr, const difference_type *stride, const difference_type *shape)
StridedMultiIterator | operator+ (difference_type n) const
StridedMultiIterator | operator+ (multi_difference_type const &d) const
difference_type | operator- (StridedMultiIterator const &d) const
StridedMultiIterator | operator- (difference_type n) const
StridedMultiIterator | operator- (multi_difference_type const &d) const
template<unsigned int K> StridedMultiIterator< K+1, T, REFERENCE, POINTER > & | dim ()

## Detailed Description

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

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

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

#include "vigra/multi_iterator.hxx"

Namespace: vigra

## Member Typedef Documentation

typedef StridedMultiIteratorBase< 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 Reimplemented in type.

typedef const value_type& const_reference

| const reference type (result of operator[] const) Reimplemented in type.

typedef ptrdiff_t difference_type

| difference type (used for offsetting) Reimplemented in type.

typedef StridedMultiIterator<1, T, REFERENCE, POINTER> iterator

| the 1-dimensional iterator for this iterator hierarchy (result of iteratorForDimension()). Reimplemented in type.

typedef base_type::iterator_category 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 StridedMultiIterator for the next lower dimension. Reimplemented in type.

typedef POINTER pointer

| pointer type Reimplemented in type.

typedef REFERENCE reference

| reference type (result of operator[]) Reimplemented in type.

typedef T value_type

| the iterator's value type Reimplemented in type.

## Constructor & Destructor Documentation

StridedMultiIterator | ( |  | ) | `[inline]`

| default constructor.

StridedMultiIterator | ( | 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

StridedMultiIterator<K+1, T, REFERENCE, POINTER>& dim | ( |  | ) | `[inline]`

| Return the multi-iterator that operates on dimension K in order to manipulate this dimension directly. Usage:
                StridedMultiIterator<3, int> i3 = ...;

                i3.template dim<2>()++;  // increment outer dimension
                i3.template dim<0>()++;  // increment inner dimension
For convenience, the same functionality is also available as `dim0()`, `dim1()` etc. up to `dim4()`:
                StridedMultiIterator<3, int> i3 = ...;

                i3.dim2()++;  // increment outer dimension
                i3.dim0()++;  // increment inner dimension

StridedMultiIterator operator+ | ( | multi_difference_type const & | d | ) | const`[inline]`

| addition along all dimensions

StridedMultiIterator operator+ | ( | difference_type | n | ) | const`[inline]`

| addition within current dimension

StridedMultiIterator operator- | ( | multi_difference_type const & | d | ) | const`[inline]`

| subtraction along all dimensions

StridedMultiIterator operator- | ( | difference_type | n | ) | const`[inline]`

| subtraction within current dimension

difference_type operator- | ( | StridedMultiIterator< N, T, REFERENCE, POINTER > const & | d | ) | const`[inline]`

| difference of two iterators in the current dimension. The result of this operation is undefined if the iterator doesn't point to element 0 in all dimensions below its current dimension.

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

- vigra/multi_iterator.hxx

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.3.2 (27 Jan 2005)