OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
grid_key_dx_iterator_hilbert< dim > Class Template Reference

Detailed Description

template<unsigned int dim>
class grid_key_dx_iterator_hilbert< dim >

Definition at line 30 of file grid_key_dx_iterator_hilbert.hpp.

Public Member Functions

 grid_key_dx_iterator_hilbert (int32_t m)
 Constructor. More...
 
grid_key_dx_iterator_hilbert
< dim > & 
operator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
const grid_key_dx< dim > & get ()
 Get the actual key. More...
 
void reset ()
 Reset the iterator (it restart from the beginning) More...
 

Protected Attributes

grid_key_dx< dim > gk
 Actual position in the grid.
 

Private Attributes

uint64_t hkey = 0
 Actual position.
 
size_t m
 Order of a hilbert curve.
 
grid_sm< dim, void > grid_base
 Size of the hilbert grid in each dimension.
 

Constructor & Destructor Documentation

template<unsigned int dim>
grid_key_dx_iterator_hilbert< dim >::grid_key_dx_iterator_hilbert ( int32_t  m)
inline

Constructor.

m is the order of the hilber curve m=2 produce an hilber curve passing 2^(2) point in each direction so 4x4 points in 2D 4x4x4 in 3D

Parameters
morder of the hilber curve

Definition at line 62 of file grid_key_dx_iterator_hilbert.hpp.

Member Function Documentation

template<unsigned int dim>
const grid_key_dx<dim>& grid_key_dx_iterator_hilbert< dim >::get ( )
inline

Get the actual key.

Get the actual key

Returns
the actual key

Definition at line 137 of file grid_key_dx_iterator_hilbert.hpp.

template<unsigned int dim>
bool grid_key_dx_iterator_hilbert< dim >::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 117 of file grid_key_dx_iterator_hilbert.hpp.

template<unsigned int dim>
grid_key_dx_iterator_hilbert<dim>& grid_key_dx_iterator_hilbert< dim >::operator++ ( )
inline

Get the next element.

Returns
the next grid_key

Definition at line 89 of file grid_key_dx_iterator_hilbert.hpp.

template<unsigned int dim>
void grid_key_dx_iterator_hilbert< dim >::reset ( )
inline

Reset the iterator (it restart from the beginning)

Initialize to 0 the index

Definition at line 146 of file grid_key_dx_iterator_hilbert.hpp.


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