SimpleDirectedGraphNode¶
This is a node in the directed graph. All the connectivity information for the graph is captured in this (by way of the successor and predecessor sets).
Synopsis¶
Declared in <src/midend/programAnalysis/staticInterproceduralSlicing/SimpleDirectedGraph.h>
class SimpleDirectedGraphNode; Description¶
This is a much simpler graph mechanism than that provided by util/graphs. It places most of the onus of edge bookkeeping on the nodes themselves.
Member Functions¶
| Name | Description |
|---|---|
~SimpleDirectedGraphNodevirtual ~SimpleDirectedGraphNode(); [destructor] [virtual] | Destructor |
addPredecessorvoid addPredecessor(SimpleDirectedGraphNode* n); | add an edge from n to the current node |
addSuccessorvoid addSuccessor(SimpleDirectedGraphNode* n); | add an edge from the current node to n |
getPredecessorsstd::set<SimpleDirectedGraphNode*> getPredecessors(); | get the nodes which point to the current node |
getSuccessorsstd::set<SimpleDirectedGraphNode*> getSuccessors(); | get the nodes which are pointed to by the current node |
hasPredecessorbool hasPredecessor(SimpleDirectedGraphNode* n); | test whether n is a predecessor of the current node |
hasSuccessorbool hasSuccessor(SimpleDirectedGraphNode* n); | test whether n is a successor of the current node |
numPredecessorsint numPredecessors(); | return the number of incoming edges |
numSuccessorsint numSuccessors(); | return the number of outgoing edges |
removePredecessorvoid removePredecessor(SimpleDirectedGraphNode* n); | |
removeSuccessorvoid removeSuccessor(SimpleDirectedGraphNode* n); | |
writeOutvirtual void writeOut(std::ostream& os); [virtual] | virtual function to support displaying node information |
Private Data Members¶
| Name | Description |
|---|---|
_preds | the set of neighbors connected by incoming edges |
_succs | the set of neighbors connected by outgoing edges |
Derived Classes¶
| Name | Description |
|---|---|
DependenceNode |
Created with MrDocs