Package ghidra.graph.algo
Class ChkPostDominanceAlgorithm<V,E extends GEdge<V>>
- java.lang.Object
-
- ghidra.graph.algo.ChkDominanceAlgorithm<V,E>
-
- ghidra.graph.algo.ChkPostDominanceAlgorithm<V,E>
-
- Type Parameters:
V
- the vertex typeE
- the edge type
public class ChkPostDominanceAlgorithm<V,E extends GEdge<V>> extends ChkDominanceAlgorithm<V,E>
This isChkDominanceAlgorithm
with reverse graph traversal, which allows the algorithm to calculate post dominance.
-
-
Constructor Summary
Constructors Constructor Description ChkPostDominanceAlgorithm(GDirectedGraph<V,E> g, TaskMonitor monitor)
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static <V,E extends GEdge<V>>
VunifySinks(MutableGDirectedGraphWrapper<V,E> graph, GraphNavigator<V,E> graphNavigator)
Converts multiple sink/exit nodes in a graph into a single sink of which those become parents.protected static <V,E extends GEdge<V>>
VunifySources(MutableGDirectedGraphWrapper<V,E> graph, GraphNavigator<V,E> graphNavigator)
Converts multiple source/root nodes in a graph into a single source of which those become children.-
Methods inherited from class ghidra.graph.algo.ChkDominanceAlgorithm
clear, getDominanceTree, getDominated, getDominators
-
-
-
-
Constructor Detail
-
ChkPostDominanceAlgorithm
public ChkPostDominanceAlgorithm(GDirectedGraph<V,E> g, TaskMonitor monitor) throws CancelledException
Constructor.- Parameters:
g
- the graphmonitor
- the monitor- Throws:
CancelledException
- if the algorithm is cancelled
-
-
Method Detail
-
unifySources
protected static <V,E extends GEdge<V>> V unifySources(MutableGDirectedGraphWrapper<V,E> graph, GraphNavigator<V,E> graphNavigator)
Converts multiple source/root nodes in a graph into a single source of which those become children.- Parameters:
graph
- the graphgraphNavigator
- the navigator to determine graph direction- Returns:
- the new single source
- Throws:
java.lang.IllegalArgumentException
- if there is not at least one source node in the graph
-
unifySinks
protected static <V,E extends GEdge<V>> V unifySinks(MutableGDirectedGraphWrapper<V,E> graph, GraphNavigator<V,E> graphNavigator)
Converts multiple sink/exit nodes in a graph into a single sink of which those become parents.- Parameters:
graph
- the graphgraphNavigator
- the navigator to determine graph direction- Returns:
- the new single sink
- Throws:
java.lang.IllegalArgumentException
- if there is not at least one sink node in the graph
-
-