8#ifndef OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTNNITERATORRADIUS_HPP_
9#define OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTNNITERATORRADIUS_HPP_
11#include "Vector/map_vector.hpp"
50 while (ele_id >= cl.getNelements(cell_id))
55 if (NNc_id >= NNc.
size())
return;
57 cell_id = NNc.get(NNc_id) + cell;
75 :cl(cl),NNc_id(0),cell_id(NNc.
get(NNc_id) + cell),ele_id(0),NNc(NNc),cell(cell)
79 std::cerr <<
"Error " << __FILE__
":" << __LINE__ <<
" cell_id is negative, please check the the padding is chosen correctly." <<
80 "Remember, if you choose a radius that span N neighborhood cell-list, padding must be one" << std::endl;
93 if (NNc_id >= NNc.
size())
115 inline typename Cell::value_type &
get()
117 return cl.get(cell_id,ele_id);
Iterator for the neighborhood of the cell structures with free radius.
void selectValid()
Select non-empty cell.
CellNNIteratorRadius(size_t cell, const openfpm::vector< long int > &NNc, Cell &cl)
Cell NN iterator.
Cell::value_type & get()
Get the value of the cell.
bool isNext()
Check if there is the next element.
CellNNIteratorRadius & operator++()
take the next element
Implementation of 1-D std::vector like structure.