org.starhope.appius.physica
Class QuadraticAlgorithm

java.lang.Object
  extended by org.starhope.appius.physica.TriangulationAlgorithm
      extended by org.starhope.appius.physica.QuadraticAlgorithm

 class QuadraticAlgorithm
extends TriangulationAlgorithm

QuadraticAlgorithm class. O(n^2) algorithm.


Field Summary
(package private) static String algoName
          WRITEME: Document this brpocock@star-hope.org
(package private)  Circle bC
          WRITEME: Document this brpocock@star-hope.org
(package private)  int bP
          WRITEME: Document this brpocock@star-hope.org
(package private)  int nFaces
          WRITEME: Document this brpocock@star-hope.org
(package private)  int s
          WRITEME: Document this brpocock@star-hope.org
(package private)  int t
          WRITEME: Document this brpocock@star-hope.org
(package private)  int u
          WRITEME: Document this brpocock@star-hope.org
 
Fields inherited from class org.starhope.appius.physica.TriangulationAlgorithm
algName, edgeState, insideState, nStates, pointState, state, triangleState, triangulationState
 
Constructor Summary
QuadraticAlgorithm(Triangulation t1, int nPoints)
          WRITEME: Document this constructor brpocock@star-hope.org
 
Method Summary
 void completeFacet(int eIeI2, Triangulation tri0, int numberOfFaces)
          Complete a facet by looking for the circle free point to the left of the edge "e_i".
private  void findBestPointOnLeftOfEdge(Triangulation tri0, Point2D.Double[] p)
          Find best point on left of edge.
 Point2D findClosestNeighbours(Point2D.Double[] p, int nPoints)
          Find the two closest points.
 void reset()
          WRITEME: Document this method brpocock@star-hope.org
 void triangulate(Triangulation tri)
          WRITEME: Document this method brpocock@star-hope.org
 
Methods inherited from class org.starhope.appius.physica.TriangulationAlgorithm
nextStep, setAlgorithmState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

algoName

static final String algoName
WRITEME: Document this brpocock@star-hope.org

See Also:
Constant Field Values

bC

Circle bC
WRITEME: Document this brpocock@star-hope.org


bP

int bP
WRITEME: Document this brpocock@star-hope.org


nFaces

int nFaces
WRITEME: Document this brpocock@star-hope.org


s

int s
WRITEME: Document this brpocock@star-hope.org


t

int t
WRITEME: Document this brpocock@star-hope.org


u

int u
WRITEME: Document this brpocock@star-hope.org

Constructor Detail

QuadraticAlgorithm

public QuadraticAlgorithm(Triangulation t1,
                          int nPoints)
WRITEME: Document this constructor brpocock@star-hope.org

Parameters:
t1 - WRITEME
nPoints - WRITEME
Method Detail

completeFacet

public void completeFacet(int eIeI2,
                          Triangulation tri0,
                          int numberOfFaces)
Complete a facet by looking for the circle free point to the left of the edge "e_i". Add the facet to the triangulation. This function is a bit long and may be better split.

Parameters:
eIeI2 - WRITEME
tri0 - WRITEME
numberOfFaces - WRITEME

findBestPointOnLeftOfEdge

private void findBestPointOnLeftOfEdge(Triangulation tri0,
                                       Point2D.Double[] p)
Find best point on left of edge.

Parameters:
tri0 - WRITEME
p - WRITEME

findClosestNeighbours

public Point2D findClosestNeighbours(Point2D.Double[] p,
                                     int nPoints)
Find the two closest points.

Parameters:
p - WRITEME
nPoints - WRITEME
Returns:
WRITEME

reset

public void reset()
Description copied from class: TriangulationAlgorithm
WRITEME: Document this method brpocock@star-hope.org

Overrides:
reset in class TriangulationAlgorithm
See Also:
TriangulationAlgorithm.reset()

triangulate

public void triangulate(Triangulation tri)
Description copied from class: TriangulationAlgorithm
WRITEME: Document this method brpocock@star-hope.org

Specified by:
triangulate in class TriangulationAlgorithm
Parameters:
tri - WRITEME
See Also:
TriangulationAlgorithm.triangulate(org.starhope.appius.physica.Triangulation)