Classes | |
class | Gudhi::coxeter_triangulation::Vertex_iterator< Permutahedral_representation > |
Iterator over the vertices of a simplex represented by its permutahedral representation. More... | |
class | Gudhi::coxeter_triangulation::Face_iterator< Permutahedral_representation > |
Iterator over the k-faces of a simplex given by its permutahedral representation. More... | |
class | Gudhi::coxeter_triangulation::Coface_iterator< Permutahedral_representation > |
Iterator over the k-cofaces of a simplex given by its permutahedral representation. More... | |
class | Gudhi::coxeter_triangulation::Query_result< Simplex_handle > |
The result of a query by an oracle such as Implicit_manifold_intersection_oracle. More... | |
class | Gudhi::coxeter_triangulation::Coxeter_triangulation< Permutahedral_representation_ > |
A class that stores Coxeter triangulation of type \(\tilde{A}_d\). This triangulation has the greatest simplex quality out of all linear transformations of the Freudenthal-Kuhn triangulation. More... | |
class | Gudhi::coxeter_triangulation::Freudenthal_triangulation< Permutahedral_representation_ > |
A class that stores any affine transformation of the Freudenthal-Kuhn triangulation. More... | |
class | Gudhi::coxeter_triangulation::Implicit_manifold_intersection_oracle< Function_, Domain_function_ > |
An oracle that supports the intersection query on an implicit manifold. More... | |
class | Gudhi::coxeter_triangulation::Mesh_medit |
Structure to store a mesh that can be output in Medit .mesh file format using the output_meshes_to_medit method. More... | |
class | Gudhi::coxeter_triangulation::Manifold_tracing< Triangulation_ > |
A class that assembles methods for manifold tracing algorithm. More... | |
class | Gudhi::coxeter_triangulation::Simplex_comparator< Permutahedral_representation_ > |
A comparator class for Permutahedral_representation. The comparison is in lexicographic order first on vertices and then on ordered partitions with sorted parts. The lexicographic order forces that any face is larger than a coface. More... | |
class | Gudhi::coxeter_triangulation::Permutahedral_representation< Vertex_, Ordered_set_partition_ > |
A class that stores the permutahedral representation of a simplex in a Coxeter triangulation or a Freudenthal-Kuhn triangulation. More... | |
Functions | |
template<typename... Functions> | |
Cartesian_product< Functions... > | Gudhi::coxeter_triangulation::make_product_function (const Functions &... functions) |
Static constructor of a Cartesian product function. More... | |
template<class Function_ > | |
Embed_in_Rd< Function_ > | Gudhi::coxeter_triangulation::make_embedding (const Function_ &function, std::size_t d) |
Static constructor of an embedding function. More... | |
template<class Function_ > | |
Linear_transformation< Function_ > | Gudhi::coxeter_triangulation::make_linear_transformation (const Function_ &function, const Eigen::MatrixXd &matrix) |
Static constructor of a linearly transformed function. More... | |
template<class Function_ > | |
Negation< Function_ > | Gudhi::coxeter_triangulation::negation (const Function_ &function) |
Static constructor of the negative function. More... | |
template<class Function_ , class Triangulation_ > | |
PL_approximation< Function_, Triangulation_ > | Gudhi::coxeter_triangulation::make_pl_approximation (const Function_ &function, const Triangulation_ &triangulation) |
Static constructor of the piecewise-linear approximation of a function induced by an ambient triangulation. More... | |
template<class Function_ > | |
Translate< Function_ > | Gudhi::coxeter_triangulation::translate (const Function_ &function, Eigen::VectorXd off) |
Static constructor of a translated function. More... | |
template<class Function_ , class Domain_function_ > | |
Implicit_manifold_intersection_oracle< Function_, Domain_function_ > | Gudhi::coxeter_triangulation::make_oracle (const Function_ &function, const Domain_function_ &domain_function) |
Static constructor of an intersection oracle from a function with a domain. More... | |
template<class Function_ > | |
Implicit_manifold_intersection_oracle< Function_ > | Gudhi::coxeter_triangulation::make_oracle (const Function_ &function) |
Static constructor of an intersection oracle from a function without a domain. More... | |
template<class Cell_complex > | |
Mesh_medit | Gudhi::coxeter_triangulation::build_mesh_from_cell_complex (const Cell_complex &cell_complex, Configuration i_configuration=Configuration(), Configuration b_configuration=Configuration()) |
Builds a Gudhi::coxeter_triangulation::Mesh_medit from a Gudhi::coxeter_triangulation::Cell_complex. | |
template<typename... Meshes> | |
void | Gudhi::coxeter_triangulation::output_meshes_to_medit (std::size_t amb_d, std::string file_name, const Meshes &... meshes) |
Outputs a text file with specified meshes that can be visualized in Medit. More... | |
template<class Point_range , class Triangulation , class Intersection_oracle , class Out_simplex_map > | |
void | Gudhi::coxeter_triangulation::manifold_tracing_algorithm (const Point_range &seed_points, const Triangulation &triangulation, const Intersection_oracle &oracle, Out_simplex_map &out_simplex_map) |
Static method for Manifold_tracing<Triangulation_>::manifold_tracing_algorithm that computes the set of k-simplices that intersect a boundaryless implicit manifold given by an intersection oracle, where k is the codimension of the manifold. The computation is based on the seed propagation — it starts at the given seed points and then propagates along the manifold. More... | |
template<class Point_range , class Triangulation , class Intersection_oracle , class Out_simplex_map > | |
void | Gudhi::coxeter_triangulation::manifold_tracing_algorithm (const Point_range &seed_points, const Triangulation &triangulation, const Intersection_oracle &oracle, Out_simplex_map &interior_simplex_map, Out_simplex_map &boundary_simplex_map) |
Static method for Manifold_tracing<Triangulation_>::manifold_tracing_algorithm the dimensional manifold given by an intersection oracle, where k is the codimension of the manifold. The computation is based on the seed propagation — it starts at the given seed points and then propagates along the manifold. More... | |
template<class Vertex , class OrderedSetPartition > | |
std::ostream & | Gudhi::coxeter_triangulation::operator<< (std::ostream &os, const Permutahedral_representation< Vertex, OrderedSetPartition > &simplex) |
Print a permutahedral representation to a stream. More... | |
Coxeter triangulation module is designed to provide tools for constructing a piecewise-linear approximation of an \(m\)-dimensional smooth manifold embedded in \( \mathbb{R}^d \) using an ambient triangulation. For a more detailed description of the module see [36].
The central piece of the module is the manifold tracing algorithm represented by the class Manifold_tracing. The manifold tracing algorithm takes as input a manifold of some dimension \(m\) embedded in \(\mathbb{R}^d\) represented by an intersection oracle (see Section Intersection oracle), a point on the manifold and an ambient triangulation (see Section Ambient triangulations). The output consists of one map (or two maps in the case of manifolds with boundary) from the \((d-m)\)-dimensional (and \((d-m+1)\)-dimensional in the case of manifolds with boundary) simplices in the ambient triangulation that intersect the manifold to their intersection points. From this output, it is possible to construct the cell complex of the piecewise-linear approximation of the input manifold.
There are two methods that execute the manifold tracing algorithm: the method Manifold_tracing::manifold_tracing_algorithm(seed_points, triangulation, oracle, out_simplex_map) for manifolds without boundary and Manifold_tracing::manifold_tracing_algorithm(seed_points, triangulation, oracle, interior_simplex_map,boundary_simplex_map) for manifolds with boundary. The algorithm functions as follows. It starts at the specified seed points and inserts a \((d-m)\)-dimensional simplices nearby each seed point that intersect the manifold into the output. Starting from this simplex, the algorithm propagates the search for other \((d-m)\)-dimensional simplices that intersect the manifold by marching from a simplex to neighbouring simplices via their common cofaces.
This class Manifold_tracing has one template parameter Triangulation_
which specifies the ambient triangulation which is used by the algorithm. The template type Triangulation_
has to be a model of the concept TriangulationForManifoldTracing.
The module also provides two static methods: manifold_tracing_algorithm(seed_points, triangulation, oracle, out_simplex_map) for manifolds without boundary and manifold_tracing_algorithm(seed_points, triangulation, oracle, interior_simplex_map, boundary_simplex_map) for manifolds with boundary. For these static methods it is not necessary to specify any template arguments.
The ambient triangulations supported by the manifold tracing algorithm have to be models of the concept TriangulationForManifoldTracing. This module offers two such models: the class Freudenthal_triangulation and the derived class Coxeter_triangulation.
Both these classes encode affine transformations of the so-called Freudenthal-Kuhn triangulation of \(\mathbb{R}^d\). The Freudenthal-Kuhn triangulation of \(\mathbb{R}^d\) is defined as the simplicial subdivision of the unit cubic partition of \(\mathbb{R}^d\). Each simplex is encoded using the permutahedral representation, which consists of an integer-valued vector \(y\) that positions the simplex in a specific cube in the cubical partition and an ordered partition \(\omega\) of the set \(\{1,\ldots,d+1\}\), which positions the simplex in the simplicial subdivision of the cube. The default constructor Freudenthal_triangulation(d) the Freudenthal-Kuhn triangulation of \(\mathbb{R}^d\). The class Freudenthal_triangulation can also encode any affine transformation of the Freudenthal-Kuhn triangulation of \(\mathbb{R}^d\) using an invertible matrix \(\Lambda\) and an offset vector \(b\) that can be specified in the constructor and which can be changed using the methods change_matrix and change_offset. The class Coxeter_triangulation is derived from Freudenthal_triangulation and its default constructor Coxeter_triangulation(d) builds a Coxeter triangulation of type \(\tilde{A}_d\), which has the best simplex quality of all linear transformations of the Freudenthal-Kuhn triangulation of \(\mathbb{R}^d\).
The input \(m\)-dimensional manifold in \(\mathbb{R}^d\) needs to be given via the intersection oracle that answers the following query: given a \((d-m)\)-dimensional simplex, does it intersect the manifold? The concept IntersectionOracle describes all requirements for an intersection oracle class to be compatible with the class Manifold_tracing. This module offers one model of the concept IntersectionOracle, which is the class Implicit_manifold_intersection_oracle. This class represents a manifold given as the zero-set of a specified function \(F: \mathbb{R}^d \rightarrow \mathbb{R}^{d-m}\). The function \(F\) is given by a class which is a model of the concept FunctionForImplicitManifold. There are multiple function classes that are already implemented in this module.
\[ (r, rt, \ldots, rt^{d-1}) \in \mathbb{R}^d,\text{ for $t \in \mathbb{R}$.} \]
\[ z^2 + (\sqrt{x^2 + y^2} - r)^2 - R^2 = 0. \]
\[ (x^2 + y^2 + z^2 - ak^2)^2 - b((z-k)^2 - 2x^2)((z+k)^2 - 2y^2) = 0. \]
\[ \frac{-x^6-y^6-z^6}{300} + \frac{xy^2z}{2.1} + y^2 + (z-2)^2 = 1. \]
\[ (x^2 + y^2 + z^2)^2 - 2a^2(x^2 - y^2 - z^2) = 0. \]
\[ x^2 - y^2z = 0. \]
The base function classes above can be composed or modified into new functions using the following classes and methods:
It is also possible to implement your own function as detailed in this Example with a custom function.
The output of the manifold tracing algorithm can be transformed into the Hasse diagram of a cell complex that approximates the input manifold using the class Cell_complex. The type of the cells in the Hasse diagram is Hasse_cell<int, double, bool> provided by the module Hasse diagram. The cells in the cell complex given by an object of the class Cell_complex are accessed through several maps that are accessed through the following methods.
The use and interfaces of this Cell_complex is limited to the Coxeter_triangulation implementation.
The program output is:
Here is an example of constructing a piecewise-linear approximation of a flat torus embedded in \(\mathbb{R}^4\), rotated by a random rotation in \(\mathbb{R}^4\) and cut by a hyperplane.
The output in medit is:
In the following more complex example, we define a custom function for the implicit manifold.
The output in medit looks as follows:
Iterator types for Permutahedral_representation
Embed_in_Rd<Function_> Gudhi::coxeter_triangulation::make_embedding | ( | const Function_ & | function, |
std::size_t | d | ||
) |
Static constructor of an embedding function.
[in] | function | The function to be embedded in higher dimension. |
[in] | d | Embedding dimension. |
Function_ | The function template parameter. Should be a model of the concept FunctionForImplicitManifold. |
Linear_transformation<Function_> Gudhi::coxeter_triangulation::make_linear_transformation | ( | const Function_ & | function, |
const Eigen::MatrixXd & | matrix | ||
) |
Static constructor of a linearly transformed function.
[in] | function | The function to be linearly transformed. |
[in] | matrix | The transformation matrix. Its dimension should be d*d, where d is the domain (ambient) dimension of 'function'. |
Function_ | The function template parameter. Should be a model of the concept FunctionForImplicitManifold. |
Implicit_manifold_intersection_oracle<Function_> Gudhi::coxeter_triangulation::make_oracle | ( | const Function_ & | function | ) |
Static constructor of an intersection oracle from a function without a domain.
function | The input function that represents the implicit manifold without boundary. |
Implicit_manifold_intersection_oracle<Function_, Domain_function_> Gudhi::coxeter_triangulation::make_oracle | ( | const Function_ & | function, |
const Domain_function_ & | domain_function | ||
) |
Static constructor of an intersection oracle from a function with a domain.
function | The input function that represents the implicit manifold before the restriction with the domain. |
domain_function | The input domain function that can be used to define an implicit manifold with boundary. |
PL_approximation<Function_, Triangulation_> Gudhi::coxeter_triangulation::make_pl_approximation | ( | const Function_ & | function, |
const Triangulation_ & | triangulation | ||
) |
Static constructor of the piecewise-linear approximation of a function induced by an ambient triangulation.
[in] | function | The function. |
[in] | triangulation | The ambient triangulation. |
Function_ | The function template parameter. Should be a model of the concept FunctionForImplicitManifold. |
Cartesian_product<Functions...> Gudhi::coxeter_triangulation::make_product_function | ( | const Functions &... | functions | ) |
Static constructor of a Cartesian product function.
[in] | functions | The functions the zero-sets of which are factors in the Cartesian product of the resulting function. |
Functions | A pack template parameter for functions. All functions should be models of the concept FunctionForImplicitManifold. |
void Gudhi::coxeter_triangulation::manifold_tracing_algorithm | ( | const Point_range & | seed_points, |
const Triangulation & | triangulation, | ||
const Intersection_oracle & | oracle, | ||
Out_simplex_map & | interior_simplex_map, | ||
Out_simplex_map & | boundary_simplex_map | ||
) |
Static method for Manifold_tracing<Triangulation_>::manifold_tracing_algorithm the dimensional manifold given by an intersection oracle, where k is the codimension of the manifold. The computation is based on the seed propagation — it starts at the given seed points and then propagates along the manifold.
Point_range | Range of points of type Eigen::VectorXd. |
Triangulation_ | The type of the ambient triangulation. Needs to be a model of the concept TriangulationForManifoldTracing. |
Intersection_oracle | Intersection oracle that represents the manifold. Needs to be a model of the concept IntersectionOracle. |
Out_simplex_map | Needs to be Manifold_tracing<Triangulation_>::Out_simplex_map. |
[in] | seed_points | The range of points on the manifold from which the computation begins. |
[in] | triangulation | The ambient triangulation. |
[in] | oracle | The intersection oracle for the manifold. The ambient dimension needs to match the dimension of the triangulation. |
[out] | interior_simplex_map | The output map, where the keys are k-simplices in the input triangulation that intersect the relative interior of the input manifold and the mapped values are the intersection points. |
[out] | boundary_simplex_map | The output map, where the keys are k-simplices in the input triangulation that intersect the boundary of the input manifold and the mapped values are the intersection points. |
void Gudhi::coxeter_triangulation::manifold_tracing_algorithm | ( | const Point_range & | seed_points, |
const Triangulation & | triangulation, | ||
const Intersection_oracle & | oracle, | ||
Out_simplex_map & | out_simplex_map | ||
) |
Static method for Manifold_tracing<Triangulation_>::manifold_tracing_algorithm that computes the set of k-simplices that intersect a boundaryless implicit manifold given by an intersection oracle, where k is the codimension of the manifold. The computation is based on the seed propagation — it starts at the given seed points and then propagates along the manifold.
Point_range | Range of points of type Eigen::VectorXd. |
Triangulation_ | The type of the ambient triangulation. Needs to be a model of the concept TriangulationForManifoldTracing. |
Intersection_oracle | Intersection oracle that represents the manifold. Needs to be a model of the concept IntersectionOracle. |
Out_simplex_map | Needs to be Manifold_tracing<Triangulation_>::Out_simplex_map. |
[in] | seed_points | The range of points on the manifold from which the computation begins. |
[in] | triangulation | The ambient triangulation. |
[in] | oracle | The intersection oracle for the manifold. The ambient dimension needs to match the dimension of the triangulation. |
[out] | out_simplex_map | The output map, where the keys are k-simplices in the input triangulation that intersect the input manifold and the mapped values are the intersection points. |
Negation<Function_> Gudhi::coxeter_triangulation::negation | ( | const Function_ & | function | ) |
Static constructor of the negative function.
[in] | function | The function to be translated. domain (ambient) dimension of 'function'. |
Function_ | The function template parameter. Should be a model of the concept FunctionForImplicitManifold. |
std::ostream& Gudhi::coxeter_triangulation::operator<< | ( | std::ostream & | os, |
const Permutahedral_representation< Vertex, OrderedSetPartition > & | simplex | ||
) |
Print a permutahedral representation to a stream.
[in] | os | The output stream. |
[in] | simplex | A simplex represented by its permutahedral representation. |
void Gudhi::coxeter_triangulation::output_meshes_to_medit | ( | std::size_t | amb_d, |
std::string | file_name, | ||
const Meshes &... | meshes | ||
) |
Outputs a text file with specified meshes that can be visualized in Medit.
[in] | amb_d | Ambient dimension. Can be 2 or 3. |
[in] | file_name | The name of the output file. |
[in] | meshes | A pack of meshes to be specified separated by commas. |
Translate<Function_> Gudhi::coxeter_triangulation::translate | ( | const Function_ & | function, |
Eigen::VectorXd | off | ||
) |
Static constructor of a translated function.
[in] | function | The function to be translated. |
[in] | off | The offset vector. The dimension should correspond to the domain (ambient) dimension of 'function'. |
Function_ | The function template parameter. Should be a model of the concept FunctionForImplicitManifold. |