| java.lang.Object org.geotools.graph.traverse.basic.AbstractGraphIterator org.geotools.graph.traverse.standard.BreadthFirstTopologicalIterator
All known Subclasses: org.geotools.graph.traverse.standard.DepthFirstTopologicalIterator,
BreadthFirstTopologicalIterator | public class BreadthFirstTopologicalIterator extends AbstractGraphIterator (Code) | | Iterates over the nodes of a graph in Breadth First Topological Sort
pattern. The following is an illustration of the iteration.
Initially all nodes of degree less than two are active
(ready to be visited). As nodes are visited, a node can become active
when all but one of its related nodes have been visited (
degree = counter + 1). When a node becomes active it is placed into the
active node queue (queue of nodes to be visited).
The Breadth First Topological iterator places
nodes into the queue in First In First Out order.
To determine when a node is to become active the iterator uses the counter
associated with each node. If these counters are modified by an entity
other then the iterator, the iteration may be affected in undefined ways.
author: Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net |
buildQueue | protected Queue buildQueue(Graph graph)(Code) | | Builds the active node queue.
Parameters: graph - The Graph whose components are being iterated over. A first in first out queue |
|
|