Loading...
Searching...
No Matches
Gudhi::alpha_complex::Alpha_complex_3d< Complexity, Weighted, Periodic > Class Template Reference
Alpha complex

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

`#include <include/gudhi/Alpha_complex_3d.h>`

## Public Types

using | Alpha_shape_3 = CGAL::Alpha_shape_3<Dt>
| The CGAL 3D Alpha Shapes type.
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:
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:
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.
template<typename InputPointRange, typename WeightRange>
| Alpha_complex_3d (const InputPointRange &points, WeightRange weights)
| Alpha_complex constructor from a list of points and associated weights.
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.
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.
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.
const Point_3 & | get_point (std::size_t vertex)
| get_point returns the point corresponding to the vertex given as parameter.

## 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

  Complexity | shall be Gudhi::alpha_complex::complexity type. Default value is Gudhi::alpha_complex::complexity::SAFE.
  Weighted | Boolean used to set/unset the weighted version of Alpha_complex_3d. Default value is false.
  Periodic | Boolean 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_3d_from_points.cpp, Weighted_alpha_complex_3d_from_points.cpp, and alpha_complex_3d_persistence.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:

using Alpha_complex_3d = Gudhi::alpha_complex::Alpha_complex_3d<Gudhi::alpha_complex::complexity::SAFE, false, false>;
// x0 = 1., y0 = -1.1, z0 = -1..
Alpha_complex_3d::Bare_point_3 p0(1., -1.1, -1.);
Gudhi::alpha_complex::Alpha_complex_3d
Alpha complex data structure for 3d specific case.
Definition Alpha_complex_3d.h:118
Gudhi::alpha_complex::Alpha_complex_3d::Alpha_complex_3d
Alpha_complex_3d(const InputPointRange &points)
Alpha_complex constructor from a list of points.
Definition Alpha_complex_3d.h:273
Gudhi::alpha_complex::Alpha_complex_3d< Gudhi::alpha_complex::complexity::SAFE, false, false >::Bare_point_3
typename Kernel::Point_3 Bare_point_3
Definition Alpha_complex_3d.h:230

## 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:

using Weighted_alpha_complex_3d = Gudhi::alpha_complex::Alpha_complex_3d<Gudhi::alpha_complex::complexity::SAFE, true, false>;
// 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.);
Gudhi::alpha_complex::Alpha_complex_3d< Gudhi::alpha_complex::complexity::SAFE, true, false >::Weighted_point_3
typename Triangulation_3< Kernel, Tds, Weighted, Periodic >::Weighted_point_3 Weighted_point_3
Definition Alpha_complex_3d.h:243

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] | points | Range 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_argument | In debug mode, if points and weights do not have the same size.

Parameters

  [in] | points | Range of points to triangulate. Points must be in Alpha_complex_3d::Bare_point_3.
  [in] | weights | Range 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_argument | In debug mode, if the size of the cuboid in every directions is not the same.

Parameters

  [in] | points | Range of points to triangulate. Points must be in Alpha_complex_3d::Point_3.
  [in] | x_min | Iso-oriented cuboid x_min.
  [in] | y_min | Iso-oriented cuboid y_min.
  [in] | z_min | Iso-oriented cuboid z_min.
  [in] | x_max | Iso-oriented cuboid x_max.
  [in] | y_max | Iso-oriented cuboid y_max.
  [in] | z_max | Iso-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_argument | In debug mode, if points and weights do not have the same size.
  std::invalid_argument | In debug mode, if the size of the cuboid in every directions is not the same.
  std::invalid_argument | In debug mode, if a weight is negative, zero, or greater than 1/64*cuboid length squared.

Parameters

  [in] | points | Range of points to triangulate. Points must be in Alpha_complex_3d::Bare_point_3.
  [in] | weights | Range of weights on points. Weights shall be in double.
  [in] | x_min | Iso-oriented cuboid x_min.
  [in] | y_min | Iso-oriented cuboid y_min.
  [in] | z_min | Iso-oriented cuboid z_min.
  [in] | x_max | Iso-oriented cuboid x_max.
  [in] | y_max | Iso-oriented cuboid y_max.
  [in] | z_max | Iso-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

  SimplicialComplexForAlpha3d | must meet SimplicialComplexForAlpha3d concept.

Parameters

  [in] | complex | SimplicialComplexForAlpha3d to be created.
  [in] | max_alpha_square | maximum 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] | vertex | Vertex handle of the point to retrieve.

Returns
  The point found.

Exceptions

  std::out_of_range | In case vertex is not found (cf. std::vector::at).

The documentation for this class was generated from the following file:

- include/gudhi/Alpha_complex_3d.h