Class SlowSparseNumberedLabeledGraph<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>
com.ibm.wala.util.graph.labeled.SlowSparseNumberedLabeledGraph<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>, Serializable, Iterable<T>
- Direct Known Subclasses:
AbstractFlowGraph
public class SlowSparseNumberedLabeledGraph<T,U>
extends AbstractNumberedLabeledGraph<T,U>
implements Serializable
A labeled graph implementation suitable for sparse graphs.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> void copyInto(LabeledGraph<T, U> g, LabeledGraph<T, U> into) static <T,U> SlowSparseNumberedLabeledGraph <T, U> duplicate(LabeledGraph<T, U> g) protected NumberedLabeledEdgeManager<T, U> protected NumberedNodeManager<T> Methods inherited from class AbstractNumberedLabeledGraph
addEdge, edgeString, getDefaultLabel, getEdgeLabels, getPredLabels, getPredNodeCount, getPredNodeNumbers, getPredNodes, getSuccLabels, getSuccNodeCount, getSuccNodeNumbers, getSuccNodes, hasEdge, removeEdgeModifier and TypeMethodDescriptionvoidadds an edge with some labelprotected StringedgeString(T from, T to) 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) intgetPredNodeCount(T N, U label) Return the number ofimmediate predecessornodes 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) intgetSuccNodeCount(T N, U label) Return the number ofimmediate successornodes 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.booleanvoidremoveEdge(T src, T dst, U label) Methods inherited from class AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesModifier and TypeMethodDescriptionintgetNode(int number) intgetPredNodeNumbers(T node) getSuccNodeNumbers(T node) Methods inherited from class AbstractGraph
addEdge, addNode, containsNode, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream, toStringModifier and TypeMethodDescriptionvoidvoidadd a node to this graphbooleancontainsNode(T n) intintReturn the number ofimmediate predecessornodes of ngetPredNodes(T n) Return anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(T n) Return an Iterator over the immediate successor nodes of nbooleaniterator()protected StringnodeString(T n, boolean forEdge) voidremoveAllIncidentEdges(T node) voidremoveEdge(T src, T dst) voidremoveIncomingEdges(T node) voidremoveNode(T n) remove a node from this graphvoidremove a node and all its incident edgesvoidremoveOutgoingEdges(T node) stream()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface LabeledEdgeManager
getPredNodes
-
Constructor Details
-
SlowSparseNumberedLabeledGraph
public SlowSparseNumberedLabeledGraph() -
SlowSparseNumberedLabeledGraph
-
-
Method Details
-
duplicate
- Returns:
- a graph with the same nodes and edges as g
-
copyInto
-
getEdgeManager
- Specified by:
getEdgeManagerin classAbstractNumberedLabeledGraph<T,U> - Returns:
- the object which manages edges in the graph
-
getNodeManager
- Specified by:
getNodeManagerin classAbstractNumberedGraph<T>- Returns:
- the object which manages nodes in the graph
-