#include <Planar.h>
Public Member Functions | |
PlanarVertex () | |
~PlanarVertex () | |
int | getNumEdges () |
PlanarEdge * | getEdge (int id) |
void | setEdgesCCW (PlanarEdge **ccw, int nEdges) |
int | getEdgeID (PlanarEdge *e) |
Friends | |
class | PlanarEdge |
PlanarVertex is the central data structure in order to describe the algebraic embedding of planar graph's vertices.
To every PlanarVertex, there exists a set of planar edges that leaves resp. enters this vertex. Since the vertex is embedded in a planar graph, the edges form a star-like structure. By defining one "first edge", all edges can be ordered in a counter-clock-wise sense. This order is also known as an algebraic embedding.
This class handles this structure as comfortable as possible. In order to efficiently obtain this edge ID, an additional data element in PlanarEdge is directly used by methods of PlanarVertex. This is the reason for the "friend" relationship between PlanarEdge and PlanarVertex.
PlanarVertex::PlanarVertex | ( | ) |
the constructor builds a PlanarVertex with no outgoing or incoming edges.
PlanarVertex::~PlanarVertex | ( | ) |
the destructor deletes only the references on stored planar edges.
|
inline |
provides the number of stored edges.
Referenced by CutPlanar::performChecks().
|
inline |
returns the edge with the ID id
. This method provides also the correct result if id<0
or id>getNumEdges()-1
.
Example: If four edges are stored, the following three getEdge-lines will all return the first stored edge:
Referenced by CutPlanar::performChecks(), and CutPlanar::preFlow().
|
inline |
the edges of the vertex are defined by the nEdges
references that are stored in ccw
. The edges in ccw
have to be provided in a counter-clockwise order. Additionally, in the PlanarEdge *ccw
[i] the ID i
is stored as its tail resp. head edge ID.
References PlanarEdge::getHead(), and PlanarEdge::getTail().
Referenced by CutGrid::CutGrid(), and CutShape::setDissimilarityMatrix().
|
inline |
provides the edge ID that the edge reference e
has in the counter-clockwise array of the current PlanarVertex. If the edge is not adjacent to the PlanarVertex, the method returns -1
.
References PlanarEdge::getHead(), and PlanarEdge::getTail().
|
friend |