public class EdgeGraph extends Object
HalfEdges.
It supports tracking the vertices in the graph
via edges incident on them,
to allow efficient lookup of edges and vertices.
This class may be subclassed to use a
different subclass of HalfEdge,
by overriding createEdge(Point).
If additional logic is required to initialize
edges then EdgeGraph#addEdge(Coordinates, Point)
can be overridden as well.
| Constructor and Description |
|---|
EdgeGraph() |
| Modifier and Type | Method and Description |
|---|---|
HalfEdge |
addEdge(Point orig,
Point dest)
Adds an edge between the coordinates orig and dest
to this graph.
|
protected HalfEdge |
createEdge(Point orig)
Creates a single HalfEdge.
|
HalfEdge |
findEdge(Point orig,
Point dest)
Finds an edge in this graph with the given origin
and destination, if one exists.
|
Collection |
getVertexEdges() |
public HalfEdge addEdge(Point orig, Point dest)
orig - the edge origin locationdest - the edge destination location.protected HalfEdge createEdge(Point orig)
orig - the origin locationpublic HalfEdge findEdge(Point orig, Point dest)
orig - the origin locationdest - the destination location.public Collection getVertexEdges()
Copyright © 2015 Revolution Systems Inc.. All rights reserved.