ProtoMol - an object-oriented component based framework for Molecular Dynamics simulations.

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

ProtoMol::ExclusionTable Class Reference

#include <ExclusionTable.h>

List of all members.

Public Member Functions

 ExclusionTable ()
void resize (int count)
void clear ()
void add (int atom1, int atom2, ExclusionClass type)
ExclusionClass check (int atom1, int atom2) const
bool checkReallyFast (int atom1, int atom2) const
bool empty () const
const std::vector< ExclusionPair > & getTable () const
void cleanTemporaries ()

Private Attributes

std::vector< ExclusionClasslowDeltas
std::vector< bool > anyExclsForThisDelta
std::map< PairInt, ExclusionClasshighDeltas
int myMaxDelta
std::vector< ExclusionPairmyTable
std::set< ExclusionPairmySet


Detailed Description

Defines the table of exclusions. ExclusionTable assumes that most exclusions have a difference (delta) of the indices's of the two atoms less than Constant::FASTDELTAMAX, it keeps also track of the maximum difference. If the distance is less than Constant::FASTDELTAMAX a simple array look-up table is used, otherwise a map will be used.


Constructor & Destructor Documentation

ProtoMol::ExclusionTable::ExclusionTable  )  [inline]
 


Member Function Documentation

void ProtoMol::ExclusionTable::add int  atom1,
int  atom2,
ExclusionClass  type
 

Add a new exclusion between atom1 and atom2 of the given type.

ExclusionClass ProtoMol::ExclusionTable::check int  atom1,
int  atom2
const [inline]
 

Check for an exclusion between atom1 and atom2, and return its type.

bool ProtoMol::ExclusionTable::checkReallyFast int  atom1,
int  atom2
const [inline]
 

Check if there could be an exclusion between atom1 and atom2. If this function returns false, there is no exclusion, but a true result doesn't give any information. Requires that atom1 $<$ atom2.

void ProtoMol::ExclusionTable::cleanTemporaries  ) 
 

Clean up temporaries, to be called after the exclusion table is build.

void ProtoMol::ExclusionTable::clear  ) 
 

Clear all exclusions from the table.

bool ProtoMol::ExclusionTable::empty  )  const [inline]
 

Returns true if there are no exclusions.

const std::vector<ExclusionPair>& ProtoMol::ExclusionTable::getTable  )  const [inline]
 

void ProtoMol::ExclusionTable::resize int  count  ) 
 

Set the number of atoms in the system (not the number of exclusions). This invalidates the data, so a clear must be performed after this before the table is used again.


Member Data Documentation

std::vector<bool> ProtoMol::ExclusionTable::anyExclsForThisDelta [private]
 

std::map<PairInt,ExclusionClass> ProtoMol::ExclusionTable::highDeltas [private]
 

std::vector<ExclusionClass> ProtoMol::ExclusionTable::lowDeltas [private]
 

int ProtoMol::ExclusionTable::myMaxDelta [private]
 

std::set<ExclusionPair> ProtoMol::ExclusionTable::mySet [private]
 

std::vector<ExclusionPair> ProtoMol::ExclusionTable::myTable [private]
 


The documentation for this class was generated from the following files: Last update: . GNU GENERAL PUBLIC LICENSE, copyrighted by the University of Notre Dame and the University of Bergen, Norway.