ivutils
|
Iterator going through all points in the grid range corresponding to nst, nen. More...
#include <zgrid.h>
Public Member Functions | |
ZGridIt (const ZGridIt &other) | |
copy constructor | |
ZGridIt | operator- (const ZGridIt &other) const |
iterator difference | |
ZGridIt & | operator++ () |
index change order: iz, iy, ix In order to skip parts of Z-curve that are not in our iteration space we've implemented rewind algorithm. | |
ZGridIt & | operator+= (index_t incr) |
positive increment to an iterator | |
ZGridIt | shift (index_t *sh) const |
returns iterator with shifted grid indices | |
![]() | |
UniformGridIt () | |
default constructor constructs sequence end | |
UniformGridIt (const UniformGridIt &other) | |
copy constructor | |
index_t | operator- (const UniformGridIt &other) const |
iterator difference | |
UniformGridIt & | operator++ () |
Increment, index change order: iz, iy, ix. | |
template<class ind_t > | |
UniformGridIt & | increment (const ind_t &reorder) |
Increment with index change order according to reorder array. | |
UniformGridIt & | operator+= (index_t incr) |
positive increment to an iterator | |
bool | operator!= (const UniformGridIt &other) const |
complete test | |
UniformGridIt | shift (index_t *sh) const |
returns iterator with shifted grid indices | |
void | set (index_t i0, index_t i1, index_t i2) |
Explicitly sets indicies (use with care since it may break the iteration order) | |
index_t | get_normalized_ind (int i) const |
counts from the memory start | |
Protected Member Functions | |
ZGridIt (const parent_grid_t *sparent, int end_=0) | |
grid constructor, constructs sequence start | |
![]() | |
UniformGridIt (const parent_grid_t *sparent, int end_=0) | |
if this is end iterator | |
Additional Inherited Members | |
![]() | |
int | ie |
current grid indices | |
Iterator going through all points in the grid range corresponding to nst, nen.
Index change order is according to Z-curve
|
inline |
index change order: iz, iy, ix In order to skip parts of Z-curve that are not in our iteration space we've implemented rewind algorithm.
If after we increace lind iterator goes outside the upper boundaries, we know that next iterator would be only after we change the change coordinate again. So we find the last bit that was changed and increase the lind value enough for that bit to change again. For lower bound it safe to project lind on it.