Package ghidra.graph
Interface GImplicitDirectedGraph<V,E extends GEdge<V>>
-
- Type Parameters:
V
- the type of verticesE
- 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 explicitlyInstead, 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
All Methods Instance Methods Abstract Methods Default Methods 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 graphjava.util.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 predecessorsjava.util.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 successorsdefault java.util.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 availabledefault java.util.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 Detail
-
getInEdges
java.util.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
java.util.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 java.util.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 java.util.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
-
-