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 Graph |
Graph.minimalSpanningTree(Graph g)
This is an implementation of Kruskal's Algorithm for finding the minimal
spanning tree of a graph.
This will work for disconnected graphs, but it will return a Graph
which contains multiple distinct trees.
|
static Graph |
Graph.randomCompleteGraph(int numberOfVertices,
processing.core.PApplet parent)
This will generate a complete
Graph with the specified
number of vertices that are randomly distributed so that the coordinates
of each vertex lie somewhere on the canvas of the parent
PApplet . |
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 . |
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 |
static Graph |
Graph.triangulatedGraph(Graph graph)
This will return a delaunay triangulation of the vertices in the
source graph.
This uses the Triangulate library which can be found at: http://wiki.processing.org/w/Triangulation Note: This method does not take the edges of the source graph into consideration. |
Modifier and Type | Method and Description |
---|---|
static Graph |
Graph.minimalSpanningTree(Graph g)
This is an implementation of Kruskal's Algorithm for finding the minimal
spanning tree of a graph.
This will work for disconnected graphs, but it will return a Graph
which contains multiple distinct trees.
|
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 . |
static java.util.Collection<Triangle> |
Graph.toTriangles(Graph graph)
This returns a list of triangles that make up the delaunay triangulation
of the vertices in the source
Graph . |
static Graph |
Graph.triangulatedGraph(Graph graph)
This will return a delaunay triangulation of the vertices in the
source graph.
This uses the Triangulate library which can be found at: http://wiki.processing.org/w/Triangulation Note: This method does not take the edges of the source graph into consideration. |