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

Alpha complex data structure. More...

#include <gudhi/Alpha_complex.h>

Public Types

using Geom_traits = std::conditional_t< Weighted, CGAL::Regular_triangulation_traits_adapter< Kernel >, Kernel >
 Geometric traits class that provides the geometric types and predicates needed by the triangulations.
 
using Triangulation = std::conditional_t< Weighted, CGAL::Regular_triangulation< Kernel, TDS >, CGAL::Delaunay_triangulation< Kernel, TDS > >
 A (Weighted or not) Delaunay triangulation of a set of points in \( \mathbb{R}^D\).
 
using A_kernel_d = Alpha_kernel_d< Kernel, Weighted >
 CGAL kernel container for computations in function of the weighted or not characteristics.
 
using Sphere = typename A_kernel_d::Sphere
 Sphere is a std::pair<Kernel::Point_d, Kernel::FT> (aka. circurmcenter and squared radius). If Weighted, Sphere is a Kernel::Weighted_point_d (aka. circurmcenter and the weight value is the squared radius).
 
using Point_d = typename Geom_traits::Point_d
 A point, or a weighted point in Euclidean space.
 

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...
 
template<typename InputPointRange , typename WeightRange >
 Alpha_complex (const InputPointRange &points, WeightRange weights)
 Alpha_complex constructor from a list of points and weights. More...
 
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, bool default_filtration_value=false)
 Inserts all Delaunay triangulation into the simplicial complex. It also computes the filtration values accordingly to the Create complex algorithm if default_filtration_value is not set. More...
 

Detailed Description

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>, bool Weighted = false>
class Gudhi::alpha_complex::Alpha_complex< Kernel, Weighted >

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 [40] 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_from_off.cpp, Alpha_complex_from_points.cpp, Fast_alpha_complex_from_off.cpp, Weighted_alpha_complex_from_points.cpp, alpha_complex_persistence.cpp, alpha_rips_persistence_bottleneck_distance.cpp, and custom_persistence_sort.cpp.

Constructor & Destructor Documentation

◆ Alpha_complex() [1/3]

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>, bool Weighted = false>
Gudhi::alpha_complex::Alpha_complex< Kernel, Weighted >::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/3]

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

Alpha_complex constructor from a list of points.

The vertices may be not contiguous as some points may be discarded in the triangulation (duplicate points, weighted hidden point, ...).

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

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

◆ Alpha_complex() [3/3]

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>, bool Weighted = false>
template<typename InputPointRange , typename WeightRange >
Gudhi::alpha_complex::Alpha_complex< Kernel, Weighted >::Alpha_complex ( const InputPointRange &  points,
WeightRange  weights 
)
inline

Alpha_complex constructor from a list of points and weights.

The vertices may be not contiguous as some points may be discarded in the triangulation (duplicate points, weighted hidden point, ...).

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

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>, bool Weighted = false>
template<typename SimplicialComplexForAlpha , typename Filtration_value = typename SimplicialComplexForAlpha::Filtration_value>
bool Gudhi::alpha_complex::Alpha_complex< Kernel, Weighted >::create_complex ( SimplicialComplexForAlpha complex,
Filtration_value  max_alpha_square = std::numeric_limits<Filtration_value>::infinity(),
bool  exact = false,
bool  default_filtration_value = false 
)
inline

Inserts all Delaunay triangulation into the simplicial complex. It also computes the filtration values accordingly to the Create complex algorithm if default_filtration_value is not set.

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. Useless if default_filtration_value is set to true.
[in]exactExact filtration values computation. Not exact if Kernel is not CGAL::Epeck_d.
[in]default_filtration_valueSet 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
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.

Examples
Alpha_complex_from_points.cpp, and Weighted_alpha_complex_from_points.cpp.

◆ get_point()

template<class Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>, bool Weighted = false>
const Point_d & Gudhi::alpha_complex::Alpha_complex< Kernel, Weighted >::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.5.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Thu Jan 13 2022 08:34:27 for GUDHI by Doxygen 1.9.2