OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
Iterator_g_const Class Reference

Detailed Description

Iterate through the elements (i1,i2,....,in) with i1 ... in unsigned integers with the following constrain (i1>i2>......>in)

Definition at line 855 of file grid_sm.hpp.

#include <grid_sm.hpp>

Public Member Functions

size_t getDim ()
 Get the dimensionality of the iterator. More...
 
 Iterator_g_const (size_t n, size_t sz)
 Constructor. More...
 
Iterator_g_constoperator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
grid_key_dx_rget ()
 Return the actual key. More...
 

Private Attributes

size_t dim
 
size_t sz
 size of the grid (the grid is assumed a square so equal on each dimension)
 
grid_key_dx_r gk
 

Constructor & Destructor Documentation

Iterator_g_const::Iterator_g_const ( size_t  n,
size_t  sz 
)
inline

Constructor.

Parameters
nDimensionality (how many i1 ... in you have)
szSize of the grid on all dimensions range of the value i1 ... in can assume

Definition at line 885 of file grid_sm.hpp.

Member Function Documentation

grid_key_dx_r& Iterator_g_const::get ( )
inline

Return the actual key.

Return the actual key

Returns
The actual key that identify with the set of index

Definition at line 982 of file grid_sm.hpp.

size_t Iterator_g_const::getDim ( )
inline

Get the dimensionality of the iterator.

Get the dimensionality of the iterator

Definition at line 873 of file grid_sm.hpp.

bool Iterator_g_const::isNext ( )
inline

Check if there is the next element.

Check if there is the next element

Returns
true if there is the next, false otherwise

we did not reach the end of the grid

we reach the end of the grid

Definition at line 957 of file grid_sm.hpp.

Iterator_g_const& Iterator_g_const::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

increment the first index

check the overflow of all the index with exception of the last dimensionality

Definition at line 904 of file grid_sm.hpp.


The documentation for this class was generated from the following file: