com.vividsolutions.jts.planargraph

Class DirectedEdgeStar


public class DirectedEdgeStar
extends java.lang.Object

A sorted collection of DirectedEdges which leave a Node in a PlanarGraph.
Version:
1.7

Field Summary

protected List
outEdges
The underlying list of outgoing DirectedEdges

Constructor Summary

DirectedEdgeStar()
Constructs a DirectedEdgeStar with no edges.

Method Summary

void
add(DirectedEdge de)
Adds a new member to this DirectedEdgeStar.
Coordinate
getCoordinate()
Returns the coordinate for the node at wich this star is based
int
getDegree()
Returns the number of edges around the Node associated with this DirectedEdgeStar.
List
getEdges()
Returns the DirectedEdges, in ascending order by angle with the positive x-axis.
int
getIndex(DirectedEdge dirEdge)
Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis.
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.
int
getIndex(int i)
Returns the remainder when i is divided by the number of edges in this DirectedEdgeStar.
DirectedEdge
getNextEdge(DirectedEdge dirEdge)
Returns the DirectedEdge on the left-hand side of the given DirectedEdge (which must be a member of this DirectedEdgeStar).
Iterator
iterator()
Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis.
void
remove(DirectedEdge de)
Drops a member of this DirectedEdgeStar.

Field Details

outEdges

protected List outEdges
The underlying list of outgoing DirectedEdges

Constructor Details

DirectedEdgeStar

public DirectedEdgeStar()
Constructs a DirectedEdgeStar with no edges.

Method Details

add

public void add(DirectedEdge de)
Adds a new member to this DirectedEdgeStar.

getCoordinate

public Coordinate getCoordinate()
Returns the coordinate for the node at wich this star is based

getDegree

public int getDegree()
Returns the number of edges around the Node associated with this DirectedEdgeStar.

getEdges

public List getEdges()
Returns the DirectedEdges, in ascending order by angle with the positive x-axis.

getIndex

public int getIndex(DirectedEdge dirEdge)
Returns the zero-based index of the given DirectedEdge, after sorting in ascending order by angle with the positive x-axis.

getIndex

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.

getIndex

public int getIndex(int i)
Returns the remainder when i is divided by the number of edges in this DirectedEdgeStar.

getNextEdge

public DirectedEdge getNextEdge(DirectedEdge dirEdge)
Returns the DirectedEdge on the left-hand side of the given DirectedEdge (which must be a member of this DirectedEdgeStar).

iterator

public Iterator iterator()
Returns an Iterator over the DirectedEdges, in ascending order by angle with the positive x-axis.

remove

public void remove(DirectedEdge de)
Drops a member of this DirectedEdgeStar.