soot.toolkits.graph
Class MemoryEfficientGraph
java.lang.Object
|
+--soot.toolkits.graph.HashMutableDirectedGraph
|
+--soot.toolkits.graph.MemoryEfficientGraph
- public class MemoryEfficientGraph
- extends HashMutableDirectedGraph
A memory efficient version of HashMutableDirectedGraph, in the sense
that throw-away objects passed as arguments will not be kept in the
process of adding edges.
Method Summary |
void |
addEdge(java.lang.Object from,
java.lang.Object to)
Adds an edge to the graph between 2 nodes. |
void |
addNode(java.lang.Object o)
Adds a node to the graph. |
void |
removeEdge(java.lang.Object from,
java.lang.Object to)
Removes an edge between 2 nodes in the graph. |
void |
removeNode(java.lang.Object o)
Removes a node from the graph. |
Methods inherited from class soot.toolkits.graph.HashMutableDirectedGraph |
clearAll,
clone,
containsEdge,
containsNode,
getHeads,
getNodes,
getPredsOf,
getSuccsOf,
getTails,
iterator,
printGraph,
size |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MemoryEfficientGraph
public MemoryEfficientGraph()
addNode
public void addNode(java.lang.Object o)
- Description copied from interface: MutableDirectedGraph
- Adds a node to the graph. Initially the added node has no successors or predecessors.
; as a consequence it is considered both a head and tail for the graph.
- Overrides:
- addNode in class HashMutableDirectedGraph
- Tags copied from interface: MutableDirectedGraph
- Parameters:
node
- a node to add to the graph.- See Also:
DirectedGraph.getHeads()
,
DirectedGraph.getTails()
removeNode
public void removeNode(java.lang.Object o)
- Description copied from interface: MutableDirectedGraph
- Removes a node from the graph. If the node is not
found in the graph, no change is made.
- Overrides:
- removeNode in class HashMutableDirectedGraph
- Tags copied from interface: MutableDirectedGraph
- Parameters:
node
- the node to be removed.
addEdge
public void addEdge(java.lang.Object from,
java.lang.Object to)
- Description copied from interface: MutableDirectedGraph
- Adds an edge to the graph between 2 nodes.
If the edge is already present no change is made.
- Overrides:
- addEdge in class HashMutableDirectedGraph
- Tags copied from interface: MutableDirectedGraph
- Parameters:
from
- out node for the edge.to
- in node for the edge.
removeEdge
public void removeEdge(java.lang.Object from,
java.lang.Object to)
- Description copied from interface: MutableDirectedGraph
- Removes an edge between 2 nodes in the graph.
If the edge is not present no change is made.
- Overrides:
- removeEdge in class HashMutableDirectedGraph
- Tags copied from interface: MutableDirectedGraph
- Parameters:
from
- out node for the edge to remove.to
- in node for the edge to remove.