Package ghidra.util.graph
Class DeterministicDependencyGraph<T>
java.lang.Object
ghidra.util.graph.AbstractDependencyGraph<T>
ghidra.util.graph.DeterministicDependencyGraph<T>
- Type Parameters:
T- the type of value.
Dependency Graph that uses
TreeMaps and ListOrderedSets to provide
determinism in pulling (AbstractDependencyGraph.pop()) from the graph. This class seems to consume more
memory than DependencyGraph, and if memory is not an issue, it also seems to be
slightly faster as well.
This class was implemented to provide determinism while doing developmental debugging.
- See Also:
-
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
ConstructorsConstructorDescriptionCopy constructor -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this graph.protected Set<AbstractDependencyGraph<T>.DependencyNode> Creates the Set ofAbstractDependencyGraph<T>.DependencyNodes appropriate for the implementer.protected Map<T, AbstractDependencyGraph<T>.DependencyNode> Creates the Map of Nodes toAbstractDependencyGraph<T>.DependencyNodes appropriate for the implementer.Creates the Set of Nodes appropriate for the implementer.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 Details
-
DeterministicDependencyGraph
public DeterministicDependencyGraph() -
DeterministicDependencyGraph
Copy constructor- Parameters:
other- the other DependencyGraph to copy
-
-
Method Details
-
copy
Description copied from class:AbstractDependencyGraphReturns a copy of this graph.- Specified by:
copyin classAbstractDependencyGraph<T>- Returns:
- a copy of this graph.
-
createNodeMap
Description copied from class:AbstractDependencyGraphCreates the Map of Nodes toAbstractDependencyGraph<T>.DependencyNodes appropriate for the implementer.- Specified by:
createNodeMapin classAbstractDependencyGraph<T>- Returns:
- a new Map of Nodes to
AbstractDependencyGraph<T>.DependencyNodes.
-
createNodeSet
Description copied from class:AbstractDependencyGraphCreates the Set of Nodes appropriate for the implementer.- Specified by:
createNodeSetin classAbstractDependencyGraph<T>- Returns:
- a new Set of Nodes.
-
createDependencyNodeSet
Description copied from class:AbstractDependencyGraphCreates the Set ofAbstractDependencyGraph<T>.DependencyNodes appropriate for the implementer.- Specified by:
createDependencyNodeSetin classAbstractDependencyGraph<T>- Returns:
- a new Set of
AbstractDependencyGraph<T>.DependencyNodes.
-
getNodeMapValues
Description copied from class:AbstractDependencyGraphReturns the set of values in this graph.- Specified by:
getNodeMapValuesin classAbstractDependencyGraph<T>- Returns:
- the set of values in this graph.
-