Ring enumeration ala Hanser et al.
More...
#include <RP_Hanser96.hh>
|
typedef std::set< std::pair
< size_t, size_t > > | BondSet |
|
Implementation of the exhaustive ring perception algorithm by
Hanser et al. (1996)
A New Algorithm for Exhaustive Ring Perception in a Molecular Graph
T. Hanser, P. Jauffret, and G. Kaufmann
J. Chem. Inf. Comput. Sci., 1996, 36, 1146-1152
- Author
- Martin Mann - 2010 - http://www.bioinf.uni-freiburg.de/~mmann/
Definition at line 28 of file RP_Hanser96.hh.
sgm::RP_Hanser96::RP_Hanser96 |
( |
| ) |
|
virtual sgm::RP_Hanser96::~RP_Hanser96 |
( |
| ) |
|
|
virtual |
size_t sgm::RP_Hanser96::findRingBonds |
( |
const Graph_Interface & |
graph, |
|
|
BondSet & |
ringBonds, |
|
|
const size_t |
maxRingSize = std::numeric_limits< size_t >::max() |
|
) |
| |
Identifies all bonds participating in rings and stores the according vertex index pairs in the provided container.
- Parameters
-
graph | the graph to search for ring bonds |
ringBonds | OUT : the container to fill with the ring bonds. NOTE: the container is cleared at the beginning of the call. |
maxRingSize | the maximal size of rings to consider |
- Returns
- the number of ring bonds within the graph
size_t sgm::RP_Hanser96::findRings |
( |
const Graph_Interface & |
graph, |
|
|
RingReporter & |
reporter, |
|
|
const size_t |
maxRingSize = std::numeric_limits< size_t >::max() |
|
) |
| |
|
virtual |
Finds ALL rings within the given graph and reports each found ring to the assigned reporter. The enumeration can be restricted to rings up to a given ring size, ie. number of nodes per ring.
- Parameters
-
graph | the graph to be analyzed |
reporter | the RingReporter to report all found rings to |
maxRingSize | the maximal size of rings to report |
- Returns
- the number of all rings within the gaph
Implements sgm::RingPerception.
Initializes the pGraph member with the given graph. If direct loops are found, these are directly reported and counted.
- Parameters
-
graph | the graph to be encoded in the pGraph member |
reporter | the RingReporter to report all rings to |
- Returns
- the number of rings found
size_t sgm::RP_Hanser96::remove_vertex |
( |
const size_t |
nextToRemove, |
|
|
const Graph_Interface & |
graph, |
|
|
RingReporter & |
reporter, |
|
|
const size_t |
maxRingSize |
|
) |
| |
|
protected |
Virtually removes the vertex nextToRemove from the pGraph and reports all found rings to the given reporter. The removal is only virtual, since the node remains within the pGraph but all adjacent edges are removed, i.e. it is not accessible anymore in later iterations. This is to ease the maintenance of the temporary data structures.
- Parameters
-
nextToRemove | the index of the vertex to be removed |
graph | the graph searched (needed for ring report) |
reporter | the RingReporter to report all rings to |
maxRingSize | the maximal ring size to consider |
- Returns
- the number of rings found
std::vector<size_t> sgm::RP_Hanser96::pGraphDegree |
|
protected |
boost::property_map<P_Graph, boost::vertex_index_t>::type sgm::RP_Hanser96::pGraphIndex |
|
protected |
boost::property_map<P_Graph, boost::edge_name_t>::type sgm::RP_Hanser96::pGraphPath |
|
protected |
std::vector<size_t> sgm::RP_Hanser96::toRemove |
|
protected |
The documentation for this class was generated from the following file: