ESyS-Particle  4.0.1
Public Member Functions | Protected Attributes
APairInteractionGroup< T > Class Template Reference

Abstract base class for a group of pair interactions. More...

#include <InteractionGroup.h>

Inheritance diagram for APairInteractionGroup< T >:
Inheritance graph
[legend]
Collaboration diagram for APairInteractionGroup< T >:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

template<class T>
class APairInteractionGroup< T >

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.)


Member Data Documentation

template<class T >
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.

Todo:
replace set (O(logN)) with hashset (O(1))

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