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 More...
 
virtual iterator_implclone () const __attribute__((warn_unused_result))=0
 
const C2DBoundsget_pos () const
 
const C2DBoundsget_size () const
 
const C2DFVectorget_value () const
 
void increment ()
 increment the position More...
 
 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 79 of file 2d/transform.hh.

Constructor & Destructor Documentation

◆ iterator_impl() [1/2]

C2DTransformation::iterator_impl::iterator_impl ( )

◆ 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
poscurrent position of the iterator
sizedefines 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

◆ get_pos()

const C2DBounds& C2DTransformation::iterator_impl::get_pos ( ) const
Returns
the cutrrent grid position of the iterator

◆ get_size()

const C2DBounds& C2DTransformation::iterator_impl::get_size ( ) const
Returns
the domain size of the underlying transformation

◆ 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

◆ 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

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