Grid key class iterator, iterate through the grid element
dim | dimensionality of the grid |
Definition at line 27 of file grid_key_dx_iterator.hpp.
#include <grid_key_dx_iterator.hpp>
Public Member Functions | |
grid_key_dx_iterator () | |
Default constructor. More... | |
grid_key_dx_iterator (const grid_key_dx_iterator< dim > &g_it) | |
Constructor from a grid_key_dx_iterator<dim> More... | |
template<typename T > | |
grid_key_dx_iterator (const grid_sm< dim, T > &g) | |
Constructor require a grid_sm<dim,T> More... | |
grid_key_dx_iterator< dim > | operator= (const grid_key_dx_iterator< dim > &key_it) |
Constructor from another grid_key_dx_iterator. More... | |
grid_key_dx_iterator< dim > & | operator++ () |
Get the next element. More... | |
void | set (int d, size_t sz) |
Set the dimension. More... | |
bool | isNext () |
Check if there is the next element. More... | |
const grid_key_dx< dim > & | get () |
Get the actual key. More... | |
void | reinitialize (const grid_key_dx_iterator< dim > &key) |
Reinitialize the grid_key_dx_iterator. More... | |
void | reset () |
Reset the iterator (it restart from the beginning) More... | |
Protected Attributes | |
grid_key_dx< dim > | gk |
Private Member Functions | |
size_t | get_gk (size_t i) const |
return the index i of the gk key More... | |
Private Attributes | |
grid_sm< dim, void > | grid_base |
|
inline |
Default constructor.
Definition at line 62 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor from a grid_key_dx_iterator<dim>
g_it | grid_key_dx_iterator<dim> |
Initialize to 0 the index
Definition at line 73 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor require a grid_sm<dim,T>
g | info of the grid on which iterate |
Definition at line 92 of file grid_key_dx_iterator.hpp.
|
inline |
Get the actual key.
Get the actual key
Definition at line 197 of file grid_key_dx_iterator.hpp.
|
inlineprivate |
return the index i of the gk key
i | index to get |
Definition at line 45 of file grid_key_dx_iterator.hpp.
|
inline |
Check if there is the next element.
Check if there is the next element
we did not reach the end of the grid
we reach the end of the grid
Definition at line 177 of file grid_key_dx_iterator.hpp.
|
inline |
Get the next element.
increment the first index
check the overflow of all the index with exception of the last dimensionality
Definition at line 124 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor from another grid_key_dx_iterator.
key_it | grid_key_dx_iterator |
Initialize the index using key_it
Definition at line 106 of file grid_key_dx_iterator.hpp.
|
inline |
Reinitialize the grid_key_dx_iterator.
key | form |
Definition at line 207 of file grid_key_dx_iterator.hpp.
|
inline |
Reset the iterator (it restart from the beginning)
Initialize to 0 the index
Definition at line 216 of file grid_key_dx_iterator.hpp.
|
inline |
Set the dimension.
Set the dimension
d | is the dimension |
sz | set the counter to sz |
Definition at line 162 of file grid_key_dx_iterator.hpp.