C2DTransformation::iterator_impl Class Referenceabstract

Base of the implementation of an iterator over the transformation domain This iterator takes care of iterating over the transformation range. X is the fastest changing index. Some methods are abstract and must be defined in derived classes by using the specific transformation model. More...

`#include <mia/2d/transform.hh>`

## Public Member Functions

void | advance (unsigned int delta)
| fast advance the position
virtual iterator_impl * | clone () const __attribute__((warn_unused_result))=0
const C2DBounds & | get_pos () const
const C2DBounds & | get_size () const
const C2DFVector & | get_value () const
void | increment ()
| increment the position
| iterator_impl ()
| iterator_impl (const C2DBounds &pos, const C2DBounds &size)
bool | operator== (const iterator_impl &other) const
void | print (std::ostream &os) const

## Detailed Description

Base of the implementation of an iterator over the transformation domain This iterator takes care of iterating over the transformation range. X is the fastest changing index. Some methods are abstract and must be defined in derived classes by using the specific transformation model.

Definition at line 80 of file 2d/transform.hh.

## Constructor & Destructor Documentation

## iterator_impl() [1/2]

C2DTransformation::iterator_impl::iterator_impl | ( |  | ) |

Referenced by clone(), and operator==().

## iterator_impl() [2/2]

C2DTransformation::iterator_impl::iterator_impl | ( | const C2DBounds & | pos,
|  | const C2DBounds & | size )

Constructor to initialize the iterator at a certain point

Parameters

  pos | current position of the iterator
  size | defines the grid of the domain of the iterator as \([pos.x, size.x-1] \times [pos.y, size.y-1]\)

## Member Function Documentation

## advance()

void C2DTransformation::iterator_impl::advance | ( | unsigned int | delta | ) |

fast advance the position

## clone()

virtual iterator_impl * C2DTransformation::iterator_impl::clone | ( |  | ) | const

pure virtual

Returns
  a dynamically allocated copy of the iterator

References iterator_impl().

## get_pos()

const C2DBounds & C2DTransformation::iterator_impl::get_pos | ( |  | ) | const

Returns
  the cutrrent grid position of the iterator

References get_pos().

Referenced by get_pos().

## get_size()

const C2DBounds & C2DTransformation::iterator_impl::get_size | ( |  | ) | const

Returns
  the domain size of the underlying transformation

References get_size().

Referenced by get_size().

## get_value()

const C2DFVector & C2DTransformation::iterator_impl::get_value | ( |  | ) | const

Returns
  the current value of the transformation iterated over

## increment()

void C2DTransformation::iterator_impl::increment | ( |  | ) |

increment the position

## operator==()

bool C2DTransformation::iterator_impl::operator== | ( | const iterator_impl & | other | ) | const

Compare the iterator to another one

Parameters

  other |

Returns
  true if the positions are equal or both are at the end of the range

Remarks
  no test is run whether both iterator belong to the same transformation

References iterator_impl().

## print()

void C2DTransformation::iterator_impl::print | ( | std::ostream & | os | ) | const

Print some information about the iteratorto an output stream, mostely used for debugging purpouses

Parameters

  os |

References print().

Referenced by print().

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

- 2d/transform.hh