Class DGraph#
Defined in File DGraph.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public BaseGraph(Class BaseGraph)
Derived Types#
public CFG(Class CFG)public CallGraph(Class CallGraph)
Class Documentation#
-
class DGraph : public BaseGraph#
DGraph is the base class for a general directed graph (DGraph) that is in turn derived from BaseGraph.
Algorithms that operate upon abstract directed graphs should, normally, use only this base DGraph 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.
A directed graph, DGraph, extends BaseGraph by adding DFS and BFS iterators, as well as iterators to enumerate source nodes, sink nodes, incoming edges, and outgoing edges for a node.
NOTE ON friend CLASSES: Many classes (especially DGraph, DGraph::Node, and DGraph::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.
Friends
- friend class DFSIterator
- friend class BFSIterator
-
class BFSIterator : public BaseGraph::BFSIterator#
The BFSIterator here is just an extension of BaseGraph::DFSIterator to allow proper casting.
-
class BiDirNodesIterator : public BaseGraph::BiDirNodesIterator#
The BiDirNodesIterator is just an extension of BaseGraph::BiDirNodesIterator to provide access to DGraph nodes.
-
class DFSIterator : public BaseGraph::DFSIterator#
The DFSIterator here is just an extension of BaseGraph::DFSIterator to allow proper casting.
Subclassed by CFG::DFSIterator
-
class Edge : public BaseGraph::Edge#
Subclassed by CFG::Edge, CallGraph::Edge
Public Functions
-
inline virtual ~Edge()#
Friends
- friend class DGraph
-
inline virtual ~Edge()#
-
class EdgesIterator : public BaseGraph::EdgesIterator#
The EdgesIterator is just and extension of BaseGraph::EdgesIterator to provide access to DGraph edges.
-
class IncomingEdgesIterator : public Iterator#
Iterator to enumerate all the incoming edges into a node.
-
class Node : public BaseGraph::Node#
An node in an undirected graph has a list of neighboring nodes and a list of incident edges.
Subclassed by CFG::Node, CallGraph::Node
Public Functions
-
inline Node()#
-
inline virtual ~Node()#
-
inline int num_incoming()#
-
inline int num_outgoing()#
Friends
- friend class DGraph::DFSIterator
- friend class DGraph::BFSIterator
- friend class DGraph::IncomingEdgesIterator
- friend class DGraph::OutgoingEdgesIterator
- friend class DGraph::SourceNodesIterator
- friend class DGraph::SinkNodesIterator
-
inline Node()#
-
class NodesIterator : public BaseGraph::NodesIterator#
The NodesIterator is just and extension of BaseGraph::NodesIterator to provide access to DGraph nodes.