Class SlowSparseNumberedGraph<T>
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<T>
com.ibm.wala.util.graph.AbstractNumberedGraph<T>
com.ibm.wala.util.graph.impl.SlowSparseNumberedGraph<T>
- All Implemented Interfaces:
EdgeManager<T>, Graph<T>, NodeManager<T>, NumberedEdgeManager<T>, NumberedGraph<T>, NumberedNodeManager<T>, Serializable, Iterable<T>
- Direct Known Subclasses:
RandomGraph, SimpleDemandPointerFlowGraph
A graph of numbered nodes, expected to have a fairly sparse edge structure.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSlowSparseNumberedGraph(int normalOutCount) If normalOutCount == n, this edge manager will eagerly allocated n words to hold out edges for each node. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidstatic <T> SlowSparseNumberedGraph<T> static <T> SlowSparseNumberedGraph<T> make()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, edgeString, 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) protected StringedgeString(T from, T to) 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, spliterator
-
Constructor Details
-
SlowSparseNumberedGraph
protected SlowSparseNumberedGraph() -
SlowSparseNumberedGraph
public SlowSparseNumberedGraph(int normalOutCount) If normalOutCount == n, this edge manager will eagerly allocated n words to hold out edges for each node. (performance optimization for time)- Parameters:
normalOutCount- what is the "normal" number of out edges for a node?
-
-
Method Details
-
getNodeManager
- Specified by:
getNodeManagerin classAbstractNumberedGraph<T>- Returns:
- the object which manages nodes in the graph
- See Also:
-
getEdgeManager
- Specified by:
getEdgeManagerin classAbstractNumberedGraph<T>- Returns:
- the object which manages edges in the graph
- See Also:
-
duplicate
- Returns:
- a graph with the same nodes and edges as g
-
copyInto
-
make
-