diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-09-22 18:12:31 +0200 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-09-22 18:12:31 +0200 |
commit | be7555abfb97f02c37de96736f7a0993d4d47f03 (patch) | |
tree | 180f618a1db3a8b866f43f66210ac38c028d74dd /src/Coxeter_triangulation/concept | |
parent | e0041b766b647f3906b52f861e97edba1f089312 (diff) |
clang-format files
Diffstat (limited to 'src/Coxeter_triangulation/concept')
4 files changed, 49 insertions, 50 deletions
diff --git a/src/Coxeter_triangulation/concept/FunctionForImplicitManifold.h b/src/Coxeter_triangulation/concept/FunctionForImplicitManifold.h index 15d74860..210d804e 100644 --- a/src/Coxeter_triangulation/concept/FunctionForImplicitManifold.h +++ b/src/Coxeter_triangulation/concept/FunctionForImplicitManifold.h @@ -11,16 +11,19 @@ #ifndef CONCEPT_COXETER_TRIANGULATION_FUNCTION_FOR_IMPLICIT_MANIFOLD_H_ #define CONCEPT_COXETER_TRIANGULATION_FUNCTION_FOR_IMPLICIT_MANIFOLD_H_ +#include <cstdlib> // for std::size_t + +#include <Eigen/Dense> + namespace Gudhi { namespace coxeter_triangulation { -/** \brief The concept FunctionForImplicitManifold describes the requirements +/** \brief The concept FunctionForImplicitManifold describes the requirements * for a type to implement an implicit function class used for example in Manifold_tracing. */ struct FunctionForImplicitManifold { - - /** \brief Value of the function at a specified point 'p'. + /** \brief Value of the function at a specified point 'p'. * @param[in] p The input point given by its Cartesian coordinates. * Its size needs to be equal to amb_d(). */ @@ -28,7 +31,7 @@ struct FunctionForImplicitManifold { /** \brief Returns the domain (ambient) dimension. */ std::size_t amb_d() const; - + /** \brief Returns the codomain dimension. */ std::size_t cod_d() const; @@ -40,5 +43,4 @@ struct FunctionForImplicitManifold { } // namespace Gudhi - #endif diff --git a/src/Coxeter_triangulation/concept/IntersectionOracle.h b/src/Coxeter_triangulation/concept/IntersectionOracle.h index 1427460b..e4e397fa 100644 --- a/src/Coxeter_triangulation/concept/IntersectionOracle.h +++ b/src/Coxeter_triangulation/concept/IntersectionOracle.h @@ -11,19 +11,22 @@ #ifndef CONCEPT_COXETER_TRIANGULATION_INTERSECTION_ORACLE_H_ #define CONCEPT_COXETER_TRIANGULATION_INTERSECTION_ORACLE_H_ +#include <cstdlib> // for std::size_t + +#include <Eigen/Dense> + namespace Gudhi { namespace coxeter_triangulation { -/** \brief The concept IntersectionOracle describes the requirements +/** \brief The concept IntersectionOracle describes the requirements * for a type to implement an intersection oracle class used for example in Manifold_tracing. * */ struct IntersectionOracle { - /** \brief Returns the domain (ambient) dimension of the underlying manifold. */ std::size_t amb_d() const; - + /** \brief Returns the codomain dimension of the underlying manifold. */ std::size_t cod_d() const; @@ -32,48 +35,45 @@ struct IntersectionOracle { * \details The returned structure Query_result contains the boolean value * that is true only if the intersection point of the query simplex and * the relative interior of the manifold exists, the intersection point - * and the face of the query simplex that contains + * and the face of the query simplex that contains * the intersection point. - * + * * \tparam Simplex_handle The class of the query simplex. * Needs to be a model of the concept SimplexInCoxeterTriangulation. * \tparam Triangulation The class of the triangulation. * Needs to be a model of the concept TriangulationForManifoldTracing. - * + * * @param[in] simplex The query simplex. The dimension of the simplex - * should be the same as the codimension of the manifold + * should be the same as the codimension of the manifold * (the codomain dimension of the function). - * @param[in] triangulation The ambient triangulation. The dimension of - * the triangulation should be the same as the ambient dimension of the manifold + * @param[in] triangulation The ambient triangulation. The dimension of + * the triangulation should be the same as the ambient dimension of the manifold * (the domain dimension of the function). */ - template <class Simplex_handle, - class Triangulation> - Query_result<Simplex_handle> intersects(const Simplex_handle& simplex, - const Triangulation& triangulation) const; + template <class Simplex_handle, class Triangulation> + Query_result<Simplex_handle> intersects(const Simplex_handle& simplex, const Triangulation& triangulation) const; /** \brief Intersection query with the boundary of the manifold. - * + * * \details The returned structure Query_result contains the boolean value * that is true only if the intersection point of the query simplex and * the boundary of the manifold exists, the intersection point - * and the face of the query simplex that contains + * and the face of the query simplex that contains * the intersection point. - * + * * \tparam Simplex_handle The class of the query simplex. * Needs to be a model of the concept SimplexInCoxeterTriangulation. * \tparam Triangulation The class of the triangulation. * Needs to be a model of the concept TriangulationForManifoldTracing. * * @param[in] simplex The query simplex. The dimension of the simplex - * should be the same as the codimension of the boundary of the manifold + * should be the same as the codimension of the boundary of the manifold * (the codomain dimension of the function + 1). - * @param[in] triangulation The ambient triangulation. The dimension of - * the triangulation should be the same as the ambient dimension of the manifold + * @param[in] triangulation The ambient triangulation. The dimension of + * the triangulation should be the same as the ambient dimension of the manifold * (the domain dimension of the function). */ - template <class Simplex_handle, - class Triangulation> + template <class Simplex_handle, class Triangulation> Query_result<Simplex_handle> intersects_boundary(const Simplex_handle& simplex, const Triangulation& triangulation) const; @@ -84,24 +84,21 @@ struct IntersectionOracle { * @param p The input point. Needs to have the same dimension as the ambient * dimension of the manifold (the domain dimension of the function). * @param triangulation The ambient triangulation. Needs to have the same - * dimension as the ambient dimension of the manifold + * dimension as the ambient dimension of the manifold * (the domain dimension of the function). */ template <class Triangulation> - bool lies_in_domain(const Eigen::VectorXd& p, - const Triangulation& triangulation) const { + bool lies_in_domain(const Eigen::VectorXd& p, const Triangulation& triangulation) const { Eigen::VectorXd pl_p = make_pl_approximation(domain_fun_, triangulation)(p); return pl_p(0) < 0; } /** \brief Returns the function that defines the interior of the manifold */ const Function_& function() const; - }; } // namespace coxeter_triangulation } // namespace Gudhi - #endif diff --git a/src/Coxeter_triangulation/concept/SimplexInCoxeterTriangulation.h b/src/Coxeter_triangulation/concept/SimplexInCoxeterTriangulation.h index bb2451ff..dac8e66d 100644 --- a/src/Coxeter_triangulation/concept/SimplexInCoxeterTriangulation.h +++ b/src/Coxeter_triangulation/concept/SimplexInCoxeterTriangulation.h @@ -11,19 +11,22 @@ #ifndef CONCEPT_COXETER_TRIANGULATION_SIMPLEX_IN_COXETER_TRIANGULATION_H_ #define CONCEPT_COXETER_TRIANGULATION_SIMPLEX_IN_COXETER_TRIANGULATION_H_ +#include <cstdlib> // for std::size_t + +#include <gudhi/Permutahedral_representation.h> + namespace Gudhi { namespace coxeter_triangulation { -/** \brief The concept SimplexInCoxeterTriangulation describes the requirements +/** \brief The concept SimplexInCoxeterTriangulation describes the requirements * for a type to implement a representation of simplices in Freudenthal_triangulation * or in Coxeter_triangulation. */ struct SimplexInCoxeterTriangulation { - /** \brief Type of the vertex. */ typedef Vertex_ Vertex; - + /** \brief Type of the ordered partition. */ typedef Ordered_set_partition_ OrderedSetPartition; @@ -32,13 +35,13 @@ struct SimplexInCoxeterTriangulation { /** \brief Type of a range of vertices, each of type Vertex. */ typedef Vertex_range; - + /** \brief Returns a range of vertices of the simplex. */ Vertex_range vertex_range() const; - /** \brief Type of a range of faces, each of type that - * is a model of the concept SimplexInCoxeterTriangulation. + /** \brief Type of a range of faces, each of type that + * is a model of the concept SimplexInCoxeterTriangulation. */ typedef Face_range; @@ -52,8 +55,8 @@ struct SimplexInCoxeterTriangulation { */ Face_range facet_range() const; - /** \brief Type of a range of cofaces, each of type that - * is a model of the concept SimplexInCoxeterTriangulation. + /** \brief Type of a range of cofaces, each of type that + * is a model of the concept SimplexInCoxeterTriangulation. */ typedef Coface_range; @@ -69,12 +72,10 @@ struct SimplexInCoxeterTriangulation { /** \brief Returns true, if the simplex is a face of other simplex. */ bool is_face_of(const Permutahedral_representation& other) const; - }; } // namespace coxeter_triangulation } // namespace Gudhi - #endif diff --git a/src/Coxeter_triangulation/concept/TriangulationForManifoldTracing.h b/src/Coxeter_triangulation/concept/TriangulationForManifoldTracing.h index 4f3d4411..2b5d568c 100644 --- a/src/Coxeter_triangulation/concept/TriangulationForManifoldTracing.h +++ b/src/Coxeter_triangulation/concept/TriangulationForManifoldTracing.h @@ -11,23 +11,24 @@ #ifndef CONCEPT_COXETER_TRIANGULATION_TRIANGULATION_FOR_MANIFOLD_TRACING_H_ #define CONCEPT_COXETER_TRIANGULATION_TRIANGULATION_FOR_MANIFOLD_TRACING_H_ +#include <Eigen/Dense> + namespace Gudhi { namespace coxeter_triangulation { -/** \brief The concept TriangulationForManifoldTracing describes the requirements +/** \brief The concept TriangulationForManifoldTracing describes the requirements * for a type to implement a triangulation class used for example in Manifold_tracing. */ struct TriangulationForManifoldTracing { - - /** \brief Type of the simplices in the triangulation. + /** \brief Type of the simplices in the triangulation. * Needs to be a model of the concept SimplexInCoxeterTriangulation. */ typedef Simplex_handle; - /** \brief Type of the vertices in the triangulation. + /** \brief Type of the vertices in the triangulation. * Needs to be a random-access range of integer values. */ typedef Vertex_handle; - + /** \brief Returns the permutahedral representation of the simplex in the * triangulation that contains a given query point 'p'. * \tparam Point_d A class that represents a point in d-dimensional Euclidean space. @@ -37,21 +38,19 @@ struct TriangulationForManifoldTracing { template <class Point_d> Simplex_handle locate_point(const Point_d& point) const; - /** \brief Returns the Cartesian coordinates of the given vertex 'v'. + /** \brief Returns the Cartesian coordinates of the given vertex 'v'. * @param[in] v The input vertex. */ Eigen::VectorXd cartesian_coordinates(const Vertex_handle& v) const; - /** \brief Returns the Cartesian coordinates of the barycenter of a given simplex 's'. + /** \brief Returns the Cartesian coordinates of the barycenter of a given simplex 's'. * @param[in] s The input simplex given by permutahedral representation. */ Eigen::VectorXd barycenter(const Simplex_handle& s) const; - }; } // namespace coxeter_triangulation } // namespace Gudhi - #endif |