#include <Graph.hpp>
Classes | |
| class | Edge |
| class | EdgesIterator |
| class | Node |
| class | NodesIterator |
Public Member Functions | |
| Graph () | |
| Graph (OA_ptr< Node > root) | |
| virtual | ~Graph () |
| virtual void | addEdge (OA_ptr< Graph::Edge > e) |
| virtual void | addNode (OA_ptr< Graph::Node > n) |
| virtual void | removeEdge (OA_ptr< Graph::Edge > e) |
| virtual void | removeNode (OA_ptr< Graph::Node > n) |
Private Member Functions | |
| OA_ptr< BaseGraph::Node > | create_DFS_links (OA_ptr< BaseGraph::Node > start_node) |
| OA_ptr< BaseGraph::Node > | create_BFS_links (OA_ptr< BaseGraph::Node > start_node) |
Graph is the base class for a general undirected graph (Graph) that is in turn derived from BaseGraph. Algorithms that operate upon abstract undirected graphs should, normally, use only this base Graph class for maximum portability.
No extra restrictions are placed on nodes and edges in addition to those imposed by BaseGraph. This means that self-edges, and multiple edges between two nodes, are allowed.
An undirected graph, Graph, extends BaseGraph by adding DFS and BFS iterators, as well as iterators to enumerate neighboring nodes and incident edges for a node.
NOTE ON friend CLASSES: Many classes (especially Graph, Graph::Node, and Graph::Edge) have many friend classes. This is not* a kludge. It is simulating "package" visiblity in Java. We want a limited public interface to Node and Edge and yet give more permissions to methods within the Graph class.
Definition at line 45 of file Graph.hpp.
| void OA::Graph::addEdge | ( | OA_ptr< Graph::Edge > | e | ) | [virtual] |
| void OA::Graph::addNode | ( | OA_ptr< Graph::Node > | n | ) | [virtual] |
| void OA::Graph::removeEdge | ( | OA_ptr< Graph::Edge > | e | ) | [virtual] |
| void OA::Graph::removeNode | ( | OA_ptr< Graph::Node > | n | ) | [virtual] |
1.7.1