public class NoBifurcationIterator extends SourceGraphIterator
Constructor and Description |
---|
NoBifurcationIterator() |
Modifier and Type | Method and Description |
---|---|
void |
cont(Graphable current,
GraphTraversal traversal)
Searches for the next node to be returned in the iteration.
|
void |
init(Graph graph,
GraphTraversal traversal)
Does nothing.
|
void |
killBranch(Graphable current,
GraphTraversal traversal)
Kills the current branch of the iteration by explicitly setting the next node to be returned
to null.
|
Graphable |
next(GraphTraversal traversal)
The next node in the iteration is the first node found adjacent to the current node that is
non visited and of degree less than 2.
|
void |
setSource(Graphable source)
Sets the source of the traversal.
|
getSource
getGraph, getTraversal, getWalker, setTraversal
public void init(Graph graph, GraphTraversal traversal)
graph
- The graph being whose components are being iterated over.GraphIterator#init(Graph)
public void setSource(Graphable source)
setSource
in class SourceGraphIterator
source
- node of degree less than or equal 2IllegalStateException
SourceGraphIterator.setSource(Graphable)
public Graphable next(GraphTraversal traversal)
org.geotools.graph.traverse.GraphIterator#next()
public void cont(Graphable current, GraphTraversal traversal)
current
- The current component of the traversal.org.geotools.graph.traverse.GraphIterator#cont(Graphable)
public void killBranch(Graphable current, GraphTraversal traversal)
current
- The current component of the traversal.org.geotools.graph.traverse.GraphIterator#killBranch(Graphable)
Copyright © 1996–2019 Geotools. All rights reserved.