ProGAL.geom3d.complex.alphaComplex
Class AlphaFiltration

java.lang.Object
  extended by ProGAL.geom3d.complex.alphaComplex.AlphaFiltration
Direct Known Subclasses:
AlphaComplex

public class AlphaFiltration
extends java.lang.Object

An alpha complex for a set of d-dimensional points and a real number alpha is a subset of the Delaunay complex where all simplices that can be enclosed by an alpha-probe (a hypersphere of radius alpha), without the probe enclosing any points, are removed. The alpha-filtration is a generalization of the alpha complex that associates with each simplex the alpha value at which it enters the alpha-complex.

This class builds the three-dimensional alpha filtration. The alpha complex is easily extracted by using the List getSimplices(double alpha) method. For convenience there are also methods to retrieve only the edges, triangles and tetrahedra of the alpha complex. The alpha complex is built in the constructor of AlphaComplex. Lists of simplices are always returned in non-decreasing order of alpha. The following example displays the alpha-complex of 20 random points using an alpha probe of radius 0.2.

  //Generate the filtration
  List<Point> pl = PointList.generatePointsInCube(20);
  AlphaFiltration af = new AlphaFiltration(pl);
  
  //Display the alpha complex
  J3DScene scene = J3DScene.createJ3DSceneInFrame();
  for(CTetrahedron t: af.getTetrahedra(0.2)){
     scene.addShape(t, new Color(200,100,100,100));
  }
  
  

It should be noted that the simplices returned by this class are all connected as if they were in a DelaunayComplex and if one wishes e.g. to find a component in the alpha-complex then the breadth-first-search should be modified to only traverse simplices that enter the alpha complex 'before' the desired alpha-value. To determine at which time a simplex enters the alpha complex the double getInAlpha(Simplex s)-method can be used. If the result is less than the probes radius then the simplex is in the complex. TODO: Describe the use of SimplexAlphaProperties and write a good example

Author:
R. Fonseca

Constructor Summary
AlphaFiltration(DelaunayComplex d3d)
          Build the alpha-filtration of the specified Delaunay complex.
AlphaFiltration(java.util.List<Point> pl)
          Build the alpha-filtration of the specified point-list.
 
Method Summary
 java.util.List<CTriangle> getAlphaShape(double alpha)
           
 boolean getAttached(Simplex s)
           
 int[][] getBettiNumbers()
          Get the Betti-numbers of the alpha-filtration.
 int[][][] getBettiPersistence()
          TODO: Comment
 int getDim(Simplex s)
           
 java.util.List<CEdge> getEdges()
           
 java.util.List<CEdge> getEdges(double alpha)
          Get a list of edges that are part of the alpha-complex with the specified probe radius.
 double getInAlpha(Simplex s)
          Return the probe-radius at which the simplex s enters the alpha complex.
 boolean getOnCH(Simplex s)
          Return true iff the simplex is on the convex hull.
 java.util.List<int[]>[] getPairSimplices()
          TODO: Comment
 java.util.List<Simplex> getSimplices()
           
 java.util.List<Simplex> getSimplices(double alpha)
          Get a list of simplices that are part of the alpha-complex with the specified probe radius.
 java.util.List<Triangle> getSurfaceTriangles(double alpha)
          Returns triangles in one tetrahedron only
 java.util.List<CTetrahedron> getTetrahedra()
           
 java.util.List<CTetrahedron> getTetrahedra(double alpha)
          Get a list of tetrahedra that are part of the alpha-complex with the specified probe radius.
 java.util.List<CTetrahedron> getTetrahedra(double alphaLow, double alphaHigh)
          Get a list of tetrahedra that are part of the alpha-complex with the probe radius in a specified interval.
 java.util.List<CTriangle> getTriangles()
           
 java.util.List<CTriangle> getTriangles(double alpha)
          Get a list of triangles that are part of the alpha-complex with the specified probe radius.
 java.util.Set<CTetrahedron> getVertexHull(CVertex v)
          The vertex-hull of v is the set of all tetrahedrons that has v as a corner-point.
 java.util.List<CVertex> getVertices()
          Get a list of the vertices of the complex.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlphaFiltration

public AlphaFiltration(java.util.List<Point> pl)
Build the alpha-filtration of the specified point-list. Note that an entire Delaunay complex is built as part of this constructor.


AlphaFiltration

public AlphaFiltration(DelaunayComplex d3d)
Build the alpha-filtration of the specified Delaunay complex.

Method Detail

getSimplices

public java.util.List<Simplex> getSimplices()

getTetrahedra

public java.util.List<CTetrahedron> getTetrahedra()

getTriangles

public java.util.List<CTriangle> getTriangles()

getEdges

public java.util.List<CEdge> getEdges()

getTetrahedra

public java.util.List<CTetrahedron> getTetrahedra(double alpha)
Get a list of tetrahedra that are part of the alpha-complex with the specified probe radius.


getTetrahedra

public java.util.List<CTetrahedron> getTetrahedra(double alphaLow,
                                                  double alphaHigh)
Get a list of tetrahedra that are part of the alpha-complex with the probe radius in a specified interval. Added by PW


getTriangles

public java.util.List<CTriangle> getTriangles(double alpha)
Get a list of triangles that are part of the alpha-complex with the specified probe radius.


getSurfaceTriangles

public java.util.List<Triangle> getSurfaceTriangles(double alpha)
Returns triangles in one tetrahedron only


getEdges

public java.util.List<CEdge> getEdges(double alpha)
Get a list of edges that are part of the alpha-complex with the specified probe radius.


getVertices

public java.util.List<CVertex> getVertices()
Get a list of the vertices of the complex.


getSimplices

public java.util.List<Simplex> getSimplices(double alpha)
Get a list of simplices that are part of the alpha-complex with the specified probe radius.


getAlphaShape

public java.util.List<CTriangle> getAlphaShape(double alpha)

getDim

public int getDim(Simplex s)

getInAlpha

public double getInAlpha(Simplex s)
Return the probe-radius at which the simplex s enters the alpha complex.


getAttached

public boolean getAttached(Simplex s)

getOnCH

public boolean getOnCH(Simplex s)
Return true iff the simplex is on the convex hull. Calling this method with a CTetrahedra will throw an error.


getVertexHull

public java.util.Set<CTetrahedron> getVertexHull(CVertex v)
The vertex-hull of v is the set of all tetrahedrons that has v as a corner-point. Notice that that this method operates on the entire Delaunay complex and is not affected by any probe size.


getBettiNumbers

public int[][] getBettiNumbers()
Get the Betti-numbers of the alpha-filtration. The implementation follows the specification of Delfinado and Edelsbrunner 1995. This algorithm runs in O(n alpha(n)) time and O(n) space where alpha(n) is the inverse Ackerman function. Reference: An incremental algorithm for Betti numbers of simplicial complexes on the 3-sphere. C.J.A. Delfinado and H. Edelsbrunner. Computer Aided Geometric Design, vol. 12, p. 771-784, 1995.

Returns:
an array of int-arrays. The zero'th entry holds the zero'th Betti numbers for each simplex, the next entry the first Betti numbers etc. The fifth entry holds 1 if the corresponding simplex was marked and 0 otherwise. The length of each entry is n, where n is the number of simplices in the AlphaFiltration.

getBettiPersistence

public int[][][] getBettiPersistence()
TODO: Comment


getPairSimplices

public java.util.List<int[]>[] getPairSimplices()
TODO: Comment