Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic > Class Template Reference

Alpha complex data structure for 3d specific case. More...

Public Types

using Alpha_shape_3 = CGAL::Alpha_shape_3< Dt >
 The CGAL 3D Alpha Shapes type. More...
 
using FT = typename Alpha_shape_3::FT
 The alpha values type. Must be compatible with double.
 
using Bare_point_3 = typename Kernel::Point_3
 Gives public access to the Bare_point_3 (bare aka. unweighed) type. Here is a Bare_point_3 constructor example: More...
 
using Weighted_point_3 = typename Triangulation_3< Kernel, Tds, Weighted, Periodic >::Weighted_point_3
 Gives public access to the Weighted_point_3 type. A Weighted point can be constructed as follows: More...
 
using Point_3 = typename Alpha_shape_3::Point
 Alpha_complex_3d::Point_3 type is either a Alpha_complex_3d::Bare_point_3 (Weighted = false) or a Alpha_complex_3d::Weighted_point_3 (Weighted = true).
 

Public Member Functions

template<typename InputPointRange >
 Alpha_complex_3d (const InputPointRange &points)
 Alpha_complex constructor from a list of points. More...
 
template<typename InputPointRange , typename WeightRange >
 Alpha_complex_3d (const InputPointRange &points, WeightRange weights)
 Alpha_complex constructor from a list of points and associated weights. More...
 
template<typename InputPointRange >
 Alpha_complex_3d (const InputPointRange &points, FT x_min, FT y_min, FT z_min, FT x_max, FT y_max, FT z_max)
 Alpha_complex constructor from a list of points and an iso-cuboid coordinates. More...
 
template<typename InputPointRange , typename WeightRange >
 Alpha_complex_3d (const InputPointRange &points, WeightRange weights, FT x_min, FT y_min, FT z_min, FT x_max, FT y_max, FT z_max)
 Alpha_complex constructor from a list of points, associated weights and an iso-cuboid coordinates. More...
 
template<typename SimplicialComplexForAlpha3d , typename Filtration_value = typename SimplicialComplexForAlpha3d::Filtration_value>
bool create_complex (SimplicialComplexForAlpha3d &complex, Filtration_value max_alpha_square=std::numeric_limits< Filtration_value >::infinity())
 Inserts all Delaunay triangulation into the simplicial complex. It also computes the filtration values accordingly to the Create complex algorithm. More...
 
const Point_3get_point (std::size_t vertex)
 get_point returns the point corresponding to the vertex given as parameter. More...
 

Detailed Description

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
class Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >

Alpha complex data structure for 3d specific case.

The data structure is constructing a CGAL 3D Alpha Shapes from a range of points (can be read from an OFF file, cf. Points_off_reader). Duplicate points are inserted once in the Alpha_complex.

Template Parameters
Complexityshall be Gudhi::alpha_complex::complexity type. Default value is Gudhi::alpha_complex::complexity::SAFE.
WeightedBoolean used to set/unset the weighted version of Alpha_complex_3d. Default value is false.
PeriodicBoolean used to set/unset the periodic version of Alpha_complex_3d. Default value is false.

For the weighted version, weights values are explained on CGAL Alpha shapes 3d and Regular triangulation documentation.

For the periodic version, refer to the CGAL’s 3D Periodic Triangulations User Manual for more details. The periodicity is defined by an iso-oriented cuboid with diagonal opposite vertices (x_min, y_min, z_min) and (x_max, y_max, z_max).

Please refer to Alpha complex for examples.

Remarks
When Alpha_complex_3d is constructed with an infinite value of alpha (default value), the complex is a 3d Delaunay complex.
Examples:
Alpha_complex/alpha_complex_3d_persistence.cpp, and Alpha_complex/Weighted_alpha_complex_3d_from_points.cpp.

Member Typedef Documentation

◆ Alpha_shape_3

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
using Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Alpha_shape_3 = CGAL::Alpha_shape_3<Dt>

The CGAL 3D Alpha Shapes type.

The Gudhi::alpha_complex::Alpha_complex_3d is a wrapper on top of this class to ease the standard, weighted and/or periodic build of the Alpha complex 3d.

◆ Bare_point_3

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
using Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Bare_point_3 = typename Kernel::Point_3

Gives public access to the Bare_point_3 (bare aka. unweighed) type. Here is a Bare_point_3 constructor example:

◆ Weighted_point_3

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
using Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Weighted_point_3 = typename Triangulation_3<Kernel, Tds, Weighted, Periodic>::Weighted_point_3

Gives public access to the Weighted_point_3 type. A Weighted point can be constructed as follows:

// x0 = 1., y0 = -1.1, z0 = -1., weight = 4.
Weighted_alpha_complex_3d::Weighted_point_3 wp0(Weighted_alpha_complex_3d::Bare_point_3(1., -1.1, -1.), 4.);

