OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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.
 
grid_key_dx_iterator_hilbert< dim > & operator++ ()
 Get the next element.
 
bool isNext ()
 Check if there is the next element.
 
const grid_key_dx< dim > & get ()
 Get the actual key.
 
void reset ()
 Reset the iterator (it restart from the beginning)
 

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

◆ grid_key_dx_iterator_hilbert()

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

◆ get()

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.

◆ isNext()

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.

◆ operator++()

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.

◆ reset()

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.

Field Documentation

◆ gk

template<unsigned int dim>
grid_key_dx<dim> grid_key_dx_iterator_hilbert< dim >::gk
protected

Actual position in the grid.

Definition at line 50 of file grid_key_dx_iterator_hilbert.hpp.

◆ grid_base

template<unsigned int dim>
grid_sm<dim,void> grid_key_dx_iterator_hilbert< dim >::grid_base
private

Size of the hilbert grid in each dimension.

Definition at line 45 of file grid_key_dx_iterator_hilbert.hpp.

◆ hkey

template<unsigned int dim>
uint64_t grid_key_dx_iterator_hilbert< dim >::hkey = 0
private

Actual position.

Definition at line 39 of file grid_key_dx_iterator_hilbert.hpp.

◆ m

template<unsigned int dim>
size_t grid_key_dx_iterator_hilbert< dim >::m
private

Order of a hilbert curve.

Definition at line 42 of file grid_key_dx_iterator_hilbert.hpp.


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