From fbad5de0c0525e932d17f71f67afedd144632a5c Mon Sep 17 00:00:00 2001 From: POUGET Marc Date: Thu, 25 Jul 2024 16:03:49 +0200 Subject: [PATCH] debug --- .../CGAL/Hyperbolic_fundamental_domain_2.h | 10 ++++---- .../Hyperbolic_fundamental_domain_factory_2.h | 2 +- .../CGAL/Hyperbolic_surface_triangulation_2.h | 24 +++++++++---------- .../CGAL/Hyperbolic_surface_triangulation_2.h | 10 ++++---- .../hs_test_circular_kernel.cpp | 6 ++--- .../hs_test_lazy_exact_nt.cpp | 6 ++--- .../hs_test_triangulation.cpp | 8 +++---- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_2.h b/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_2.h index b0ddf96d34a3..42f8a9fddfc2 100644 --- a/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_2.h +++ b/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_2.h @@ -40,28 +40,28 @@ class Hyperbolic_fundamental_domain_2 { /// \name Access functions /// @{ /*! - Returns the number of vertices (equivalently, the number of sides) of the domain. + returns the number of vertices (equivalently, the number of sides) of the domain. \pre is_valid() */ int size() const; /*! - Returns the \f$ i \f$-th vertex. + returns the \f$ i \f$-th vertex. \pre is_valid() */ Point vertex(int i) const; /*! - Returns the index of the side paired to the \f$ i \f$-th side. + returns the index of the side paired to the \f$ i \f$-th side. \pre is_valid() */ int paired_side(int i) const; /*! - Returns the isometry that maps side \f$ \overline A \f$ to side \f$ A + returns the isometry that maps side \f$ \overline A \f$ to side \f$ A \f$, where \f$ A \f$ is the \f$ i \f$-th side, and \f$ \overline A \f$ is the side paired to \f$ A \f$. \pre is_valid() @@ -81,7 +81,7 @@ class Hyperbolic_fundamental_domain_2 { void operator>>(std::istream& s, Hyperbolic_fundamental_domain_2& domain); /*! - Writes the domain in a stream. + writes the domain in a stream. The format of the output is the following. The first line prints the number n of vertices of the domain. diff --git a/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_factory_2.h b/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_factory_2.h index 3baf5c6a74b8..0eb2756c7dfd 100644 --- a/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_factory_2.h +++ b/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_fundamental_domain_factory_2.h @@ -21,7 +21,7 @@ class Hyperbolic_fundamental_domain_factory_2{ /// \name Generation of a domain /// @{ /*! - Randomly generates a convex domain of a closed orientable hyperbolic surface of genus two. + randomly generates a convex domain of a closed orientable hyperbolic surface of genus two. */ Hyperbolic_fundamental_domain_2 generate_domain_g2(); /// @} diff --git a/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_surface_triangulation_2.h b/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_surface_triangulation_2.h index 998d189530d1..da1673811807 100644 --- a/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_surface_triangulation_2.h +++ b/Hyperbolic_surface_triangulation_2/doc/Hyperbolic_surface_triangulation_2/CGAL/Hyperbolic_surface_triangulation_2.h @@ -56,7 +56,7 @@ class Hyperbolic_surface_triangulation_2{ typedef typename Traits::Hyperbolic_point_2 Point; /*! - Stores a dart \f$ d \f$ of the combinatorial map, belonging to a triangle \f$ t \f$, and stores the three vertices of a lift of \f$ t \f$ in the hyperbolic plane. + stores a dart \f$ d \f$ of the combinatorial map, belonging to a triangle \f$ t \f$, and stores the three vertices of a lift of \f$ t \f$ in the hyperbolic plane. */ struct Anchor{ typename Combinatorial_map_with_cross_ratios::Dart_handle dart; @@ -98,21 +98,21 @@ class Hyperbolic_surface_triangulation_2{ /// \name Access functions /// @{ /*! - Returns the decorated combinatorial map. + returns the decorated combinatorial map. \pre is_valid() */ - Combinatorial_map_with_cross_ratios& get_combinatorial_map_ref(); + Combinatorial_map_with_cross_ratios& combinatorial_map(); /*! - Tells if the triangulation has an anchor. + tells if the triangulation has an anchor. \pre is_valid() */ bool has_anchor() const; /*! - Returns the anchor. + returns the anchor. \pre is_valid() && has_anchor() */ @@ -122,26 +122,26 @@ class Hyperbolic_surface_triangulation_2{ /// \name Delaunay flip algorithm /// @{ /*! - Tells if if the edge supported by the dart is Delaunay flippable. + tells if if the edge supported by the dart is Delaunay flippable. \pre is_valid() */ bool is_delaunay_flippable(Dart_handle dart) const; /*! - Flips the edge supported by the dart. + flips the edge supported by the dart. \pre is_valid() */ void flip(Dart_handle dart); /*! - Determines if the triangulation is a valid Delaunay triangulation. + determines if the triangulation is a valid Delaunay triangulation. */ bool is_delaunay() const; /*! - Applies the Delaunay flip algorithm: flips Delaunay flippable edges until there is no such edge anymore. + applies the Delaunay flip algorithm: flips Delaunay flippable edges until there is no such edge anymore. \pre is_valid() */ @@ -151,7 +151,7 @@ class Hyperbolic_surface_triangulation_2{ /// \name Lifting /// @{ /*! - Lifts the triangulation in the hyperbolic plane. + lifts the triangulation in the hyperbolic plane. Returns, for every triangle \f$ t \f$ of the triangulation, one of the darts of \f$ t \f$ in the combinatorial map of the triangulation, together with a triple \f$ p,q,r \f$ of points in the hyperbolic plane. The points \f$ p,q,r \f$ are the vertices of a lift of \f$ t \f$ in the hyperbolic plane. If the center parameter is set to true, then one of the lifted triangles admits the origin \f$ 0 \f$ as a vertex. @@ -174,7 +174,7 @@ class Hyperbolic_surface_triangulation_2{ /// \name Input/output /// @{ /*! - Writes the triangulation in a stream. + writes the triangulation in a stream. The format of the output is the following. Each dart of the triangulation is given an index between \f$ 0 \f$ and \f$ n-1 \f$, where \f$ n \f$ is the number of darts of the triangulation. The first line contains the number \f$ n \f$ of darts. @@ -188,7 +188,7 @@ class Hyperbolic_surface_triangulation_2{ std::ostream& operator<<(std::ostream& s, Hyperbolic_surface_triangulation_2& Hyperbolic_surface_triangulation_2); /*! - Reads the triangulation from a stream. + reads the triangulation from a stream. The format of the input should be the same as the format of the output of the '<<' operator. \pre is_valid() diff --git a/Hyperbolic_surface_triangulation_2/include/CGAL/Hyperbolic_surface_triangulation_2.h b/Hyperbolic_surface_triangulation_2/include/CGAL/Hyperbolic_surface_triangulation_2.h index 7a2bf9c252db..088235cbfd3f 100644 --- a/Hyperbolic_surface_triangulation_2/include/CGAL/Hyperbolic_surface_triangulation_2.h +++ b/Hyperbolic_surface_triangulation_2/include/CGAL/Hyperbolic_surface_triangulation_2.h @@ -81,7 +81,7 @@ class Hyperbolic_surface_triangulation_2{ //Hyperbolic_surface_triangulation_2& operator=(Hyperbolic_surface_triangulation_2&& other); Hyperbolic_surface_triangulation_2& operator=(Hyperbolic_surface_triangulation_2 other); - Combinatorial_map_with_cross_ratios& get_combinatorial_map_ref(); + Combinatorial_map_with_cross_ratios& combinatorial_map(); bool has_anchor() const; Anchor& anchor() const; @@ -219,10 +219,10 @@ template //Hyperbolic_surface_triangulation_2& Hyperbolic_surface_triangulation_2::operator=(Hyperbolic_surface_triangulation_2&& other){ Hyperbolic_surface_triangulation_2& Hyperbolic_surface_triangulation_2::operator=(Hyperbolic_surface_triangulation_2 other){ if (other.has_anchor()){ - copy_from(other.get_combinatorial_map_ref(), other.anchor()); + copy_from(other.combinatorial_map(), other.anchor()); } else { - copy_from(other.get_combinatorial_map_ref()); + copy_from(other.combinatorial_map()); } return *this; } @@ -230,7 +230,7 @@ template //////////////////////////////////////////////////////////////////////////////// template -typename Hyperbolic_surface_triangulation_2::Combinatorial_map_with_cross_ratios& Hyperbolic_surface_triangulation_2::get_combinatorial_map_ref(){ +typename Hyperbolic_surface_triangulation_2::Combinatorial_map_with_cross_ratios& Hyperbolic_surface_triangulation_2::combinatorial_map(){ return _combinatorial_map; } @@ -239,7 +239,7 @@ bool Hyperbolic_surface_triangulation_2::has_anchor() const return _has_anchor; } - template +template typename Hyperbolic_surface_triangulation_2::Anchor& Hyperbolic_surface_triangulation_2::anchor() const{ return _anchor; diff --git a/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_circular_kernel.cpp b/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_circular_kernel.cpp index 058ea564090c..1fa5cd79a432 100644 --- a/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_circular_kernel.cpp +++ b/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_circular_kernel.cpp @@ -31,7 +31,7 @@ int main() { assert( triangulation0.is_valid() ); - Triangulation triangulation1 = Triangulation(triangulation0.get_combinatorial_map_ref()); + Triangulation triangulation1 = Triangulation(triangulation0.combinatorial_map()); assert( ! triangulation1.has_anchor() ); Triangulation triangulation (triangulation0); @@ -57,8 +57,8 @@ int main() { output_not_centered = triangulation.lift(false); output_centered = triangulation.lift(); - Triangulation::Combinatorial_map_with_cross_ratios& cmap = triangulation.get_combinatorial_map_ref(); - Triangulation::Anchor& anchor = triangulation.get_anchor_ref(); + Triangulation::Combinatorial_map_with_cross_ratios& cmap = triangulation.combinatorial_map(); + Triangulation::Anchor& anchor = triangulation.anchor(); assert( cmap.is_dart_used(anchor.dart) ); std::cout << "printing triangulation for test purposes : " << std::endl << triangulation; diff --git a/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_lazy_exact_nt.cpp b/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_lazy_exact_nt.cpp index a8d30e3b4a3f..29420b0bd30c 100644 --- a/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_lazy_exact_nt.cpp +++ b/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_lazy_exact_nt.cpp @@ -28,7 +28,7 @@ int main() { assert( triangulation0.is_valid() ); - Triangulation triangulation1 = Triangulation(triangulation0.get_combinatorial_map_ref()); + Triangulation triangulation1 = Triangulation(triangulation0.combinatorial_map()); assert( ! triangulation1.has_anchor() ); Triangulation triangulation (triangulation0); @@ -54,8 +54,8 @@ int main() { output_not_centered = triangulation.lift(false); output_centered = triangulation.lift(); - Triangulation::Combinatorial_map_with_cross_ratios& cmap = triangulation.get_combinatorial_map_ref(); - Triangulation::Anchor& anchor = triangulation.get_anchor_ref(); + Triangulation::Combinatorial_map_with_cross_ratios& cmap = triangulation.combinatorial_map(); + Triangulation::Anchor& anchor = triangulation.anchor(); assert( cmap.is_dart_used(anchor.dart) ); std::cout << "printing triangulation for test purposes : " << std::endl << triangulation; diff --git a/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_triangulation.cpp b/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_triangulation.cpp index fb72db65b90a..d191c01f2c00 100644 --- a/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_triangulation.cpp +++ b/Hyperbolic_surface_triangulation_2/test/Hyperbolic_surface_triangulation_2/hs_test_triangulation.cpp @@ -38,7 +38,7 @@ Domain build_domain(){ pairings.push_back((k+4)%8); } - return Domain(vertices, pairings); + return Domain(vertices.begin(),vertices.end(), pairings.begin(),pairings.end()); } int main() { @@ -47,7 +47,7 @@ int main() { assert( triangulation0.is_valid() ); - Triangulation triangulation1 = Triangulation(triangulation0.get_combinatorial_map_ref()); + Triangulation triangulation1 = Triangulation(triangulation0.combinatorial_map()); assert( ! triangulation1.has_anchor() ); Triangulation triangulation (triangulation0); @@ -73,8 +73,8 @@ int main() { output_not_centered = triangulation.lift(false); output_centered = triangulation.lift(); - Triangulation::Combinatorial_map_with_cross_ratios& cmap = triangulation.get_combinatorial_map_ref(); - Triangulation::Anchor& anchor = triangulation.get_anchor_ref(); + Triangulation::Combinatorial_map_with_cross_ratios& cmap = triangulation.combinatorial_map(); + Triangulation::Anchor& anchor = triangulation.anchor(); assert( cmap.is_dart_used(anchor.dart) ); std::cout << "printing triangulation for test purposes : " << std::endl << triangulation;