Class Triangulation
java.lang.Object
org.openjump.core.graph.delauneySimplexInsert.Triangulation
- Direct Known Subclasses:
DelaunayTriangulation
A Triangulation on vertices (generic type V).
A Triangulation is a set of Simplices (see Simplex below).
For efficiency, we keep track of the neighbors of each Simplex.
Two Simplices are neighbors of they share a facet.
- Author:
- Paul Chew Created July 2005. Derived from an earlier, messier version.
-
Constructor Summary
ConstructorsConstructorDescriptionTriangulation(org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) True iff the simplex is in this Triangulation.iterator()Iterator.org.openjump.core.graph.delauneySimplexInsert.SimplexneighborOpposite(Object vertex, org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) Report neighbor opposite the given vertex of simplex.neighbors(org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) Report neighbors of the given simplex.voidPrint stuff about a Triangulation.intsize()Size (# of Simplices) in Triangulation.toString()String representation.voidUpdate by replacing one set of Simplices with another.
-
Constructor Details
-
Triangulation
public Triangulation(org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) Constructor.- Parameters:
simplex- the initial Simplex.
-
-
Method Details
-
toString
-
size
public int size()Size (# of Simplices) in Triangulation.- Returns:
- the number of Simplices in this Triangulation
-
contains
public boolean contains(org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) True iff the simplex is in this Triangulation.- Parameters:
simplex- the simplex to check- Returns:
- true iff the simplex is in this Triangulation
-
iterator
-
printStuff
public void printStuff()Print stuff about a Triangulation. Used for debugging. -
neighborOpposite
public org.openjump.core.graph.delauneySimplexInsert.Simplex neighborOpposite(Object vertex, org.openjump.core.graph.delauneySimplexInsert.Simplex simplex) Report neighbor opposite the given vertex of simplex.- Parameters:
vertex- a vertex of simplexsimplex- we want the neighbor of this Simplex- Returns:
- the neighbor opposite vertex of simplex; null if none
- Throws:
IllegalArgumentException- if vertex is not in this Simplex
-
neighbors
Report neighbors of the given simplex.- Parameters:
simplex- a Simplex- Returns:
- the Set of neighbors of simplex
-
update
-