Note: This type is defined to void if Alpha complex is not weighted.

Constructor & Destructor Documentation

◆ Alpha_complex_3d() [1/4]

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
template<typename InputPointRange >
Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Alpha_complex_3d ( const InputPointRange &  points)
inline

Alpha_complex constructor from a list of points.

Parameters
[in]pointsRange of points to triangulate. Points must be in Alpha_complex_3d::Point_3.
Precondition
Available if Alpha_complex_3d is not Periodic.

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

◆ Alpha_complex_3d() [2/4]

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
template<typename InputPointRange , typename WeightRange >
Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Alpha_complex_3d ( const InputPointRange &  points,
WeightRange  weights 
)
inline

Alpha_complex constructor from a list of points and associated weights.

Exceptions
std::invalid_argumentIn debug mode, if points and weights do not have the same size.
Parameters
[in]pointsRange of points to triangulate. Points must be in Alpha_complex_3d::Bare_point_3.
[in]weightsRange of weights on points. Weights shall be in double.
Precondition
Available if Alpha_complex_3d is Weighted and not Periodic.

The type InputPointRange must be a range for which std::begin and std::end return input iterators on a Alpha_complex_3d::Bare_point_3. The type WeightRange must be a range for which std::begin and std::end return an input iterator on a double.

◆ Alpha_complex_3d() [3/4]

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
template<typename InputPointRange >
Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Alpha_complex_3d ( const InputPointRange &  points,
FT  x_min,
FT  y_min,
FT  z_min,
FT  x_max,
FT  y_max,
FT  z_max 
)
inline

Alpha_complex constructor from a list of points and an iso-cuboid coordinates.

Exceptions
std::invalid_argumentIn debug mode, if the size of the cuboid in every directions is not the same.
Parameters
[in]pointsRange of points to triangulate. Points must be in Alpha_complex_3d::Point_3.
[in]x_minIso-oriented cuboid x_min.
[in]y_minIso-oriented cuboid y_min.
[in]z_minIso-oriented cuboid z_min.
[in]x_maxIso-oriented cuboid x_max.
[in]y_maxIso-oriented cuboid y_max.
[in]z_maxIso-oriented cuboid z_max.
Precondition
Available if Alpha_complex_3d is Periodic.

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

Note
In weighted version, please check weights are greater than zero, and lower than 1/64*cuboid length squared.

◆ Alpha_complex_3d() [4/4]

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
template<typename InputPointRange , typename WeightRange >
Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::Alpha_complex_3d ( const InputPointRange &  points,
WeightRange  weights,
FT  x_min,
FT  y_min,
FT  z_min,
FT  x_max,
FT  y_max,
FT  z_max 
)
inline

Alpha_complex constructor from a list of points, associated weights and an iso-cuboid coordinates.

Exceptions
std::invalid_argumentIn debug mode, if points and weights do not have the same size.
std::invalid_argumentIn debug mode, if the size of the cuboid in every directions is not the same.
std::invalid_argumentIn debug mode, if a weight is negative, zero, or greater than 1/64*cuboid length squared.
Parameters
[in]pointsRange of points to triangulate. Points must be in Alpha_complex_3d::Bare_point_3.
[in]weightsRange of weights on points. Weights shall be in double.
[in]x_minIso-oriented cuboid x_min.
[in]y_minIso-oriented cuboid y_min.
[in]z_minIso-oriented cuboid z_min.
[in]x_maxIso-oriented cuboid x_max.
[in]y_maxIso-oriented cuboid y_max.
[in]z_maxIso-oriented cuboid z_max.
Precondition
Available if Alpha_complex_3d is Weighted and Periodic.

The type InputPointRange must be a range for which std::begin and std::end return input iterators on a Alpha_complex_3d::Bare_point_3. The type WeightRange must be a range for which std::begin and std::end return an input iterator on a double. The type of x_min, y_min, z_min, x_max, y_max and z_max must be a double.

Member Function Documentation

◆ create_complex()

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
template<typename SimplicialComplexForAlpha3d , typename Filtration_value = typename SimplicialComplexForAlpha3d::Filtration_value>
bool Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::create_complex ( SimplicialComplexForAlpha3d complex,
Filtration_value  max_alpha_square = std::numeric_limits<Filtration_value>::infinity() 
)
inline

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

Template Parameters
SimplicialComplexForAlpha3dmust meet SimplicialComplexForAlpha3d concept.
Parameters
[in]complexSimplicialComplexForAlpha3d 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.
Returns
true if creation succeeds, false otherwise.
Precondition
The simplicial complex must be empty (no vertices).

◆ get_point()

template<complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false>
const Point_3& Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic >::get_point ( std::size_t  vertex)
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