Class AbstractNumberedLabeledGraph<T,U>
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<T>
com.ibm.wala.util.graph.AbstractNumberedGraph<T>
com.ibm.wala.util.graph.labeled.AbstractNumberedLabeledGraph<T,U>
- All Implemented Interfaces:
EdgeManager<T>
,Graph<T>
,LabeledEdgeManager<T,
,U> LabeledGraph<T,
,U> NumberedLabeledEdgeManager<T,
,U> NumberedLabeledGraph<T,
,U> NodeManager<T>
,NumberedEdgeManager<T>
,NumberedGraph<T>
,NumberedNodeManager<T>
,Iterable<T>
- Direct Known Subclasses:
SlowSparseNumberedLabeledGraph
public abstract class AbstractNumberedLabeledGraph<T,U>
extends AbstractNumberedGraph<T>
implements LabeledGraph<T,U>, NumberedLabeledGraph<T,U>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adds an edge with some labelprotected String
edgeString
(T from, T to) @Nullable U
Sets the default object used as label for operations where no specific edge label is provided.getEdgeLabels
(T src, T dst) Returns a set of all labeled edges between node src and node dstprotected abstract NumberedLabeledEdgeManager
<T, U> getPredLabels
(T N) int
getPredNodeCount
(T N, U label) Return the number ofimmediate predecessor
nodes of this Node in the Graph on edges with some label.getPredNodeNumbers
(T node, U label) getPredNodes
(T N, U label) Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.getSuccLabels
(T N) int
getSuccNodeCount
(T N, U label) Return the number ofimmediate successor
nodes of this Node in the GraphgetSuccNodeNumbers
(T node, U label) getSuccNodes
(T N, U label) Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.boolean
void
removeEdge
(T src, T dst, U label) Methods inherited from class com.ibm.wala.util.graph.AbstractNumberedGraph
getMaxNumber, getNode, getNodeManager, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodes
Methods inherited from class com.ibm.wala.util.graph.AbstractGraph
addEdge, addNode, containsNode, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
Methods inherited from interface com.ibm.wala.util.graph.Graph
removeNodeAndEdges
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.ibm.wala.util.graph.labeled.LabeledEdgeManager
getPredNodes
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, stream
Methods inherited from interface com.ibm.wala.util.graph.NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbers
Methods inherited from interface com.ibm.wala.util.graph.NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Constructor Details
-
AbstractNumberedLabeledGraph
public AbstractNumberedLabeledGraph()
-
-
Method Details
-
getEdgeManager
- Specified by:
getEdgeManager
in classAbstractNumberedGraph<T>
- Returns:
- the object which manages edges in the graph
-
addEdge
Description copied from interface:LabeledEdgeManager
adds an edge with some label- Specified by:
addEdge
in interfaceLabeledEdgeManager<T,
U>
-
getPredLabels
- Specified by:
getPredLabels
in interfaceLabeledEdgeManager<T,
U> - Returns:
- the labels on edges whose destination is N
-
getPredNodeCount
Description copied from interface:LabeledEdgeManager
Return the number ofimmediate predecessor
nodes of this Node in the Graph on edges with some label.- Specified by:
getPredNodeCount
in interfaceLabeledEdgeManager<T,
U> - Returns:
- the number of immediate predecessor Nodes of this Node in the Graph.
-
getPredNodes
Description copied from interface:LabeledEdgeManager
Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label.This method never returns
null
.- Specified by:
getPredNodes
in interfaceLabeledEdgeManager<T,
U> - Returns:
- an Iterator over the immediate predecessor nodes of this Node.
-
getSuccLabels
- Specified by:
getSuccLabels
in interfaceLabeledEdgeManager<T,
U> - Returns:
- the labels on edges whose source is N
-
getSuccNodeCount
Description copied from interface:LabeledEdgeManager
Return the number ofimmediate successor
nodes of this Node in the Graph- Specified by:
getSuccNodeCount
in interfaceLabeledEdgeManager<T,
U> - Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodes
Description copied from interface:LabeledEdgeManager
Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.This method never returns
null
.- Specified by:
getSuccNodes
in interfaceLabeledEdgeManager<T,
U> - Returns:
- an Iterator over the immediate successor Nodes of this Node.
-
getPredNodeNumbers
- Specified by:
getPredNodeNumbers
in interfaceNumberedLabeledEdgeManager<T,
U> - Throws:
IllegalArgumentException
-
getSuccNodeNumbers
- Specified by:
getSuccNodeNumbers
in interfaceNumberedLabeledEdgeManager<T,
U> - Throws:
IllegalArgumentException
-
hasEdge
-
removeEdge
- Specified by:
removeEdge
in interfaceLabeledEdgeManager<T,
U>
-
getEdgeLabels
Description copied from interface:LabeledEdgeManager
Returns a set of all labeled edges between node src and node dst- Specified by:
getEdgeLabels
in interfaceLabeledEdgeManager<T,
U> - Parameters:
src
- source node of the edgedst
- target node of the edge- Returns:
- Set of edge labels
-
getDefaultLabel
Description copied from interface:LabeledEdgeManager
Sets the default object used as label for operations where no specific edge label is provided. This is due to compatibility with the EdgeManager interface- Specified by:
getDefaultLabel
in interfaceLabeledEdgeManager<T,
U>
-
edgeString
- Overrides:
edgeString
in classAbstractGraph<T>
-