Package soot.toolkits.graph
Interface MutableEdgeLabelledDirectedGraph<N,L>
-
- Type Parameters:
N-L-
- All Superinterfaces:
DirectedGraph<N>,EdgeLabelledDirectedGraph<N,L>,Iterable<N>
- All Known Subinterfaces:
ProgramDependenceGraph
- All Known Implementing Classes:
HashMutableEdgeLabelledDirectedGraph,HashMutablePDG
public interface MutableEdgeLabelledDirectedGraph<N,L> extends EdgeLabelledDirectedGraph<N,L>
Defines a DirectedGraph which is modifiable and associates a label object with every edge. Provides an interface to add/delete nodes and edges.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEdge(N from, N to, L label)Adds an edge to the graph between 2 nodes.voidaddNode(N node)Adds a node to the graph.voidremoveAllEdges(L label)Removes all edges with the given label in the graph.voidremoveAllEdges(N from, N to)Removes all edges between 2 nodes in the graph.voidremoveEdge(N from, N to, L label)Removes an edge between 2 nodes in the graph.voidremoveNode(N node)Removes a node from the graph.-
Methods inherited from interface soot.toolkits.graph.DirectedGraph
getHeads, getPredsOf, getSuccsOf, getTails, iterator, size
-
Methods inherited from interface soot.toolkits.graph.EdgeLabelledDirectedGraph
containsAnyEdge, containsAnyEdge, containsEdge, containsNode, getEdgesForLabel, getLabelsForEdges
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
addEdge
void addEdge(N from, N to, L label)
Adds an edge to the graph between 2 nodes. If the edge is already present no change is made.- Parameters:
from- out node for the edge.to- in node for the edge.label- label for the edge.
-
removeEdge
void removeEdge(N from, N to, L label)
Removes an edge between 2 nodes in the graph. If the edge is not present no change is made.- Parameters:
from- out node for the edges to remove.to- in node for the edges to remove.label- label for the edge to remove.
-
removeAllEdges
void removeAllEdges(N from, N to)
Removes all edges between 2 nodes in the graph. If no edges are present, no change is made.- Parameters:
from- out node for the edges to remove.to- in node for the edges to remove.
-
removeAllEdges
void removeAllEdges(L label)
Removes all edges with the given label in the graph. If no edges are present, no change is made.- Parameters:
label- label for the edge to remove.
-
addNode
void addNode(N node)
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.- Parameters:
node- a node to add to the graph.- See Also:
DirectedGraph.getHeads(),DirectedGraph.getTails()
-
removeNode
void removeNode(N node)
Removes a node from the graph. If the node is not found in the graph, no change is made.- Parameters:
node- the node to be removed.
-
-