java.lang.Object
org.jgrapht.alg.planar.BoyerMyrvoldPlanarityInspector.Edge
- Enclosing class:
BoyerMyrvoldPlanarityInspector<V,
E>
Internal representation of the edges of the input
graph
.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
Whether the edge is embedded or not.(package private) E
The counterpart of this edge in thegraph
.(package private) boolean
Whether the edge is real or short-circuit.(package private) int
Either $+1$ or $-1$ for regular and inverted edges respectively.(package private) BoyerMyrvoldPlanarityInspector<V,
E>.Node The source node of this edge.(package private) BoyerMyrvoldPlanarityInspector<V,
E>.Node The target of this edge -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new tree edge.Edge
(E graphEdge, BoyerMyrvoldPlanarityInspector<V, E>.Node source, BoyerMyrvoldPlanarityInspector<V, E>.Node target) Creates a new edge.Edge
(BoyerMyrvoldPlanarityInspector<V, E>.Node source, BoyerMyrvoldPlanarityInspector<V, E>.Node target) Creates a new short-circuit edge with no counterpart ingraph
. -
Method Summary
Modifier and TypeMethodDescription(package private) BoyerMyrvoldPlanarityInspector<V,
E>.Node Returns the opposite node of thenode
(package private) boolean
True if this edge is incident to the nodenode
, false otherwisetoString()
-
Field Details
-
graphEdge
E graphEdgeThe counterpart of this edge in thegraph
. This value can be null if the edge was created as a short-circuit edge. -
source
BoyerMyrvoldPlanarityInspector<V,E>.Node sourceThe source node of this edge. For tree edges thesource
is lower than thetarget
, for back edges thetarget
is lower (having smaller height) -
target
BoyerMyrvoldPlanarityInspector<V,E>.Node targetThe target of this edge -
sign
int signEither $+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 embeddedWhether the edge is embedded or not. This value is important for -
shortCircuit
boolean shortCircuitWhether the edge is real or short-circuit. See the original paper for the definition of the short-circuit edges.
-
-
Constructor Details
-
Edge
Edge(BoyerMyrvoldPlanarityInspector<V, E>.Node source, BoyerMyrvoldPlanarityInspector<V, E>.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<V, E>.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<V, E>.Node source, BoyerMyrvoldPlanarityInspector<V, E>.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 Details
-
isIncidentTo
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
Returns the opposite node of thenode
- Parameters:
node
- an endpoint of this edge- Returns:
- the other endpoint of this edge
-
toString
-