GEOS
3.9.1dev
|
A sorted collection of DirectedEdge which leave a Node in a PlanarGraph. More...
#include <DirectedEdgeStar.h>
Public Member Functions | |
DirectedEdgeStar () | |
Constructs a DirectedEdgeStar with no edges. More... | |
virtual | ~DirectedEdgeStar () |
void | add (DirectedEdge *de) |
Adds a new member to this DirectedEdgeStar. More... | |
void | remove (DirectedEdge *de) |
Drops a member of this DirectedEdgeStar. More... | |
std::vector< DirectedEdge * >::iterator | iterator () |
Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis. More... | |
std::vector< DirectedEdge * >::iterator | begin () |
Returns an iterator to first DirectedEdge. More... | |
std::vector< DirectedEdge * >::iterator | end () |
Returns an iterator to one-past last DirectedEdge. More... | |
std::vector< DirectedEdge * >::const_iterator | begin () const |
Returns an const_iterator to first DirectedEdge. More... | |
std::vector< DirectedEdge * >::const_iterator | end () const |
Returns an const_iterator to one-past last DirectedEdge. More... | |
std::size_t | getDegree () const |
Returns the number of edges around the Node associated with this DirectedEdgeStar. More... | |
geom::Coordinate & | getCoordinate () const |
Returns the coordinate for the node at wich this star is based. More... | |
std::vector< DirectedEdge * > & | getEdges () |
Returns the DirectedEdges, in ascending order by angle with the positive x-axis. More... | |
int | getIndex (const Edge *edge) |
Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis. More... | |
int | getIndex (const DirectedEdge *dirEdge) |
Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis. More... | |
int | getIndex (int i) const |
Returns the remainder when i is divided by the number of edges in this DirectedEdgeStar. More... | |
DirectedEdge * | getNextEdge (DirectedEdge *dirEdge) |
Returns the DirectedEdge on the left-hand side of the given DirectedEdge (which must be a member of this DirectedEdgeStar). More... | |
Private Member Functions | |
void | sortEdges () const |
Private Attributes | |
std::vector< DirectedEdge * > | outEdges |
The underlying list of outgoing DirectedEdges. More... | |
bool | sorted |
A sorted collection of DirectedEdge which leave a Node in a PlanarGraph.
Definition at line 43 of file planargraph/DirectedEdgeStar.h.
|
inline |
Constructs a DirectedEdgeStar with no edges.
Definition at line 58 of file planargraph/DirectedEdgeStar.h.
|
inlinevirtual |
Definition at line 61 of file planargraph/DirectedEdgeStar.h.
void geos::planargraph::DirectedEdgeStar::add | ( | DirectedEdge * | de | ) |
Adds a new member to this DirectedEdgeStar.
Referenced by geos::planargraph::Node::addOutEdge().
std::vector<DirectedEdge*>::iterator geos::planargraph::DirectedEdgeStar::begin | ( | ) |
Returns an iterator to first DirectedEdge.
std::vector<DirectedEdge*>::const_iterator geos::planargraph::DirectedEdgeStar::begin | ( | ) | const |
Returns an const_iterator to first DirectedEdge.
std::vector<DirectedEdge*>::iterator geos::planargraph::DirectedEdgeStar::end | ( | ) |
Returns an iterator to one-past last DirectedEdge.
std::vector<DirectedEdge*>::const_iterator geos::planargraph::DirectedEdgeStar::end | ( | ) | const |
Returns an const_iterator to one-past last DirectedEdge.
geom::Coordinate& geos::planargraph::DirectedEdgeStar::getCoordinate | ( | ) | const |
Returns the coordinate for the node at wich this star is based.
|
inline |
Returns the number of edges around the Node associated with this DirectedEdgeStar.
Definition at line 99 of file planargraph/DirectedEdgeStar.h.
Referenced by geos::planargraph::Node::getDegree().
std::vector<DirectedEdge*>& geos::planargraph::DirectedEdgeStar::getEdges | ( | ) |
Returns the DirectedEdges, in ascending order by angle with the positive x-axis.
int geos::planargraph::DirectedEdgeStar::getIndex | ( | const Edge * | edge | ) |
Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis.
Referenced by geos::planargraph::Node::getIndex().
int geos::planargraph::DirectedEdgeStar::getIndex | ( | const DirectedEdge * | dirEdge | ) |
Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis.
int geos::planargraph::DirectedEdgeStar::getIndex | ( | int | i | ) | const |
Returns the remainder when i is divided by the number of edges in this DirectedEdgeStar.
DirectedEdge* geos::planargraph::DirectedEdgeStar::getNextEdge | ( | DirectedEdge * | dirEdge | ) |
Returns the DirectedEdge on the left-hand side of the given DirectedEdge (which must be a member of this DirectedEdgeStar).
|
inline |
Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis.
Definition at line 78 of file planargraph/DirectedEdgeStar.h.
void geos::planargraph::DirectedEdgeStar::remove | ( | DirectedEdge * | de | ) |
Drops a member of this DirectedEdgeStar.
|
private |
|
mutableprivate |
The underlying list of outgoing DirectedEdges.
Definition at line 50 of file planargraph/DirectedEdgeStar.h.
|
mutableprivate |
Definition at line 51 of file planargraph/DirectedEdgeStar.h.