Module org.jgrapht.core
Package org.jgrapht.alg.planar
Class BoyerMyrvoldPlanarityInspector.OuterFaceCirculator
- java.lang.Object
-
- org.jgrapht.alg.planar.BoyerMyrvoldPlanarityInspector.OuterFaceCirculator
-
- All Implemented Interfaces:
java.util.Iterator<BoyerMyrvoldPlanarityInspector.Node>
- Enclosing class:
- BoyerMyrvoldPlanarityInspector<V,E>
private class BoyerMyrvoldPlanarityInspector.OuterFaceCirculator extends java.lang.Object implements java.util.Iterator<BoyerMyrvoldPlanarityInspector.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
Fields Modifier and Type Field Description private BoyerMyrvoldPlanarityInspector.NodecurrentThe node this circulator will return nextprivate BoyerMyrvoldPlanarityInspector.NodeprevThe previous node along the traversal of the component boundary.
-
Constructor Summary
Constructors Constructor Description OuterFaceCirculator(BoyerMyrvoldPlanarityInspector.Node current, BoyerMyrvoldPlanarityInspector.Node prev)Creates a new instance of the circulator over the biconnected component boundary nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) BoyerMyrvoldPlanarityInspector.EdgeedgeToNext()Returns an edge connecting previously returned node with node, which will be returned next.(package private) BoyerMyrvoldPlanarityInspector.NodegetCurrent()Returns the node this circulator has just traversed(package private) BoyerMyrvoldPlanarityInspector.NodegetPrev()Returns a node adjacent to the current node along the boundary, which is not equal to the next node along the traversal.booleanhasNext()BoyerMyrvoldPlanarityInspector.Nodenext()private BoyerMyrvoldPlanarityInspector.NodetoExistingNode(BoyerMyrvoldPlanarityInspector.Node node)Returns eithernodeor its real counterpart in the case thenodeis a component root.java.lang.StringtoString()
-
-
-
Field Detail
-
current
private BoyerMyrvoldPlanarityInspector.Node current
The node this circulator will return next
-
prev
private BoyerMyrvoldPlanarityInspector.Node 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 Detail
-
OuterFaceCirculator
OuterFaceCirculator(BoyerMyrvoldPlanarityInspector.Node current, BoyerMyrvoldPlanarityInspector.Node prev)
Creates a new instance of the circulator over the biconnected component boundary nodes. Theprevnode is considered to be just traversed- Parameters:
current- the node this circulator will return nextprev- the previous node along the traversal
-
-
Method Detail
-
hasNext
public boolean hasNext()
Always returns true since this is a circulator
- Specified by:
hasNextin interfacejava.util.Iterator<BoyerMyrvoldPlanarityInspector.Node>
-
next
public BoyerMyrvoldPlanarityInspector.Node next()
- Specified by:
nextin interfacejava.util.Iterator<BoyerMyrvoldPlanarityInspector.Node>
-
edgeToNext
BoyerMyrvoldPlanarityInspector.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.Node getCurrent()
Returns the node this circulator has just traversed- Returns:
- the node this circulator has just traversed
-
getPrev
BoyerMyrvoldPlanarityInspector.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.Node toExistingNode(BoyerMyrvoldPlanarityInspector.Node node)
Returns eithernodeor its real counterpart in the case thenodeis a component root.- Parameters:
node- the input argument- Returns:
- the real counterpath of the
node
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-