Package eu.bandm.tools.graph
Class DominatorTree<V>
java.lang.Object
eu.bandm.tools.graph.DominatorTree<V>
- All Implemented Interfaces:
GraphModel<V>,RootedGraphModel<V>
Computes Dominator Forest. Caveat: naive implementation,
cf. Cooper, Harvey and Kennedy (2001).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends V> neighbours(V node) Return all nodes to which there is an edge from a given node.Collection<? extends V> roots()
-
Constructor Details
-
DominatorTree
-
-
Method Details
-
roots
- Specified by:
rootsin interfaceRootedGraphModel<V>
-
neighbours
Description copied from interface:GraphModelReturn all nodes to which there is an edge from a given node. The order of nodes may or may not be significant to the application; it is ignored by all algorithms in this package. Multiple occurrences of the same node may or may not imply multiple edges, depending on the context.A return value of
nullindicates that the given node object is not part of the graph covered by this graph model. A graph model is called closed iffneighbours(v).contains(w)impliesneighbours(w) != nullfor all node objectsv,w. All traversal algorithms require graph models to be closed.- Specified by:
neighboursin interfaceGraphModel<V>- Parameters:
node- a node- Returns:
- a read-only collection containing all neighbours of
node, ornullifnodeis not a node of the graph represented by this model.
-