Package ghidra.util.graph
Class DependencyGraph<T>
- java.lang.Object
-
- ghidra.util.graph.AbstractDependencyGraph<T>
-
- ghidra.util.graph.DependencyGraph<T>
-
- Type Parameters:
T
- the type of value. This class uses the values as keys in HashSets, so the value type must be meet the equals() and hashCode() requirements for hashing.
public class DependencyGraph<T> extends AbstractDependencyGraph<T>
Original Dependency Graph implementation that usesHashMap
s andHashSet
s. Side affect of these is that data pulled from the graph (AbstractDependencyGraph.pop()
) is not performed in a deterministic order. However, load time for the graph is O(1).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ghidra.util.graph.AbstractDependencyGraph
AbstractDependencyGraph.DependencyNode
-
-
Field Summary
-
Fields inherited from class ghidra.util.graph.AbstractDependencyGraph
nodeMap, unvisitedIndependentSet
-
-
Constructor Summary
Constructors Constructor Description DependencyGraph()
DependencyGraph(DependencyGraph<T> other)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencyGraph<T>
copy()
Returns a copy of this graph.protected java.util.Set<AbstractDependencyGraph.DependencyNode>
createDependencyNodeSet()
Creates the Set ofAbstractDependencyGraph.DependencyNode
s appropriate for the implementer.protected java.util.Map<T,AbstractDependencyGraph.DependencyNode>
createNodeMap()
Creates the Map of Nodes toAbstractDependencyGraph.DependencyNode
s appropriate for the implementer.protected java.util.Set<T>
createNodeSet()
Creates the Set of Nodes appropriate for the implementer.java.util.Set<T>
getNodeMapValues()
Returns the set of values in this graph.-
Methods inherited from class ghidra.util.graph.AbstractDependencyGraph
addDependency, addValue, contains, getAllIndependentValues, getDependentValues, getNodeMap, getUnvisitedIndependentValues, getValues, hasCycles, hasUnVisitedIndependentValues, isEmpty, pop, remove, size
-
-
-
-
Constructor Detail
-
DependencyGraph
public DependencyGraph()
-
DependencyGraph
public DependencyGraph(DependencyGraph<T> other)
Copy constructor- Parameters:
other
- the other DependencyGraph to copy
-
-
Method Detail
-
copy
public DependencyGraph<T> copy()
Description copied from class:AbstractDependencyGraph
Returns a copy of this graph.- Specified by:
copy
in classAbstractDependencyGraph<T>
- Returns:
- a copy of this graph.
-
createNodeMap
protected java.util.Map<T,AbstractDependencyGraph.DependencyNode> createNodeMap()
Description copied from class:AbstractDependencyGraph
Creates the Map of Nodes toAbstractDependencyGraph.DependencyNode
s appropriate for the implementer.- Specified by:
createNodeMap
in classAbstractDependencyGraph<T>
- Returns:
- a new Map of Nodes to
AbstractDependencyGraph.DependencyNode
s.
-
createNodeSet
protected java.util.Set<T> createNodeSet()
Description copied from class:AbstractDependencyGraph
Creates the Set of Nodes appropriate for the implementer.- Specified by:
createNodeSet
in classAbstractDependencyGraph<T>
- Returns:
- a new Set of Nodes.
-
createDependencyNodeSet
protected java.util.Set<AbstractDependencyGraph.DependencyNode> createDependencyNodeSet()
Description copied from class:AbstractDependencyGraph
Creates the Set ofAbstractDependencyGraph.DependencyNode
s appropriate for the implementer.- Specified by:
createDependencyNodeSet
in classAbstractDependencyGraph<T>
- Returns:
- a new Set of
AbstractDependencyGraph.DependencyNode
s.
-
getNodeMapValues
public java.util.Set<T> getNodeMapValues()
Description copied from class:AbstractDependencyGraph
Returns the set of values in this graph.- Specified by:
getNodeMapValues
in classAbstractDependencyGraph<T>
- Returns:
- the set of values in this graph.
-
-