Standard graph algorithms. More...
Static Public Member Functions | |
| static< TextendsIGraphNode< T > HashMap< T, ArrayList< T > > | getBackEdges (final IDirectedGraph< T,?> graph, final T rootNode) throws MalformedGraphException |
| Calculates the back edges of the current graph. | |
| static< TextendsIGraphNode< T > Tree< T > | getDominatorTree (final IDirectedGraph< T,?> graph, final T rootNode, final HashMap< T, ITreeNode< T >> mapping) throws MalformedGraphException |
| static< TextendsIGraphNode< T > ArrayList< Set< T > > | getGraphLoops (final IDirectedGraph< T,?> graph) throws MalformedGraphException |
| Calculates the loops contained in a graph. | |
| static < NodeTypeextendsIGraphNode < NodeType > Set< NodeType > | getLoopNodes (final NodeType srcNode, final NodeType dstNode) |
| Gets the nodes of a loop. | |
| static < NodeTypeextendsIGraphNode < NodeType > Set< NodeType > | getPredecessors (final NodeType node) |
| Returns the predecessors of a graph node. | |
| static < NodeTypeextendsIGraphNode < NodeType > Set< NodeType > | getSuccessors (final NodeType node) |
| Returns the successors of a graph node. | |
Provides a few standard graph algorithms that might be useful when working with graphs.
| static <TextendsIGraphNode<T> HashMap<T, ArrayList<T> > BinNavi.API.helpers.GraphAlgorithms.getBackEdges | ( | final IDirectedGraph< T,?> | graph, | |
| final T | rootNode | |||
| ) | throws MalformedGraphException [static] |
Calculates the back edges of the current graph.
| graph | The input graph. | |
| rootNode | The root node of the graph. |
| MalformedGraphException | Thrown if the graph has more then one entry node. |
| static <TextendsIGraphNode<T> Tree<T> BinNavi.API.helpers.GraphAlgorithms.getDominatorTree | ( | final IDirectedGraph< T,?> | graph, | |
| final T | rootNode, | |||
| final HashMap< T, ITreeNode< T >> | mapping | |||
| ) | throws MalformedGraphException [static] |
| graph | The input graph. | |
| rootNode | The root node of the graph. | |
| mapping | Output parameter which will contain the mapping between API object and internal TreeType. |
| MalformedGraphException |
| static <TextendsIGraphNode<T> ArrayList<Set<T> > BinNavi.API.helpers.GraphAlgorithms.getGraphLoops | ( | final IDirectedGraph< T,?> | graph | ) | throws MalformedGraphException [static] |
Calculates the loops contained in a graph.
| graph | the input graph |
| MalformedGraphException | Thrown if the graph has more than one entry node. |
| static <NodeTypeextendsIGraphNode<NodeType> Set<NodeType> BinNavi.API.helpers.GraphAlgorithms.getLoopNodes | ( | final NodeType | srcNode, | |
| final NodeType | dstNode | |||
| ) | [static] |
Gets the nodes of a loop
| srcNode | The source node of the loop where the back edge originates from. | |
| dstNode | The destination node of the loop where the back edge points to. |
| static <NodeTypeextendsIGraphNode<NodeType> Set<NodeType> BinNavi.API.helpers.GraphAlgorithms.getPredecessors | ( | final NodeType | node | ) | [static] |
Returns all predecessors of a graph node.
| node | The node which is the starting point of the predecessor search. |
| static <NodeTypeextendsIGraphNode<NodeType> Set<NodeType> BinNavi.API.helpers.GraphAlgorithms.getSuccessors | ( | final NodeType | node | ) | [static] |
Returns all successors of a graph node.
| node | The node which is the starting point of the successor search. |
1.7.1