|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractGraphIterator
SourceGraphIterator
NoBifurcationIterator
public class NoBifurcationIterator
Iterates over the nodes of a graph starting from a specified node, stopping
at a bifurcation. A bifurcation is defined as a node of degree > 2.
The following figures illustrate examples of the iterator.
modules/extension/graph (gt-graph.jar)
Constructor Summary | |
---|---|
NoBifurcationIterator()
|
Method Summary | |
---|---|
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. |
Methods inherited from class SourceGraphIterator |
---|
getSource |
Methods inherited from class AbstractGraphIterator |
---|
getGraph, getTraversal, getWalker, setTraversal |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoBifurcationIterator()
Method Detail |
---|
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 2
IllegalStateException
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |