Class SparseNumberedLabeledEdgeManager<T,U>
java.lang.Object
com.ibm.wala.util.graph.labeled.SparseNumberedLabeledEdgeManager<T,U>
- All Implemented Interfaces:
EdgeManager<T>
,LabeledEdgeManager<T,
,U> NumberedLabeledEdgeManager<T,
,U> NumberedEdgeManager<T>
,Serializable
public class SparseNumberedLabeledEdgeManager<T,U>
extends Object
implements Serializable, NumberedLabeledEdgeManager<T,U>
- See Also:
-
Constructor Summary
ConstructorDescriptionSparseNumberedLabeledEdgeManager
(NumberedNodeManager<T> nodeManager) SparseNumberedLabeledEdgeManager
(NumberedNodeManager<T> nodeManager, U defaultLabel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
adds an edge with some label@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 dstgetPredLabels
(T N) int
Return the number ofimmediate predecessor
nodes of nint
getPredNodeCount
(T N, U label) Return the number ofimmediate predecessor
nodes of this Node in the Graph on edges with some label.getPredNodeNumbers
(@Nullable T node) getPredNodeNumbers
(@Nullable T node, U label) getPredNodes
(@Nullable T N) Return anIterator
over the immediate predecessor nodes of ngetPredNodes
(@Nullable 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
Return the number ofimmediate successor
nodes of this Node in the Graphint
getSuccNodeCount
(T N, U label) Return the number ofimmediate successor
nodes of this Node in the GraphgetSuccNodeNumbers
(@Nullable T node) getSuccNodeNumbers
(@Nullable T node, U label) getSuccNodes
(@Nullable T N) Return an Iterator over the immediate successor nodes of ngetSuccNodes
(@Nullable T N, U label) Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.boolean
boolean
void
removeAllIncidentEdges
(T node) void
removeEdge
(T src, T dst) void
removeEdge
(T src, T dst, U label) void
removeIncomingEdges
(T node) void
removeOutgoingEdges
(T node) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.wala.util.graph.labeled.LabeledEdgeManager
getPredNodes
-
Constructor Details
-
SparseNumberedLabeledEdgeManager
-
SparseNumberedLabeledEdgeManager
-
-
Method Details
-
addEdge
Description copied from interface:LabeledEdgeManager
adds an edge with some label- Specified by:
addEdge
in interfaceLabeledEdgeManager<T,
U> - See Also:
-
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.
- See Also:
-
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.
- See Also:
-
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.
- See Also:
-
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.
- See Also:
-
hasEdge
-
removeAllIncidentEdges
- Specified by:
removeAllIncidentEdges
in interfaceEdgeManager<T>
-
removeEdge
- Specified by:
removeEdge
in interfaceLabeledEdgeManager<T,
U> - Throws:
IllegalArgumentException
- See Also:
-
removeIncomingEdges
- Specified by:
removeIncomingEdges
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
- See Also:
-
removeOutgoingEdges
- Specified by:
removeOutgoingEdges
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
- See Also:
-
getPredLabels
- Specified by:
getPredLabels
in interfaceLabeledEdgeManager<T,
U> - Returns:
- the labels on edges whose destination is N
-
getSuccLabels
- Specified by:
getSuccLabels
in interfaceLabeledEdgeManager<T,
U> - Returns:
- the labels on edges whose source is N
-
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
-
addEdge
- Specified by:
addEdge
in interfaceEdgeManager<T>
-
getPredNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate predecessor
nodes of n- Specified by:
getPredNodeCount
in interfaceEdgeManager<T>
- Returns:
- the number of immediate predecessors of n.
-
getPredNodes
Description copied from interface:EdgeManager
Return anIterator
over the immediate predecessor nodes of nThis method never returns
null
.- Specified by:
getPredNodes
in interfaceEdgeManager<T>
- Returns:
- an
Iterator
over the immediate predecessor nodes of this Node.
-
getSuccNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate successor
nodes of this Node in the Graph- Specified by:
getSuccNodeCount
in interfaceEdgeManager<T>
- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodes
Description copied from interface:EdgeManager
Return an Iterator over the immediate successor nodes of nThis method never returns
null
.- Specified by:
getSuccNodes
in interfaceEdgeManager<T>
- Returns:
- an Iterator over the immediate successor nodes of n
-
hasEdge
- Specified by:
hasEdge
in interfaceEdgeManager<T>
-
removeEdge
- Specified by:
removeEdge
in interfaceEdgeManager<T>
- Throws:
UnsupportedOperationException
-
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>
-
getPredNodeNumbers
- Specified by:
getPredNodeNumbers
in interfaceNumberedLabeledEdgeManager<T,
U> - Throws:
IllegalArgumentException
-
getSuccNodeNumbers
- Specified by:
getSuccNodeNumbers
in interfaceNumberedLabeledEdgeManager<T,
U> - Throws:
IllegalArgumentException
-
getPredNodeNumbers
- Specified by:
getPredNodeNumbers
in interfaceNumberedEdgeManager<T>
- Returns:
- the numbers identifying the immediate predecessors of node
-
getSuccNodeNumbers
- Specified by:
getSuccNodeNumbers
in interfaceNumberedEdgeManager<T>
- Returns:
- the numbers identifying the immediate successors of node
-