template<class T, int mode,
short_t d>
class gismo::gsGridIterator< T, mode, d, false >
Iterator over a Cartesian product of uniformly distributed numeric points inside a (hyper-)cube.
The iteration is done in the natural lexicographic order.
- mode = 0 : iteration over uniform samples in [a, b] gsGridIterator<T,CUBE> grid(a,b);
- mode = 1 : iteration over uniform samples on the boundary points [a, b] gsGridIterator<T,BDR> grid(a,b);
- mode = 2 : iteration over the vertices [a, b] gsGridIterator<T,VERTEX> grid(a,b);
A third argument, eg. gsGridIterator<T,CUBE,d> grid(a,b); specifies fixed size dimension d.
- Template Parameters
-
| T | type of the numeric coordinates of the index vector |
| d | statically known dimension, or dynamic dimension if d = -1 (default value) |
| mode | 0: all sample points in [a,b], 1: all points in [a,b), 2: vertices of cube [a,b] |
|
| | gsGridIterator (gsMatrix< T, d, 2 > const &ab, point_index const &np) |
| | Constructor using lower and upper limits.
|
| |
| | gsGridIterator (gsMatrix< T, d, 2 > const &ab, unsigned numPoints) |
| | Constructor using lower and upper limits.
|
| |
| | gsGridIterator (point const &a, point const &b, point_index const &np) |
| | Constructor using lower and upper limits.
|
| |
|
index_t | index (const index_t i) const |
| | Returns the i-th index of the current point.
|
| |
|
const integer_iterator & | index_iterator () const |
| | Returns a reference to the underlying integer lattice iterator.
|
| |
|
bool | isBoundary () const |
| | Returns true if the current point lies on a boundary.
|
| |
|
bool | isCeil (int i) const |
| | Returns true if the i-th coordinate has maximal value.
|
| |
|
bool | isFloor (int i) const |
| | Returns true if the i-th coordinate has minimal value.
|
| |
|
const point & | lower () const |
| | Returns the first point in the iteration.
|
| |
|
index_t | numPoints () const |
| | Returns the total number of points that are iterated.
|
| |
|
point_index | numPointsCwise () const |
| | Returns the total number of points per coordinate which are iterated.
|
| |
| const gsMatrix< T > | operator[] (const point_index &ti) const |
| | Returns the point corresponding to tensor index ti.
|
| |
|
void | reset () |
| | Resets the iterator, so that a new iteration over the points may start.
|
| |
| void | reset (point const &a, point const &b) |
| | Resets the iterator using new lower and upper limits.
|
| |
|
const point & | step () const |
| | Returns the coordinate-wise stepping between the samples.
|
| |
|
const point_index & | tensorIndex () const |
| | Returns the tensor index of the current point.
|
| |
|
const point & | upper () const |
| | Returns the last point in the iteration.
|
| |