ESyS-Particle
4.0.1
|
Abstract base class for a group of pair interactions. More...
#include <InteractionGroup.h>
Public Member Functions | |
bool | isIn (int, int) |
virtual void | setExIG (AParallelInteractionStorage *eg) |
Protected Attributes | |
set< pair< int, int > > | m_set |
unsigned int | m_update_timestamp |
Abstract base class for a group of pair interactions.
The difference to AInteractionGroup is the existence of a function bool isIn(int,int) which returns if an interaction between particles with the given Ids is in this group. (Necessary because bonded -> not elastic,frictional etc.)
set<pair<int,int> > APairInteractionGroup< T >::m_set [protected] |
having an extra set of all pairs if particle-Ids of the interactions in the group costs some memory, but speeds up isIn to O(log N). It would be O(N) if implemented with a find() over the vector of inteactions.