GEOS  3.9.1dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::planargraph::DirectedEdgeStar Class Reference

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::CoordinategetCoordinate () 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...
 
DirectedEdgegetNextEdge (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
 

Detailed Description

A sorted collection of DirectedEdge which leave a Node in a PlanarGraph.

Definition at line 43 of file planargraph/DirectedEdgeStar.h.

Constructor & Destructor Documentation

geos::planargraph::DirectedEdgeStar::DirectedEdgeStar ( )
inline

Constructs a DirectedEdgeStar with no edges.

Definition at line 58 of file planargraph/DirectedEdgeStar.h.

virtual geos::planargraph::DirectedEdgeStar::~DirectedEdgeStar ( )
inlinevirtual

Definition at line 61 of file planargraph/DirectedEdgeStar.h.

Member Function Documentation

void geos::planargraph::DirectedEdgeStar::add ( DirectedEdge de)

Adds a new member to this DirectedEdgeStar.

Referenced by geos::planargraph::Node::addOutEdge().

Here is the caller graph for this function:

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.

std::size_t geos::planargraph::DirectedEdgeStar::getDegree ( ) const
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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).

std::vector<DirectedEdge*>::iterator geos::planargraph::DirectedEdgeStar::iterator ( )
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.

void geos::planargraph::DirectedEdgeStar::sortEdges ( ) const
private

Member Data Documentation

std::vector<DirectedEdge*> geos::planargraph::DirectedEdgeStar::outEdges
mutableprivate

The underlying list of outgoing DirectedEdges.

Definition at line 50 of file planargraph/DirectedEdgeStar.h.

bool geos::planargraph::DirectedEdgeStar::sorted
mutableprivate

Definition at line 51 of file planargraph/DirectedEdgeStar.h.


The documentation for this class was generated from the following file: