Package ghidra.graph

# Interface GImplicitDirectedGraph<V,E extends GEdge<V>>

Type Parameters:
  `V` - the type of vertices
  `E` - the type of edges

All Known Subinterfaces:
  `GDirectedGraph<V,E>`, `VisualGraph<V,E>`

All Known Implementing Classes:
  `AssemblyContextGraph`, `DefaultVisualGraph`, `FilteringVisualGraph`, `GroupingVisualGraph`, `JungDirectedGraph`, `JungDirectedVisualGraph`, `JungToGDirectedGraphAdapter`, `MutableGDirectedGraphWrapper`

public interface GImplicitDirectedGraph<V,E extends GEdge<V>>
A directed graph that need not be constructed explicitly

Instead, the graph is constructed (and usually cached) as it is explored. For instance, if a path searching algorithm is being applied, incident edges and neighboring nodes need not be computed if they're never visited. This allows conceptually large (even infinite) graphs to be represented. A graph algorithm can be applied so long as it supports this interface, and does not attempt to exhaust an infinite graph.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GDirectedGraph<V,E>`
  `copy()`
  Copy some portion of the implicit graph to an explicit graph Usually, this returns the cached (explored) portion of the graph
  `Collection<E>`
  `getInEdges(V v)`
  Compute the incident edges that end at the given vertex (Optional operation) NOTE: This method ought to return cached results if available NOTE: As part of computing in-edges, this method will also provide predecessors
  `Collection<E>`
  `getOutEdges(V v)`
  Compute the incident edges that start at the given vertex NOTE: This method ought to return cached results if available NOTE: As part of computing out-edges, this method will also provide successors
  `default Collection<V>`
  `getPredecessors(V v)`
  Compute a vertex's predecessors The default implementation computes this from the in-edges NOTE: If a non-default implementation is provided, it ought to return cached results if available
  `default Collection<V>`
  `getSuccessors(V v)`
  Compute a vertex's successors The default implementation compute this from the out-edges NOTE: If a non-default implementation is provided, it ought to return cached results if available

- ## Method Details

  - ### getInEdges

    Collection<E> getInEdges(V v)
    Compute the incident edges that end at the given vertex (Optional operation) NOTE: This method ought to return cached results if available NOTE: As part of computing in-edges, this method will also provide predecessors
    Parameters:
      `v` - the destination vertex
    Returns:
      the in-edges to the given vertex

  - ### getOutEdges

    Collection<E> getOutEdges(V v)
    Compute the incident edges that start at the given vertex NOTE: This method ought to return cached results if available NOTE: As part of computing out-edges, this method will also provide successors
    Parameters:
      `v` - the source vertex
    Returns:
      the out-edges from the given vertex

  - ### getPredecessors

    default Collection<V> getPredecessors(V v)
    Compute a vertex's predecessors The default implementation computes this from the in-edges NOTE: If a non-default implementation is provided, it ought to return cached results if available
    Parameters:
      `v` - the destination vertex
    Returns:
      the predecessors

  - ### getSuccessors

    default Collection<V> getSuccessors(V v)
    Compute a vertex's successors The default implementation compute this from the out-edges NOTE: If a non-default implementation is provided, it ought to return cached results if available
    Parameters:
      `v` - the source vertex
    Returns:
      the successors

  - ### copy

    GDirectedGraph<V,E> copy()
    Copy some portion of the implicit graph to an explicit graph Usually, this returns the cached (explored) portion of the graph
    Returns:
      a "copy" of this implicit graph