|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.toolkits.graph.HashMutableEdgeLabelledDirectedGraph
public class HashMutableEdgeLabelledDirectedGraph
Field Summary | |
---|---|
protected HashMap<soot.toolkits.graph.DGEdge,ArrayList<Object>> |
edgeToLabels
|
protected Chain |
heads
|
protected HashMap<Object,ArrayList<soot.toolkits.graph.DGEdge>> |
labelToEdges
|
protected HashMap<Object,ArrayList> |
nodeToPreds
|
protected HashMap<Object,ArrayList> |
nodeToSuccs
|
protected Chain |
tails
|
Constructor Summary | |
---|---|
HashMutableEdgeLabelledDirectedGraph()
|
Method Summary | |
---|---|
void |
addEdge(Object from,
Object to,
Object label)
Adds an edge to the graph between 2 nodes. |
void |
addNode(Object node)
Adds a node to the graph. |
void |
clearAll()
Removes all nodes and edges. |
Object |
clone()
|
boolean |
containsAnyEdge(Object label)
|
boolean |
containsAnyEdge(Object from,
Object to)
|
boolean |
containsEdge(Object from,
Object to,
Object label)
|
boolean |
containsNode(Object node)
|
MutableDirectedGraph |
getEdgesForLabel(Object label)
Returns a MutableDirectedGraph consisting of all edges with the given label and their nodes. |
List |
getHeads()
Returns a list of entry points for this graph. |
List<Object> |
getLabelsForEdges(Object from,
Object to)
Returns a list of labels for which an edge exists between from and to |
List<Object> |
getNodes()
|
List |
getPredsOf(Object s)
Returns a list of predecessors for the given node in the graph. |
List |
getSuccsOf(Object s)
Returns a list of successors for the given node in the graph. |
List |
getTails()
Returns a list of exit points for this graph. |
Iterator |
iterator()
Returns an iterator for the nodes in this graph. |
void |
printGraph()
|
void |
removeAllEdges(Object label)
Removes all edges with the given label in the graph. |
void |
removeAllEdges(Object from,
Object to)
Removes all edges between 2 nodes in the graph. |
void |
removeEdge(Object from,
Object to,
Object label)
Removes an edge between 2 nodes in the graph. |
void |
removeNode(Object node)
Removes a node from the graph. |
int |
size()
Returns the node count for this graph. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HashMap<Object,ArrayList> nodeToPreds
protected HashMap<Object,ArrayList> nodeToSuccs
protected HashMap<soot.toolkits.graph.DGEdge,ArrayList<Object>> edgeToLabels
protected HashMap<Object,ArrayList<soot.toolkits.graph.DGEdge>> labelToEdges
protected Chain heads
protected Chain tails
Constructor Detail |
---|
public HashMutableEdgeLabelledDirectedGraph()
Method Detail |
---|
public void clearAll()
public Object clone()
clone
in class Object
public List getHeads()
DirectedGraph
getHeads
in interface DirectedGraph
public List getTails()
DirectedGraph
getTails
in interface DirectedGraph
public List getPredsOf(Object s)
DirectedGraph
getPredsOf
in interface DirectedGraph
public List getSuccsOf(Object s)
DirectedGraph
getSuccsOf
in interface DirectedGraph
public int size()
DirectedGraph
size
in interface DirectedGraph
public Iterator iterator()
DirectedGraph
iterator
in interface Iterable
iterator
in interface DirectedGraph
public void addEdge(Object from, Object to, Object label)
MutableEdgeLabelledDirectedGraph
addEdge
in interface MutableEdgeLabelledDirectedGraph
from
- out node for the edge.to
- in node for the edge.label
- label for the edge.public List<Object> getLabelsForEdges(Object from, Object to)
MutableEdgeLabelledDirectedGraph
getLabelsForEdges
in interface MutableEdgeLabelledDirectedGraph
from
- out node for the edges to remove.to
- in node for the edges to remove.public MutableDirectedGraph getEdgesForLabel(Object label)
MutableEdgeLabelledDirectedGraph
getEdgesForLabel
in interface MutableEdgeLabelledDirectedGraph
label
- label for the edge to remove.public void removeEdge(Object from, Object to, Object label)
MutableEdgeLabelledDirectedGraph
removeEdge
in interface MutableEdgeLabelledDirectedGraph
from
- out node for the edges to remove.to
- in node for the edges to remove.label
- label for the edge to remove.public void removeAllEdges(Object from, Object to)
MutableEdgeLabelledDirectedGraph
removeAllEdges
in interface MutableEdgeLabelledDirectedGraph
from
- out node for the edges to remove.to
- in node for the edges to remove.public void removeAllEdges(Object label)
MutableEdgeLabelledDirectedGraph
removeAllEdges
in interface MutableEdgeLabelledDirectedGraph
label
- label for the edge to remove.public boolean containsEdge(Object from, Object to, Object label)
containsEdge
in interface MutableEdgeLabelledDirectedGraph
public boolean containsAnyEdge(Object from, Object to)
containsAnyEdge
in interface MutableEdgeLabelledDirectedGraph
from
- out node for the edges.to
- in node for the edges.
public boolean containsAnyEdge(Object label)
containsAnyEdge
in interface MutableEdgeLabelledDirectedGraph
label
- label for the edges.
public boolean containsNode(Object node)
containsNode
in interface MutableEdgeLabelledDirectedGraph
node
- node that we want to know if the graph constains.
public List<Object> getNodes()
getNodes
in interface MutableEdgeLabelledDirectedGraph
public void addNode(Object node)
MutableEdgeLabelledDirectedGraph
addNode
in interface MutableEdgeLabelledDirectedGraph
node
- a node to add to the graph.DirectedGraph.getHeads()
,
DirectedGraph.getTails()
public void removeNode(Object node)
MutableEdgeLabelledDirectedGraph
removeNode
in interface MutableEdgeLabelledDirectedGraph
node
- the node to be removed.public void printGraph()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |