Rule left side pattern.
More...
#include <RuleGraph.hh>
Implements the sgm::Pattern_Interface class to allow for the search of
the left side of a given ggl::Rule object using the sgm library.
- Author
- Martin Mann (c) 2008 http://www.bioinf.uni-freiburg.de/~mmann/
Definition at line 26 of file RuleGraph.hh.
ggl::LeftSidePattern::LeftSidePattern |
( |
const Rule & |
rule | ) |
|
Constructs a LeftSidePattern for the given rule
- Parameters
-
rule | the Rule this object will be a left side pattern of |
Copy construction.
- Parameters
-
toCopy | the left side pattern to copy |
virtual ggl::LeftSidePattern::~LeftSidePattern |
( |
| ) |
|
|
virtual |
Computes the connected components of a given graph. It stores the connected component ID of each node within the provided container and returns the number of components.
- Parameters
-
g | the graph to check for connected components |
compID | the container to store the component ID information within |
- Returns
- the number of connected components within g
const CompLabel& ggl::LeftSidePattern::getComponentLabeling |
( |
void |
| ) |
const |
Access to the component labeling of this pattern.
- Returns
- the component labeling
virtual const ConstraintVec& ggl::LeftSidePattern::getConstraints |
( |
void |
| ) |
const |
|
virtual |
Access to the label of a specified edge
- Parameters
-
i | the index of the first end node of interest |
j | the index of the second end node of interest |
- Returns
- the edge iterator pointing to the first edge between node i and j or to getEdgesEnd(i,j) if no edge exists
Access to the label of a specified edge
- Parameters
-
i | the index of the first end node of interest |
j | the index of the second end node of interest |
- Returns
- the edge iterator pointing to the first edge between node i and j or to getEdgesEnd(i,j) if no edge exists
const IndexSet& ggl::LeftSidePattern::getFirstOfEachComponent |
( |
void |
| ) |
const |
Access to the first index of each component of this pattern.
- Returns
- a set of the first index for each component
template<class GRAPHMATCHER >
Creates a Pattern_Automorphism object to handle symmetries when matching the LeftSidePattern of this rule. The GRAPHMATCHER template argument is used to choose a sgm::GraphMatcher class to be used for automorphism detection.
- Returns
- the Pattern_Automorphism for this rule
virtual std::string ggl::LeftSidePattern::getNodeLabel |
( |
const IndexType & |
i | ) |
const |
|
virtual |
Access to the label of a specified node
- Parameters
-
i | the index of the node of interest |
- Returns
- a string representation of the node label
Implements sgm::Graph_Interface.
virtual size_t ggl::LeftSidePattern::getNodeNumber |
( |
void |
| ) |
const |
|
virtual |
Access to the number of nodes of the graph
- Returns
- the overall node number
Implements sgm::Graph_Interface.
Access to iteration begin for the edge in the adjacency list of a specified node
- Parameters
-
i | the index of the node of interest |
- Returns
- the iterator to the first edge within the adjacency of i
Implements sgm::Graph_Interface.
Access to iteration end for the edge in the adjacency list of a specified node
- Parameters
-
i | the index of the node of interest |
- Returns
- the iterator the end of the adjacency iteration of i
Implements sgm::Graph_Interface.
virtual const Graph_Interface& ggl::LeftSidePattern::getPatternGraph |
( |
void |
| ) |
const |
|
virtual |
Access to *this, since this is the pattern graph..
- Returns
- the pattern graph to be matched
Implements sgm::Pattern_Interface.
virtual const Rule& ggl::LeftSidePattern::getRule |
( |
void |
| ) |
const |
|
virtual |
virtual const std::string* ggl::LeftSidePattern::getUsedWildcard |
( |
void |
| ) |
const |
|
virtual |
Access to the wildcard to be used when matching this pattern onto some other graph.
- Returns
- the wildcard string to be used for edge and node labels, or NULL if no wildcard should be applied
Implements sgm::Pattern_Interface.
static void sgm::Graph_Interface::labelAdjacentNodes |
( |
const Graph_Interface & |
g, |
|
|
const size_t |
curNode, |
|
|
CompLabel & |
compID, |
|
|
const size_t |
label |
|
) |
| |
|
staticprotectedinherited |
Performs a depths-first-search labeling of all accessible nodes starting from curNode within g. The reached nodes are labeled with the given label in the component ID container compID
- Parameters
-
the | graph to screen |
curNode | the node to start the search from |
compID | the container to store the component ID information within |
label | the component ID to be used for all nodes of the connected component reachable from curNode |
virtual bool sgm::Pattern_Interface::operator!= |
( |
const Pattern_Interface & |
toCompare | ) |
const |
|
virtualinherited |
Inequality comparison
- Parameters
-
- Returns
- true if both describe the different patterns
virtual bool sgm::Graph_Interface::operator!= |
( |
const Graph_Interface & |
toCompare | ) |
const |
|
virtualinherited |
Interface inequality comparison : NOTE : this function checks whether the interfaces of two graphs are identical or not, i.e. nodes with same index are equal and the order of adjacent edges is the same. This function performs NO GRAPH ISOMORPHISM !!! Thus, slight changes in the node order etc. will result in a non-equal interface!
- Parameters
-
- Returns
- true if both graph interfaces are different
virtual bool sgm::Pattern_Interface::operator== |
( |
const Pattern_Interface & |
toCompare | ) |
const |
|
virtualinherited |
Equality comparison
- Parameters
-
- Returns
- true if both describe the same pattern
virtual bool sgm::Graph_Interface::operator== |
( |
const Graph_Interface & |
toCompare | ) |
const |
|
virtualinherited |
Interface equality comparison : NOTE : this function checks whether the interfaces of two graphs are identical or not, i.e. nodes with same index are equal and the order of adjacent edges is the same. This function performs NO GRAPH ISOMORPHISM !!! Thus, slight changes in the node order etc. will result in a non-equal interface!
- Parameters
-
- Returns
- true if both graph interfaces are equal
IndexSet ggl::LeftSidePattern::firstOfEachComponent |
|
protected |
Holds the first index of each component of this graph Has to be sorted in increasing indices !!!
Definition at line 50 of file RuleGraph.hh.
const Rule& ggl::LeftSidePattern::rule |
|
protected |
the list of order checks to apply to break all symmetries for this rule
Definition at line 57 of file RuleGraph.hh.
The documentation for this class was generated from the following file: