com.phoenixst.plexus.algorithms
public class DepthFirstForestView extends AbstractDepthFirstForestView
Graph
.
This implementation tracks discovery time and finishing time,
and can possibly answer a few structural questions about the
underlying Graph
. Whether or not these questions can
be answered depends upon whether the supplied
Traverser
predicate or factory is direction
agnostic. If at least one encountered edge can be traversed
in only one direction, then many structural queries cannot be
answered by this class, and will throw exceptions. The only
exception is in the case of self-loops; these may only be
traversed in one direction with no ill effect. These cases are
documented in the appropriate methods.
If the underlying Graph
changes, this view may
become invalid, but perhaps not detectably so.
Since: 1.0
Version: $Revision: 1.15 $
Constructor Summary | |
---|---|
DepthFirstForestView(Graph graph, Predicate traverserPredicate)
Creates a new DepthFirstForestView . | |
DepthFirstForestView(Graph graph, Transformer traverserFactory)
Creates a new DepthFirstForestView . |
Method Summary | |
---|---|
Collection | rootNodes()
Returns a list of the root nodes for this depth-first
traversal in the order encountered.
|
DepthFirstForestView
.DepthFirstForestView
.Description copied from interface: OrientedForest
{@inheritDoc }