OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
openfpm::vector_key_iterator_seq< lid > Class Template Reference

Vector iterator. More...

Detailed Description

template<typename lid>
class openfpm::vector_key_iterator_seq< lid >

Vector iterator.

Vector iterator over a predefined sequence

Definition at line 200 of file vector_map_iterator.hpp.

#include <vector_map_iterator.hpp>

Public Member Functions

 vector_key_iterator_seq (openfpm::vector< lid > &dp)
 Constructor require the sequence.
 
vector_key_iterator_seq< lid > & operator++ ()
 Get the next element.
 
void set (int d, size_t sz)
 Set the dimension.
 
bool isNext () const
 Check if there is the next element.
 
size_t get () const
 Get the actual key.
 

Protected Attributes

size_t gk
 Actual key.
 

Private Attributes

openfpm::vector< lid > & dp
 

Constructor & Destructor Documentation

◆ vector_key_iterator_seq()

template<typename lid >
openfpm::vector_key_iterator_seq< lid >::vector_key_iterator_seq ( openfpm::vector< lid > &  dp)
inline

Constructor require the sequence.

Parameters
dp

Definition at line 216 of file vector_map_iterator.hpp.

Member Function Documentation

◆ get()

template<typename lid >
size_t openfpm::vector_key_iterator_seq< lid >::get ( ) const
inline

Get the actual key.

Get the actual key

Returns
the actual key

Definition at line 277 of file vector_map_iterator.hpp.

◆ isNext()

template<typename lid >
bool openfpm::vector_key_iterator_seq< lid >::isNext ( ) const
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 257 of file vector_map_iterator.hpp.

◆ operator++()

template<typename lid >
vector_key_iterator_seq< lid > & openfpm::vector_key_iterator_seq< lid >::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

increment the first index

Definition at line 228 of file vector_map_iterator.hpp.

◆ set()

template<typename lid >
void openfpm::vector_key_iterator_seq< lid >::set ( int  d,
size_t  sz 
)
inline

Set the dimension.

Parameters
dis the dimension (IGNORED is by default 0)
szset the counter to sz

Definition at line 243 of file vector_map_iterator.hpp.

Field Documentation

◆ dp

template<typename lid >
openfpm::vector<lid>& openfpm::vector_key_iterator_seq< lid >::dp
private

Definition at line 202 of file vector_map_iterator.hpp.

◆ gk

template<typename lid >
size_t openfpm::vector_key_iterator_seq< lid >::gk
protected

Actual key.

Definition at line 207 of file vector_map_iterator.hpp.


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