Gudhi::alpha_complex::Alpha_complex< Kernel > Class Template Reference

Alpha complex data structure. More...

Public Types

typedef CGAL::Delaunay_triangulation< Kernel, TDS > Delaunay_triangulation
 A Delaunay triangulation of a set of points in \( \mathbb{R}^D\).
 
typedef Kernel::Point_d Point_d
 A point in Euclidean space.
 
typedef Kernel Geom_traits
 Geometric traits class that provides the geometric types and predicates needed by Delaunay triangulations.
 

Public Member Functions

 Alpha_complex (const std::string &off_file_name)
 Alpha_complex constructor from an OFF file name. More...
 
template<typename InputPointRange >
 Alpha_complex (const InputPointRange &points)
 Alpha_complex constructor from a list of points. More...
 
 ~Alpha_complex ()
 Alpha_complex destructor deletes the Delaunay triangulation.
 
const Point_dget_point (std::size_t vertex) const
 get_point returns the point corresponding to the vertex given as parameter. More...
 
template<typename SimplicialComplexForAlpha , typename Filtration_value = typename SimplicialComplexForAlpha::Filtration_value>
bool create_complex (SimplicialComplexForAlpha &complex, Filtration_value max_alpha_square=std::numeric_limits< Filtration_value >::infinity(), bool exact=false)
 Inserts all Delaunay triangulation into the simplicial complex. It also computes the filtration values accordingly to the Create complex algorithm. More...
 

Detailed Description

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>
class Gudhi::alpha_complex::Alpha_complex< Kernel >

Alpha complex data structure.

The data structure is constructing a CGAL Delaunay triangulation (for more informations on CGAL Delaunay triangulation, please refer to the corresponding chapter in page http://doc.cgal.org/latest/Triangulation/) from a range of points or from an OFF file (cf. Points_off_reader).

Please refer to Alpha complex for examples.

The complex is a template class requiring an CGAL::Epeck_d, or an CGAL::Epick_d dD Geometry Kernel [37] from CGAL as template, default value is CGAL::Epeck_d < CGAL::Dynamic_dimension_tag >

Remarks
  • When Alpha_complex is constructed with an infinite value of alpha, the complex is a Delaunay complex.
  • Using the default CGAL::Epeck_d makes the construction safe. If you pass exact=true to create_complex, the filtration values are the exact ones converted to the filtration value type of the simplicial complex. This can be very slow. If you pass exact=false (the default), the filtration values are only guaranteed to have a small multiplicative error compared to the exact value, see CGAL::Lazy_exact_nt<NT>::set_relative_precision_of_to_double for details. A drawback, when computing persistence, is that an empty exact interval [10^12,10^12] may become a non-empty approximate interval [10^12,10^12+10^6]. Using CGAL::Epick_d makes the computations slightly faster, and the combinatorics are still exact, but the computation of filtration values can exceptionally be arbitrarily bad. In all cases, we still guarantee that the output is a valid filtration (faces have a filtration value no larger than their cofaces).
  • For performances reasons, it is advised to use Alpha_complex with CGAL ≥ 5.0.0.
Examples:
Alpha_complex/Alpha_complex_from_off.cpp, Alpha_complex/Alpha_complex_from_points.cpp, Alpha_complex/alpha_complex_persistence.cpp, Bottleneck_distance/alpha_rips_persistence_bottleneck_distance.cpp, and Persistent_cohomology/custom_persistence_sort.cpp.

Constructor & Destructor Documentation

◆ Alpha_complex() [1/2]

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>
Gudhi::alpha_complex::Alpha_complex< Kernel >::Alpha_complex ( const std::string &  off_file_name)
inline

Alpha_complex constructor from an OFF file name.

Uses the Points_off_reader to construct the Delaunay triangulation required to initialize the Alpha_complex.

Duplicate points are inserted once in the Alpha_complex. This is the reason why the vertices may be not contiguous.

Parameters
[in]off_file_nameOFF file [path and] name.

◆ Alpha_complex() [2/2]

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>
template<typename InputPointRange >
Gudhi::alpha_complex::Alpha_complex< Kernel >::Alpha_complex ( const InputPointRange &  points)
inline

Alpha_complex constructor from a list of points.

Duplicate points are inserted once in the Alpha_complex. This is the reason why the vertices may be not contiguous.

Parameters
[in]pointsRange of points to triangulate. Points must be in Kernel::Point_d

The type InputPointRange must be a range for which std::begin and std::end return input iterators on a Kernel::Point_d.

Member Function Documentation

◆ create_complex()

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>
template<typename SimplicialComplexForAlpha , typename Filtration_value = typename SimplicialComplexForAlpha::Filtration_value>
bool Gudhi::alpha_complex::Alpha_complex< Kernel >::create_complex ( SimplicialComplexForAlpha complex,
Filtration_value  max_alpha_square = std::numeric_limits<Filtration_value>::infinity(),
bool  exact = false 
)
inline

Inserts all Delaunay triangulation into the simplicial complex. It also computes the filtration values accordingly to the Create complex algorithm.

Template Parameters
SimplicialComplexForAlphamust meet SimplicialComplexForAlpha concept.
Parameters
[in]complexSimplicialComplexForAlpha to be created.
[in]max_alpha_squaremaximum for alpha square value. Default value is + \(\infty\), and there is very little point using anything else since it does not save time.
[in]exactExact filtration values computation. Not exact if Kernel is not CGAL::Epeck_d.
Returns
true if creation succeeds, false otherwise.
Precondition
Delaunay triangulation must be already constructed with dimension strictly greater than 0.
The simplicial complex must be empty (no vertices)

Initialization can be launched once.

◆ get_point()

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>>
const Point_d& Gudhi::alpha_complex::Alpha_complex< Kernel >::get_point ( std::size_t  vertex) const
inline

get_point returns the point corresponding to the vertex given as parameter.

Parameters
[in]vertexVertex handle of the point to retrieve.
Returns
The point found.
Exceptions
std::out_of_rangeIn case vertex is not found (cf. std::vector::at).

The documentation for this class was generated from the following file:
GUDHI  Version 3.1.1  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Fri Feb 7 2020 16:35:36 for GUDHI by Doxygen 1.8.13