- java.lang.Object
-
- org.jgrapht.alg.planar.BoyerMyrvoldPlanarityInspector.Edge
-
- Enclosing class:
- BoyerMyrvoldPlanarityInspector<V,E>
private class BoyerMyrvoldPlanarityInspector.Edge extends java.lang.Object
Internal representation of the edges of the inputgraph
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
embedded
Whether the edge is embedded or not.(package private) E
graphEdge
The counterpart of this edge in thegraph
.(package private) boolean
shortCircuit
Whether the edge is real or short-circuit.(package private) int
sign
Either $+1$ or $-1$ for regular and inverted edges respectively.(package private) BoyerMyrvoldPlanarityInspector.Node
source
The source node of this edge.(package private) BoyerMyrvoldPlanarityInspector.Node
target
The target of this edge
-
Constructor Summary
Constructors Constructor Description Edge(E graphEdge, BoyerMyrvoldPlanarityInspector.Node source)
Creates a new tree edge.Edge(E graphEdge, BoyerMyrvoldPlanarityInspector.Node source, BoyerMyrvoldPlanarityInspector.Node target)
Creates a new edge.Edge(BoyerMyrvoldPlanarityInspector.Node source, BoyerMyrvoldPlanarityInspector.Node target)
Creates a new short-circuit edge with no counterpart ingraph
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) BoyerMyrvoldPlanarityInspector.Node
getOpposite(BoyerMyrvoldPlanarityInspector.Node node)
Returns the opposite node of thenode
(package private) boolean
isIncidentTo(BoyerMyrvoldPlanarityInspector.Node node)
True if this edge is incident to the nodenode
, false otherwisejava.lang.String
toString()
-
-
-
Field Detail
-
graphEdge
E graphEdge
The counterpart of this edge in thegraph
. This value can be null if the edge was created as a short-circuit edge.
-
source
BoyerMyrvoldPlanarityInspector.Node source
The source node of this edge. For tree edges thesource
is lower than thetarget
, for back edges thetarget
is lower (having smaller height)
-
target
BoyerMyrvoldPlanarityInspector.Node target
The target of this edge
-
sign
int sign
Either $+1$ or $-1$ for regular and inverted edges respectively. This value is set to $-1$ to flip a biconnected component in $\mathcal{O}(1)$ time. Note: this operation doesn't flip any of the child biconnected components of this biconnected component
-
embedded
boolean embedded
Whether the edge is embedded or not. This value is important for
-
shortCircuit
boolean shortCircuit
Whether the edge is real or short-circuit. See the original paper for the definition of the short-circuit edges.
-
-
Constructor Detail
-
Edge
Edge(BoyerMyrvoldPlanarityInspector.Node source, BoyerMyrvoldPlanarityInspector.Node target)
Creates a new short-circuit edge with no counterpart ingraph
. Thesource
of this edge is always a real node on the boundary of some biconnected component, and thetarget
node is the parent node of the biconnected component the source node belongs to, so the edge resembles a regular back edge except for that it doesn't have a counterpart in thegraph
- Parameters:
source
- the source of the short-circuit edgetarget
- the target of the short-circuit edge
-
Edge
Edge(E graphEdge, BoyerMyrvoldPlanarityInspector.Node source)
Creates a new tree edge.- Parameters:
graphEdge
- the counterpart of this edge in thegraph
source
- the source node of this edge
-
Edge
Edge(E graphEdge, BoyerMyrvoldPlanarityInspector.Node source, BoyerMyrvoldPlanarityInspector.Node target)
Creates a new edge. This constructor is used directly for the creation of the back edges- Parameters:
graphEdge
- the counterpart of this edge in thegraph
source
- the source node of this edgetarget
- the target node of this edge
-
-
Method Detail
-
isIncidentTo
boolean isIncidentTo(BoyerMyrvoldPlanarityInspector.Node node)
True if this edge is incident to the nodenode
, false otherwise- Parameters:
node
- the node to test- Returns:
- true if this edge is incident to the node
node
, false otherwise
-
getOpposite
BoyerMyrvoldPlanarityInspector.Node getOpposite(BoyerMyrvoldPlanarityInspector.Node node)
Returns the opposite node of thenode
- Parameters:
node
- an endpoint of this edge- Returns:
- the other endpoint of this edge
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-