Package com.ibm.wala.util.graph.impl
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:
SimpleDemandPointerFlowGraph
public class SlowSparseNumberedGraph<T> extends AbstractNumberedGraph<T> implements Serializable
A graph of numbered nodes, expected to have a fairly sparse edge structure.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SlowSparseNumberedGraph()
SlowSparseNumberedGraph(int normalOutCount)
If normalOutCount == n, this edge manager will eagerly allocated n words to hold out edges for each node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> void
copyInto(Graph<T> g, Graph<T> into)
static <T> SlowSparseNumberedGraph<T>
duplicate(Graph<T> g)
NumberedEdgeManager<T>
getEdgeManager()
NumberedNodeManager<T>
getNodeManager()
static <T> SlowSparseNumberedGraph<T>
make()
-
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, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, 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
-
-
-
-
Constructor Detail
-
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 Detail
-
getNodeManager
public NumberedNodeManager<T> getNodeManager()
- Specified by:
getNodeManager
in classAbstractNumberedGraph<T>
- Returns:
- the object which manages nodes in the graph
-
getEdgeManager
public NumberedEdgeManager<T> getEdgeManager()
- Specified by:
getEdgeManager
in classAbstractNumberedGraph<T>
- Returns:
- the object which manages edges in the graph
-
duplicate
public static <T> SlowSparseNumberedGraph<T> duplicate(Graph<T> g)
- Returns:
- a graph with the same nodes and edges as g
-
make
public static <T> SlowSparseNumberedGraph<T> make()
-
-