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.Node
current
The node this circulator will return nextprivate BoyerMyrvoldPlanarityInspector.Node
prev
The 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.Edge
edgeToNext()
Returns an edge connecting previously returned node with node, which will be returned next.(package private) BoyerMyrvoldPlanarityInspector.Node
getCurrent()
Returns the node this circulator has just traversed(package private) 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.boolean
hasNext()
BoyerMyrvoldPlanarityInspector.Node
next()
private BoyerMyrvoldPlanarityInspector.Node
toExistingNode(BoyerMyrvoldPlanarityInspector.Node node)
Returns eithernode
or its real counterpart in the case thenode
is a component root.java.lang.String
toString()
-
-
-
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. Theprev
node 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:
hasNext
in interfacejava.util.Iterator<BoyerMyrvoldPlanarityInspector.Node>
-
next
public BoyerMyrvoldPlanarityInspector.Node next()
- Specified by:
next
in 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 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-