Interface of graphs for graph matching.
More...
#include <Graph_Interface.hh>
The class is used as an abstract interface to allow for a generic
interface of the search algorithms in the library.
It describes an undirected labeled graph.
- Author
- Martin Mann (c) 2008 http://www.bioinf.uni-freiburg.de/~mmann/
Definition at line 19 of file Graph_Interface.hh.
virtual sgm::Graph_Interface::~Graph_Interface |
( |
| ) |
|
|
inlinevirtual |
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
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
virtual std::string sgm::Graph_Interface::getNodeLabel |
( |
const IndexType & |
i | ) |
const |
|
pure 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
Implemented in ggl::RightSidePattern, sgm::SubGraph, sgm::Graph_boostV_p< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, ggl::LeftSidePattern, ggl::chem::ClassIDGraph, and sgm::Graph_boost< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >.
virtual size_t sgm::Graph_Interface::getNodeNumber |
( |
void |
| ) |
const |
|
pure virtual |
Access to the number of nodes of the graph
- Returns
- the overall node number
Implemented in ggl::RightSidePattern, sgm::SubGraph, sgm::Graph_boostV_p< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, ggl::LeftSidePattern, sgm::Graph_boost< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, and ggl::chem::ClassIDGraph.
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
Implemented in ggl::RightSidePattern, ggl::LeftSidePattern, sgm::Graph_boostV_p< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, sgm::Graph_boost< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, sgm::SubGraph, and ggl::chem::ClassIDGraph.
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
Implemented in ggl::RightSidePattern, ggl::LeftSidePattern, sgm::Graph_boostV_p< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, sgm::Graph_boost< GRAPH, NODE_LABEL_PROPERTY, EDGE_LABEL_PROPERTY, NODE_INDEX_PROPERTY >, sgm::SubGraph, and ggl::chem::ClassIDGraph.
static void sgm::Graph_Interface::labelAdjacentNodes |
( |
const Graph_Interface & |
g, |
|
|
const size_t |
curNode, |
|
|
CompLabel & |
compID, |
|
|
const size_t |
label |
|
) |
| |
|
staticprotected |
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::Graph_Interface::operator!= |
( |
const Graph_Interface & |
toCompare | ) |
const |
|
virtual |
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::Graph_Interface::operator== |
( |
const Graph_Interface & |
toCompare | ) |
const |
|
virtual |
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
The documentation for this class was generated from the following file: