Class Node

Hierarchy: Object , GraphComponent, Node
public class Node
extends GraphComponent
A node in a PlanarGraphis a location where 0 or more Edges 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.

Other

  • version: 1.7
public Node(Coordinate pt)
Constructs a Node with the given location.
public Node(Coordinate pt, DirectedEdgeStar deStar)
Constructs a Node with the given location and collection of outgoing DirectedEdges.
public static Collection getEdgesBetween(Node node0, Node node1)
Returns all Edges that connect the two nodes (which are assumed to be different).
public Coordinate getCoordinate()
Returns the location of this Node.
public void addOutEdge(DirectedEdge de)
Adds an outgoing DirectedEdge to this Node.
public DirectedEdgeStar getOutEdges()
Returns the collection of DirectedEdges that leave this Node.
public int getDegree()
Returns the number of edges around this Node.
public 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.
public void remove(DirectedEdge de)
Removes a DirectedEdge incident on this node. Does not change the state of the directed edge.
public boolean isRemoved()
Tests whether this node has been removed from its containing graph
Returns:
true if this node is removed