soot.toolkits.graph
Class MemoryEfficientGraph
java.lang.Object
soot.toolkits.graph.HashMutableDirectedGraph
soot.toolkits.graph.MemoryEfficientGraph
- All Implemented Interfaces:
- Iterable, DirectedGraph, MutableDirectedGraph
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.
| Methods inherited from class soot.toolkits.graph.HashMutableDirectedGraph |
clearAll, clone, containsEdge, containsNode, getHeads, getNodes, getPredsOf, getPredsOfAsSet, getSuccsOf, getSuccsOfAsSet, getTails, iterator, printGraph, size |
MemoryEfficientGraph
public MemoryEfficientGraph()
addNode
public void addNode(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(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(Object from,
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(Object from,
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.