AutoPas  3.0.0
Loading...
Searching...
No Matches
Functions
autopas::containerIteratorUtils Namespace Reference

Helper functions related to iterators which should not be connected to the ContainerIterator class. More...

Functions

template<bool regionIter, class Particle_T , class Arr >
bool particleFulfillsIteratorRequirements (const Particle_T &p, IteratorBehavior behavior, const Arr &regionMin, const Arr &regionMax)
 Indicates whether the particle has the correct ownership state and if this is a region iterator is in the region.
 

Detailed Description

Helper functions related to iterators which should not be connected to the ContainerIterator class.

Function Documentation

◆ particleFulfillsIteratorRequirements()

template<bool regionIter, class Particle_T , class Arr >
bool autopas::containerIteratorUtils::particleFulfillsIteratorRequirements ( const Particle_T &  p,
IteratorBehavior  behavior,
const Arr &  regionMin,
const Arr &  regionMax 
)

Indicates whether the particle has the correct ownership state and if this is a region iterator is in the region.

Template Parameters
regionIter
Particle_T
ArrTemplate because if this is a region iterator ContainerIterator will pass an empty struct
Parameters
p
behavior
regionMinIf regionIter is true this should be a std::array<double, 3>
regionMaxIf regionIter is true this should be a std::array<double, 3>
Returns
True iff the given particle's ownership state is compatible with the iterator behavior.