Alpha complex reference manual#

class gudhi.AlphaComplex#

AlphaComplex is a simplicial complex constructed from the finite cells of a Delaunay Triangulation.

The filtration value of each simplex is computed as the square of the circumradius of the simplex if the circumsphere is empty (the simplex is then said to be Gabriel), and as the minimum of the filtration values of the codimension 1 cofaces that make it not Gabriel otherwise.

All simplices that have a filtration value strictly greater than a given alpha squared value are not inserted into the complex.

Note

When Alpha_complex is constructed with an infinite value of alpha, the complex is a Delaunay complex.

__init__()#

AlphaComplex constructor.

Parameters:
  • points (Iterable[Iterable[float]]) – A list of points in d-Dimension.

  • off_file (string) – [deprecated] An OFF file style name. If an off_file is given with points as arguments, only points from the file are taken into account.

  • weights (Iterable[float]) – A list of weights. If set, the number of weights must correspond to the number of points.

  • precision (string) – Alpha complex precision can be ‘fast’, ‘safe’ or ‘exact’. Default is ‘safe’.

Raises:
  • FileNotFoundError[deprecated] If off_file is set but not found.

  • ValueError – In case of inconsistency between the number of points and weights.

__new__(**kwargs)#
create_simplex_tree(max_alpha_square=inf, default_filtration_value=False)#
Parameters:
  • max_alpha_square (float) – The maximum alpha square threshold the simplices shall not exceed. Default is set to infinity, and there is very little point using anything else since it does not save time.

  • default_filtration_value (bool) – Set this value to True if filtration values are not needed to be computed (will be set to NaN). Default value is False (which means compute the filtration values).

Returns:

A simplex tree created from the Delaunay Triangulation.

Return type:

SimplexTree

static get_float_relative_precision()#
Returns:

The float relative precision of filtration values computation in create_simplex_tree() when the AlphaComplex is constructed with precision = 'safe' (the default).

Return type:

float

get_point(vertex)#

This function returns the point corresponding to a given vertex from the SimplexTree.

Parameters:

vertex (int) – The vertex.

Return type:

list of float

Returns:

the point.

static set_float_relative_precision(precision)#
Parameters:

precision (float) – When the AlphaComplex is constructed with precision = 'safe' (the default), one can set the float relative precision of filtration values computed in create_simplex_tree(). Default is 1e-5 (cf. get_float_relative_precision()). For more details, please refer to CGAL::Lazy_exact_nt<NT>::set_relative_precision_of_to_double