OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
openfpm::vector_key_iterator Class Reference

Vector iterator. More...

Detailed Description

Vector iterator.

Definition at line 17 of file vector_map_iterator.hpp.

#include <vector_map_iterator.hpp>

Public Member Functions

 vector_key_iterator (size_t end, size_t start=0)
 Constructor require the size of the vector. More...
 
vector_key_iteratoroperator++ ()
 Get the next element. More...
 
void set (int d, size_t sz)
 Set the dimension. More...
 
bool isNext () const
 Check if there is the next element. More...
 
size_t get () const
 Get the actual key. More...
 

Protected Attributes

size_t gk
 Actual key.
 

Private Attributes

size_t end
 Linearized end element.
 

Constructor & Destructor Documentation

openfpm::vector_key_iterator::vector_key_iterator ( size_t  end,
size_t  start = 0 
)
inline

Constructor require the size of the vector.

Parameters
endpoint
startstarting point

Definition at line 35 of file vector_map_iterator.hpp.

Member Function Documentation

size_t openfpm::vector_key_iterator::get ( ) const
inline

Get the actual key.

Get the actual key

Returns
the actual key

Definition at line 96 of file vector_map_iterator.hpp.

bool openfpm::vector_key_iterator::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 76 of file vector_map_iterator.hpp.

vector_key_iterator& openfpm::vector_key_iterator::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

increment the first index

Definition at line 47 of file vector_map_iterator.hpp.

void openfpm::vector_key_iterator::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 62 of file vector_map_iterator.hpp.


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