visad
Class Delaunay

java.lang.Object
  extended by visad.Delaunay
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DelaunayClarkson, DelaunayCustom, DelaunayFast, DelaunayOverlap, DelaunayWatson

public abstract class Delaunay
extends java.lang.Object
implements java.io.Serializable

Delaunay represents an abstract class for calculating an N-dimensional Delaunay triangulation, that can be extended to allow for various triangulation methods.

See Also:
Serialized Form

Field Summary
 int[][] Edges
           
 int NumEdges
           
 int[][] Tri
           
 int[][] Vertices
           
 int[][] Walk
           
 
Constructor Summary
Delaunay()
          The abstract constructor initializes the class's data arrays.
 
Method Summary
 java.lang.Object clone()
           
static Delaunay factory(float[][] samples, boolean exact)
          The factory class method heuristically decides which extension to the Delaunay abstract class to use in order to construct the fastest triangulation, and calls that extension, returning the finished triangulation.
 void finish_triang(float[][] samples)
          finish_triang calculates a triangulation's helper arrays, Walk and Edges, if the triangulation algorithm hasn't calculated them already.
 boolean getNonConvex()
           
 void improve(float[][] samples, int pass)
          improve uses edge-flipping to bring the current triangulation closer to the true Delaunay triangulation.
static float[][] perturb(float[][] samples, float epsilon, boolean copy)
          perturb alters the values of the samples by up to epsilon in either direction, to eliminate triangulation problems such as co-linear points; copy specifies whether perturb should modify the actual samples or a copy of them.
 java.lang.String sampleString(float[][] samples)
           
static float[][] scale(float[][] samples, float mult, boolean copy)
          scale alters the values of the samples by multiplying them by the mult factor; copy specifies whether scale should modify the actual samples or a copy of them.
 void setNonConvex()
           
 boolean test(float[][] samples)
          test checks a triangulation in various ways to make sure it is constructed correctly; test returns false if there are any problems with the triangulation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Tri

public int[][] Tri

Vertices

public int[][] Vertices

Walk

public int[][] Walk

Edges

public int[][] Edges

NumEdges

public int NumEdges
Constructor Detail

Delaunay

public Delaunay()
         throws VisADException
The abstract constructor initializes the class's data arrays.

Throws:
VisADException
Method Detail

setNonConvex

public void setNonConvex()

getNonConvex

public boolean getNonConvex()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

factory

public static Delaunay factory(float[][] samples,
                               boolean exact)
                        throws VisADException
The factory class method heuristically decides which extension to the Delaunay abstract class to use in order to construct the fastest triangulation, and calls that extension, returning the finished triangulation. The exact parameter is an indication of whether the exact Delaunay triangulation is required. The method chooses from among the Fast, Clarkson, and Watson methods.

Throws:
VisADException

scale

public static float[][] scale(float[][] samples,
                              float mult,
                              boolean copy)
scale alters the values of the samples by multiplying them by the mult factor; copy specifies whether scale should modify the actual samples or a copy of them.


perturb

public static float[][] perturb(float[][] samples,
                                float epsilon,
                                boolean copy)
perturb alters the values of the samples by up to epsilon in either direction, to eliminate triangulation problems such as co-linear points; copy specifies whether perturb should modify the actual samples or a copy of them.


test

public boolean test(float[][] samples)
test checks a triangulation in various ways to make sure it is constructed correctly; test returns false if there are any problems with the triangulation. This method is expensive, provided mainly for debugging purposes.


improve

public void improve(float[][] samples,
                    int pass)
             throws VisADException
improve uses edge-flipping to bring the current triangulation closer to the true Delaunay triangulation. pass is the number of passes the algorithm should take over all edges (however, the algorithm terminates if no edges are flipped for an entire pass).

Throws:
VisADException

finish_triang

public void finish_triang(float[][] samples)
                   throws VisADException
finish_triang calculates a triangulation's helper arrays, Walk and Edges, if the triangulation algorithm hasn't calculated them already. Any extension to the Delaunay class should call finish_triang at the end of its triangulation constructor.

Throws:
VisADException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

sampleString

public java.lang.String sampleString(float[][] samples)