Module org.jgrapht.core
Package org.jgrapht.alg.planar
Class BoyerMyrvoldPlanarityInspector.OuterFaceCirculator
java.lang.Object
org.jgrapht.alg.planar.BoyerMyrvoldPlanarityInspector.OuterFaceCirculator
- All Implemented Interfaces:
Iterator<BoyerMyrvoldPlanarityInspector<V,
E>.Node>
- Enclosing class:
BoyerMyrvoldPlanarityInspector<V,
E>
private class BoyerMyrvoldPlanarityInspector.OuterFaceCirculator
extends Object
implements Iterator<BoyerMyrvoldPlanarityInspector<V,E>.Node>
A circulator over the nodes on the boundary of the biconnected component. Traverses the nodes
in the cyclic manner, i.e. it doesn't stop when all the nodes are traversed
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BoyerMyrvoldPlanarityInspector<V,
E>.Node The node this circulator will return nextprivate BoyerMyrvoldPlanarityInspector<V,
E>.Node The previous node along the traversal of the component boundary. -
Constructor Summary
ConstructorsConstructorDescriptionOuterFaceCirculator
(BoyerMyrvoldPlanarityInspector<V, E>.Node current, BoyerMyrvoldPlanarityInspector<V, E>.Node prev) Creates a new instance of the circulator over the biconnected component boundary nodes. -
Method Summary
Modifier and TypeMethodDescription(package private) BoyerMyrvoldPlanarityInspector<V,
E>.Edge Returns an edge connecting previously returned node with node, which will be returned next.(package private) BoyerMyrvoldPlanarityInspector<V,
E>.Node Returns the node this circulator has just traversed(package private) BoyerMyrvoldPlanarityInspector<V,
E>.Node getPrev()
Returns a node adjacent to the current node along the boundary, which is not equal to the next node along the traversal.boolean
hasNext()
next()
private BoyerMyrvoldPlanarityInspector<V,
E>.Node Returns eithernode
or its real counterpart in the case thenode
is a component root.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
current
The node this circulator will return next -
prev
The previous node along the traversal of the component boundary. This node is needed because the component boundary nodes aren't connected in an ordered way.
-
-
Constructor Details
-
OuterFaceCirculator
OuterFaceCirculator(BoyerMyrvoldPlanarityInspector<V, E>.Node current, BoyerMyrvoldPlanarityInspector<V, E>.Node prev) Creates a new instance of the circulator over the biconnected component boundary nodes. Theprev
node is considered to be just traversed- Parameters:
current
- the node this circulator will return nextprev
- the previous node along the traversal
-
-
Method Details
-
hasNext
public boolean hasNext()Always returns true since this is a circulator
-
next
-
edgeToNext
BoyerMyrvoldPlanarityInspector<V,E>.Edge edgeToNext()Returns an edge connecting previously returned node with node, which will be returned next. If either of the mentioned nodes is virtual, the edge will be incident to its real counterpart.- Returns:
- an edge from the current node to the next node
-
getCurrent
BoyerMyrvoldPlanarityInspector<V,E>.Node getCurrent()Returns the node this circulator has just traversed- Returns:
- the node this circulator has just traversed
-
getPrev
BoyerMyrvoldPlanarityInspector<V,E>.Node getPrev()Returns a node adjacent to the current node along the boundary, which is not equal to the next node along the traversal. If the component consist of just one real node, returns the only neighbor the the current node.- Returns:
- node before the current node along the traversal
-
toExistingNode
private BoyerMyrvoldPlanarityInspector<V,E>.Node toExistingNode(BoyerMyrvoldPlanarityInspector<V, E>.Node node) Returns eithernode
or its real counterpart in the case thenode
is a component root.- Parameters:
node
- the input argument- Returns:
- the real counterpath of the
node
-
toString
-