List of all members.
Static Public Member Functions |
static< TextendsIGraphNode< T >
HashMap< T, ArrayList< T > > | getBackEdges (final IDirectedGraph< T,?> graph, final T rootNode) throws MalformedGraphException |
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 |
static
< NodeTypeextendsIGraphNode
< NodeType > Set< NodeType > | getLoopNodes (final NodeType srcNode, final NodeType dstNode) |
static
< NodeTypeextendsIGraphNode
< NodeType > Set< NodeType > | getPredecessors (final NodeType node) |
static
< NodeTypeextendsIGraphNode
< NodeType > Set< NodeType > | getSuccessors (final NodeType node) |
Detailed Description
Provides a few standard graph algorithms that might be useful when working with graphs.
Member Function Documentation
static <TextendsIGraphNode<T> HashMap<T, ArrayList<T> > com.google.security.zynamics.binnavi.API.helpers.GraphAlgorithms.getBackEdges |
( |
final IDirectedGraph< T,?> |
graph, |
|
|
final T |
rootNode | |
|
) |
| | throws MalformedGraphException [static] |
Calculates the back edges of the current graph.
- Parameters:
-
| graph | The input graph. |
| rootNode | The root node of the graph. |
- Returns:
- A HashMap which contains the relation of nodes and their respective back edges.
- Exceptions:
-
static <TextendsIGraphNode<T> Tree<T> com.google.security.zynamics.binnavi.API.helpers.GraphAlgorithms.getDominatorTree |
( |
final IDirectedGraph< T,?> |
graph, |
|
|
final T |
rootNode, |
|
|
final HashMap< T, ITreeNode< T >> |
mapping | |
|
) |
| | throws MalformedGraphException [static] |
- Parameters:
-
| 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. |
- Returns:
- The generated dominator tree.
- Exceptions:
-
static <TextendsIGraphNode<T> ArrayList<Set<T> > com.google.security.zynamics.binnavi.API.helpers.GraphAlgorithms.getGraphLoops |
( |
final IDirectedGraph< T,?> |
graph |
) |
throws MalformedGraphException [static] |
Calculates the loops contained in a graph.
- Parameters:
-
- Returns:
- A List of Sets where each set contains the nodes of one loop.
- Exceptions:
-
static <NodeTypeextendsIGraphNode<NodeType> Set<NodeType> com.google.security.zynamics.binnavi.API.helpers.GraphAlgorithms.getLoopNodes |
( |
final NodeType |
srcNode, |
|
|
final NodeType |
dstNode | |
|
) |
| | [static] |
Gets the nodes of a loop
- Parameters:
-
| 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. |
- Returns:
- The Set of nodes which belong to the loop.
static <NodeTypeextendsIGraphNode<NodeType> Set<NodeType> com.google.security.zynamics.binnavi.API.helpers.GraphAlgorithms.getPredecessors |
( |
final NodeType |
node |
) |
[static] |
Returns all predecessors of a graph node.
- Parameters:
-
| node | The node which is the starting point of the predecessor search. |
- Returns:
- The predecessors of the node in the graph.
static <NodeTypeextendsIGraphNode<NodeType> Set<NodeType> com.google.security.zynamics.binnavi.API.helpers.GraphAlgorithms.getSuccessors |
( |
final NodeType |
node |
) |
[static] |
Returns all successors of a graph node.
- Parameters:
-
| node | The node which is the starting point of the successor search. |
- Returns:
- The successors of the node in the graph.