Iterator on Coordinates.
More...
#include "Imagine/Common.h"
|
|
typedef int | difference_type |
| | Standard for iterator.
|
| |
|
typedef std::input_iterator_tag | iterator_category |
| | Standard for iterator.
|
| |
|
typedef Coords< dim > * | pointer |
| | Standard for iterator.
|
| |
|
typedef Coords< dim > & | reference |
| | Standard for iterator.
|
| |
|
typedef Coords< dim > | value_type |
| | Standard for iterator.
|
| |
template<int dim>
class Imagine::CoordsIterator< dim >
Iterator on Coords. Iterates over rectangular region. Used to iterate over a MultiArray while being aware of coordinates.
- Parameters
-
- Examples
- Common/test/test.cpp, and Images/test/test.cpp.
◆ CoordsIterator() [1/2]
Constructs a stopped iterator, useful to check end of iteration with operator!=.
CoordsIterator()
Empty constructor.
Definition Coords.h:105
◆ CoordsIterator() [2/2]
Constructs an iterator over a rectangular region from a to b
- Parameters
-
| a,b | limits of rectangular region |
Coordinates.
Definition Coords.h:16
◆ operator!=()
Inequality test
- Parameters
-
| it | iterator for comparision |
- Returns
- true if operator==() is false
if (it1!=it2) cout << "it1 is different from it2" << endl;
◆ operator*()
Dereference: coordinate position
- Returns
- position
◆ operator++() [1/2]
Pre-increment: advance to next position. Becomes stopped if end is reached
- Returns
- self reference
◆ operator++() [2/2]
Post-increment: advance to next position. Becomes stopped if end is reached
- Returns
- value before increment
cout << it++->x() << endl;
◆ operator->()
Member selection: pointer to coordinate position
- Returns
- pointer to position
cout << it++->x() << endl;
◆ operator=()
◆ operator==()
Equality test
- Parameters
-
| it | iterator for comparision |
- Returns
- true if
- both are stopped
- or both are non stopped and at same position
if (it1==it2) cout << "it1 equals it2" << endl;
The documentation for this class was generated from the following file:
- /home/pascal/Ponts/svn/ImagineQt/Imagine/Common/src/Imagine/Common/Coords.h