Modifier and Type | Method and Description |
---|---|
Vertex |
Triangle.getVertexA()
Getter for Vertex A.
|
Vertex |
Edge.getVertexA()
Getter for Vertex A.
|
Vertex |
Triangle.getVertexB()
Getter for Vertex B.
|
Vertex |
Edge.getVertexB()
Getter for Vertex B.
|
Vertex |
Triangle.getVertexC()
Getter for Vertex C.
|
Modifier and Type | Method and Description |
---|---|
java.util.TreeSet<Vertex> |
Vertex.getAdjacentVertices()
Returns a sorted
TreeSet containing the adjacent
vertices to this Vertex . |
java.util.TreeSet<Vertex> |
Graph.getVertices()
Returns the TreeSet of vertices.
|
Modifier and Type | Method and Description |
---|---|
void |
Graph.addEdge(Vertex a,
Vertex b)
This creates a new
Edge connecting the two
given vertices and adds it to the set of Edges.
If either of the two vertices of the new Edge are not in this
Graph , then they are also added. |
void |
Graph.addVertex(Vertex v)
Adds a vertex to the TreeSet of Vertices or does nothing if
the vertex is already in the graph.
|
int |
Vertex.compareTo(Vertex otherVertex)
The method inhereted from the Comparable interface.
|
boolean |
Graph.containsVertex(Vertex v)
Searches the
Graph for the given Vertex . |
boolean |
Vertex.isAdjacentTo(Vertex v)
Tests whether this
Vertex is adjacent to the other
Vertex , meaning they are contained in an Edge . |
boolean |
Edge.isIncidentTo(Vertex v)
Tests whether this
Edge is incident to
the given Vertex . |
void |
Graph.removeEdge(Vertex a,
Vertex b)
This removes the
Edge containing the two vertices from the set
of edges if it exists in the Graph . |
void |
Graph.removeVertex(Vertex v)
Removes the
Vertex from the Graph if it is
present, or does nothing if it is not present. |
void |
Triangle.setVertexA(Vertex vertex)
Setter for Vertex A.
|
void |
Edge.setVertexA(Vertex vertex)
Setter for Vertex A.
|
void |
Triangle.setVertexB(Vertex vertex)
Setter for Vertex B.
|
void |
Edge.setVertexB(Vertex vertex)
Setter for Vertex B.
|
void |
Triangle.setVertexC(Vertex vertex)
Setter for Vertex C.
|
static Graph |
Graph.spanningTree(Graph graph,
Vertex initialVertex)
This is a breadth-first algorithm for finding a spanning
tree of the given
Graph starting from the specified
Vertex . |
Modifier and Type | Method and Description |
---|---|
static Graph |
Graph.minimalSpanningTree(java.util.Collection<Vertex> vertices)
This is an implementation of Kruskal's Algorithm for finding the minimal
spanning tree for the given collection of Vertex objects.
This will return a minimal spanning tree for the complete graph that
contains these vertices.
|
static java.util.Collection<Triangle> |
Graph.toTriangles(java.util.Collection<Vertex> vertices)
This returns a list of triangles that make up the delaunay triangulation
of the vertices in the source
Graph . |
static java.util.ArrayList<Triangle> |
Triangulate.triangulate(java.util.Collection<Vertex> vertexCollection)
This takes a collection of
Vertex objects and
returns a Delaunay triangulation of them in the form of a list of
triangles. |
static Graph |
Graph.triangulatedGraph(java.util.Collection<Vertex> vertices)
This will return a delaunay triangulation of the collection of
vertices.
This uses the Triangulate library which can be found at: http://wiki.processing.org/w/Triangulation |
Constructor and Description |
---|
Edge(Vertex a,
Vertex b)
This is the constructor for edge objects.
|
Triangle(Vertex vertexA,
Vertex vertexB,
Vertex vertexC)
This is the constructor for
Triangle objects. |