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.

public class DeterministicDependencyGraph<T> extends AbstractDependencyGraph<T>
Dependency Graph that uses `TreeMap`s and `ListOrderedSet`s 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:
  - `AbstractDependencyGraph`
  - `DependencyGraph`

- ## 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
  `DeterministicDependencyGraph()`
  `DeterministicDependencyGraph(DeterministicDependencyGraph<T> other)`
  Copy constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DeterministicDependencyGraph<T>`
  `copy()`
  Returns a copy of this graph.
  `protected Set<AbstractDependencyGraph<T>.DependencyNode>`
  `createDependencyNodeSet()`
  Creates the Set of `AbstractDependencyGraph<T>.DependencyNode`s appropriate for the implementer.
  `protected Map<T,AbstractDependencyGraph<T>.DependencyNode>`
  `createNodeMap()`
  Creates the Map of Nodes to `AbstractDependencyGraph<T>.DependencyNode`s appropriate for the implementer.
  `protected Set<T>`
  `createNodeSet()`
  Creates the Set of Nodes appropriate for the implementer.
  `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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DeterministicDependencyGraph

    public DeterministicDependencyGraph()

  - ### DeterministicDependencyGraph

    public DeterministicDependencyGraph(DeterministicDependencyGraph<T> other)
    Copy constructor
    Parameters:
      `other` - the other DependencyGraph to copy

- ## Method Details

  - ### copy

    public DeterministicDependencyGraph<T> copy()
    Description copied from class: `AbstractDependencyGraph`
    Returns a copy of this graph.
    Specified by:
      `copy` in class `AbstractDependencyGraph<T>`
    Returns:
      a copy of this graph.

  - ### createNodeMap

    protected Map<T,AbstractDependencyGraph<T>.DependencyNode> createNodeMap()
    Description copied from class: `AbstractDependencyGraph`
    Creates the Map of Nodes to `AbstractDependencyGraph<T>.DependencyNode`s appropriate for the implementer.
    Specified by:
      `createNodeMap` in class `AbstractDependencyGraph<T>`
    Returns:
      a new Map of Nodes to `AbstractDependencyGraph<T>.DependencyNode`s.

  - ### createNodeSet

    protected Set<T> createNodeSet()
    Description copied from class: `AbstractDependencyGraph`
    Creates the Set of Nodes appropriate for the implementer.
    Specified by:
      `createNodeSet` in class `AbstractDependencyGraph<T>`
    Returns:
      a new Set of Nodes.

  - ### createDependencyNodeSet

    protected Set<AbstractDependencyGraph<T>.DependencyNode> createDependencyNodeSet()
    Description copied from class: `AbstractDependencyGraph`
    Creates the Set of `AbstractDependencyGraph<T>.DependencyNode`s appropriate for the implementer.
    Specified by:
      `createDependencyNodeSet` in class `AbstractDependencyGraph<T>`
    Returns:
      a new Set of `AbstractDependencyGraph<T>.DependencyNode`s.

  - ### getNodeMapValues

    public Set<T> getNodeMapValues()
    Description copied from class: `AbstractDependencyGraph`
    Returns the set of values in this graph.
    Specified by:
      `getNodeMapValues` in class `AbstractDependencyGraph<T>`
    Returns:
      the set of values in this graph.