Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

RingFinder Class Reference

Helper class for all predicates that need ring information. More...

#include <standardPredicates.h>

List of all members.

Public Member Functions

 RingFinder () throw ()
 Default constructor.
 RingFinder (Size n) throw ()
 Detailed constructor.
virtual ~RingFinder () throw ()
 Destructor.
bool operator() (const Atom &atom) throw ()
 Return true, if atom is in a ring.
bool dfs (const Atom &atom, const Size limit) throw ()
 Depth first search for finding rings.
void setRingSize (Size n) throw ()
 Set the ring size we want to find.
const HashSet< const Bond * > & getVisitedBonds () const throw ()
 Return the hashset containing all visited bonds.
const std::vector< const Atom * > & getRingAtoms () const throw ()
 Return the vector of ring atoms.


Detailed Description

Helper class for all predicates that need ring information.


Constructor & Destructor Documentation

RingFinder::RingFinder Size  n  )  throw ()
 

Detailed constructor.

Initialize this instance with the size of the ring we want to find. Default setting is 0 which means that any ring size will match.


Member Function Documentation

bool RingFinder::dfs const Atom atom,
const Size  limit
throw ()
 

Depth first search for finding rings.

const std::vector<const Atom*>& RingFinder::getRingAtoms  )  const throw ()
 

Return the vector of ring atoms.

const HashSet<const Bond*>& RingFinder::getVisitedBonds  )  const throw ()
 

Return the hashset containing all visited bonds.

bool RingFinder::operator() const Atom atom  )  throw ()
 

Return true, if atom is in a ring.

void RingFinder::setRingSize Size  n  )  throw ()
 

Set the ring size we want to find.

Ring sizes below 3 will always return false, except if the size is set to 0, then any ring size will match.