Class SparseNumberedGraph<T extends INodeWithNumber>
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<T>
com.ibm.wala.util.graph.AbstractNumberedGraph<T>
com.ibm.wala.util.graph.impl.SparseNumberedGraph<T>
- All Implemented Interfaces:
EdgeManager<T>
,Graph<T>
,NodeManager<T>
,NumberedEdgeManager<T>
,NumberedGraph<T>
,NumberedNodeManager<T>
,Iterable<T>
- Direct Known Subclasses:
AstTranslator.IncipientCFG
,MutableCFG
A graph of numbered nodes, expected to have a fairly sparse edge structure.
-
Constructor Summary
ConstructorDescriptionSparseNumberedGraph
(int normalCase) If normalCase == n, the s edge manager will eagerly allocated n words to hold out edges for each node.SparseNumberedGraph
(DelegatingNumberedNodeManager<T> nodeManager, SparseNumberedEdgeManager<T> edgeManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected NumberedEdgeManager
<T> protected NumberedNodeManager
<T> Methods inherited from class com.ibm.wala.util.graph.AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodes
Methods inherited from class com.ibm.wala.util.graph.AbstractGraph
addEdge, addNode, containsNode, edgeString, 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.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, stream
-
Constructor Details
-
SparseNumberedGraph
public SparseNumberedGraph() -
SparseNumberedGraph
public SparseNumberedGraph(int normalCase) If normalCase == n, the s edge manager will eagerly allocated n words to hold out edges for each node. (performance optimization for time)- Parameters:
normalCase
- what is the "normal" number of out edges for a node?
-
SparseNumberedGraph
public SparseNumberedGraph(DelegatingNumberedNodeManager<T> nodeManager, SparseNumberedEdgeManager<T> edgeManager)
-
-
Method Details
-
getNodeManager
- Specified by:
getNodeManager
in classAbstractNumberedGraph<T extends INodeWithNumber>
- Returns:
- the object which manages nodes in the graph
- See Also:
-
getEdgeManager
- Specified by:
getEdgeManager
in classAbstractNumberedGraph<T extends INodeWithNumber>
- Returns:
- the object which manages edges in the graph
- See Also:
-