|
geomc 1.0
A c++ linear algebra template library
|
Iterator over the integer points in an N-dimensional grid. More...
#include <geomc/shape/GridIterator.h>
Public Types | |
| typedef PointType< T, N >::point_t | point_t |
| Type of coordinate to be iterated over. | |
Public Member Functions | |
| GridIterator (const point_t &lo, const point_t &hi) | |
| GridIterator (const Rect< T, N > &r) | |
| GridIterator (const Rect< T, N > &r, const point_t &p) | |
| GridIterator< T, N, Order > | begin () const |
| GridIterator< T, N, Order > | end () const |
Public Attributes | |
| point_t | pt |
| Current point. | |
| const Rect< T, N > | region |
| Region over which to iterate. | |
Static Public Attributes | |
| static constexpr ArrayOrder | order = Order |
| Array order (row-major or column-major) | |
Friends | |
| class | boost::iterator_core_access |
Iterator over the integer points in an N-dimensional grid.
| T | Type of coordinate (integer type recommended). |
| N | Dimension of rectangle to iterate over. |
| Order | Row- or column-major iteration. |
This class accepts an N-dimensional rectangular region to iterate over, and returns points on the unit-spaced grid within than region. Row- or column-major order may be selected with the ArrayOrder template parameter.
GridIterators support all the standard operators expected of a random-access iterator:
GridIterator<int,3> i = ... ; Vec<int,3> pt = *i; ++i; --i; i += 10; i1 - i2; // etc.
|
inline |
Construct an iterator over the region r pointing to the first grid point.
|
inline |
Construct an interator over the region r pointing at the point given by p.
| r | A region |
| p | A point inside r. |
|
inline |
Construct an iterator over the region bounded by the points lo and hi, pointing at the first cell.
| lo | Lower extreme of the region (inclusive). |
| hi | Upper extreme of the region (exclusive). |
|
inline |
|
inline |