OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
openfpm::vector_key_iterator_ele< p, vector_type > Class Template Reference

Vector iterator. More...

Detailed Description

template<unsigned int p, typename vector_type>
class openfpm::vector_key_iterator_ele< p, vector_type >

Vector iterator.

Definition at line 17 of file vector_map_iterator.hpp.

#include <vector_map_iterator.hpp>

Public Member Functions

 vector_key_iterator_ele (const vector_type &vect, size_t end, size_t start=0)
 Constructor require the size of the vector.
 
vector_key_iterator_eleoperator++ ()
 Get the next element.
 
void set (int d, size_t sz)
 Set the dimension.
 
bool isNext () const
 Check if there is the next element.
 
auto get () const -> decltype(vect.template get< p >(gk))
 Get the actual key.
 

Protected Attributes

size_t gk
 Actual key.
 

Private Attributes

const vector_typevect
 Linearized end element.
 
size_t end
 

Constructor & Destructor Documentation

◆ vector_key_iterator_ele()

template<unsigned int p, typename vector_type >
openfpm::vector_key_iterator_ele< p, vector_type >::vector_key_iterator_ele ( const vector_type vect,
size_t  end,
size_t  start = 0 
)
inline

Constructor require the size of the vector.

Parameters
endpoint
startstarting point

Definition at line 37 of file vector_map_iterator.hpp.

Member Function Documentation

◆ get()

template<unsigned int p, typename vector_type >
auto openfpm::vector_key_iterator_ele< p, vector_type >::get ( ) const -> decltype(vect.template get<p>(gk))
inline

Get the actual key.

Get the actual key

Returns
the actual key

Definition at line 98 of file vector_map_iterator.hpp.

◆ isNext()

template<unsigned int p, typename vector_type >
bool openfpm::vector_key_iterator_ele< p, vector_type >::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 78 of file vector_map_iterator.hpp.

◆ operator++()

template<unsigned int p, typename vector_type >
vector_key_iterator_ele & openfpm::vector_key_iterator_ele< p, vector_type >::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

increment the first index

Definition at line 49 of file vector_map_iterator.hpp.

◆ set()

template<unsigned int p, typename vector_type >
void openfpm::vector_key_iterator_ele< p, vector_type >::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 64 of file vector_map_iterator.hpp.

Field Documentation

◆ end

template<unsigned int p, typename vector_type >
size_t openfpm::vector_key_iterator_ele< p, vector_type >::end
private

Definition at line 22 of file vector_map_iterator.hpp.

◆ gk

template<unsigned int p, typename vector_type >
size_t openfpm::vector_key_iterator_ele< p, vector_type >::gk
protected

Actual key.

Definition at line 27 of file vector_map_iterator.hpp.

◆ vect

template<unsigned int p, typename vector_type >
const vector_type& openfpm::vector_key_iterator_ele< p, vector_type >::vect
private

Linearized end element.

Definition at line 20 of file vector_map_iterator.hpp.


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