geos::planargraph::Node Class Reference

A node in a PlanarGraph is a location where 0 or more Edge meet. More...

#include <Node.h>

Inheritance diagram for geos::planargraph::Node:

geos::planargraph::GraphComponent

List of all members.

Public Member Functions

 Node (const geom::Coordinate &newPt)
 Constructs a Node with the given location.
 Node (geom::Coordinate &newPt, DirectedEdgeStar *newDeStar)
 Constructs a Node with the given location and collection of outgoing DirectedEdges. Takes ownership of the given DirectedEdgeStar!!
geom::CoordinategetCoordinate ()
 Returns the location of this Node.
void addOutEdge (DirectedEdge *de)
 Adds an outgoing DirectedEdge to this Node.
DirectedEdgeStargetOutEdges ()
 Returns the collection of DirectedEdges that leave this Node.
const DirectedEdgeStargetOutEdges () const
size_t getDegree () const
 Returns the number of edges around this Node.
int getIndex (Edge *edge)
 Returns the zero-based index of the given Edge, after sorting in ascending order by angle with the positive x-axis.

Static Public Member Functions

static std::vector< Edge * > * getEdgesBetween (Node *node0, Node *node1)
 Returns all Edges that connect the two nodes (which are assumed to be different).

Protected Attributes

geom::Coordinate pt
 The location of this Node.
DirectedEdgeStardeStar
 The collection of DirectedEdges that leave this Node.

Friends

std::ostream & operator<< (std::ostream &os, const Node &)
 Print a Node.


Detailed Description

A node in a PlanarGraph is a location where 0 or more Edge meet.

A node is connected to each of its incident Edges via an outgoing DirectedEdge. Some clients using a PlanarGraph may want to subclass Node to add their own application-specific data and methods.


Member Function Documentation

static std::vector<Edge*>* geos::planargraph::Node::getEdgesBetween ( Node node0,
Node node1 
) [static]

Returns all Edges that connect the two nodes (which are assumed to be different).

Note: returned vector is newly allocated, ownership to the caller.


The documentation for this class was generated from the following file:
Generated on Fri Mar 27 04:54:01 2009 for GEOS by  doxygen 1.5.4