soot.toolkits.graph
Class MemoryEfficientGraph
java.lang.Object
|
+--soot.toolkits.graph.HashMutableDirectedGraph
|
+--soot.toolkits.graph.MemoryEfficientGraph
- All Implemented Interfaces:
- DirectedGraph, MutableDirectedGraph
- Direct Known Subclasses:
- MethodCallGraph, VTATypeGraph, VTATypeGraph2
- 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.
- Specified by:
addNode in interface MutableDirectedGraph- Overrides:
addNode in class HashMutableDirectedGraph
- Parameters:
o - 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.
- Specified by:
removeNode in interface MutableDirectedGraph- Overrides:
removeNode in class HashMutableDirectedGraph
- Parameters:
o - 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.
- Specified by:
addEdge in interface MutableDirectedGraph- Overrides:
addEdge in class HashMutableDirectedGraph
- 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.
- Specified by:
removeEdge in interface MutableDirectedGraph- Overrides:
removeEdge in class HashMutableDirectedGraph
- Parameters:
from - out node for the edge to remove.to - in node for the edge to remove.