diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/HyperbolicOctagonTranslation.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/HyperbolicOctagonTranslation.h deleted file mode 100644 index 00222814a20..00000000000 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/HyperbolicOctagonTranslation.h +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2016-2017 INRIA Nancy - Grand Est (France). -// All rights reserved. - -/*! -\ingroup PkgPeriodic4HyperbolicTriangulation2Concepts -\cgalConcept -\cgalModifBegin -The concept `HyperbolicOctagonTranslation` describes the requirements for an object that represents -a hyperbolic translation in the fundamental group \f$\mathcal G\f$ of the the Bolza surface. - -Generally, a hyperbolic translation \f$g\f$ is an orientation-preserving isometry acting -on the hyperbolic plane, and is specified by two complex numbers \f$\alpha\f$ and \f$\beta\f$: -\f[ - g(z) = \frac{\alpha \cdot z + \beta}{\overline{\beta} \cdot z + \overline{\alpha}}, - \qquad |\alpha|^2 - |\beta|^2 = 1, -\f] -where \f$\overline{a}\f$ and \f$\overline{b}\f$ denote the complex conjugates of \f$a\f$ -and \f$b\f$ respectively. A hyperbolic translation is also a word on the generators of the -fundamental group of a hyperbolic surface. - -Specifically for the group \f$\mathcal G\f$, let \f$[g_0, g_1, \ldots, g_7]\f$ be the set of its -generators, ordered counter-clockwise around the origin, with \f$g_k\f$ translating the origin -\f$O\f$ along the real axis in the positive direction. The coefficients \f$\alpha_k\f$ and \f$\beta_k\f$ -of each generator of this ordered set are given as -\f[ - \alpha_k = 1 + \sqrt{2}, \qquad \beta_k = \exp\left(\tfrac{ik\pi}{4}\right)\sqrt{2}\sqrt{1+\sqrt{2}}. -\f] -Note that with the notation given in Section \ref P4HT2_thespace of the User manual, the ordered -set of generators can be written also as -\f[ - [g_k, k = 0, \ldots, 7] = [ a, \overline{b}, c, \overline{d}, \overline{a}, b, \overline{c}, d ]. -\f] -\cgalModifEnd - -\cgalHasModel CGAL::Hyperbolic_octagon_translation -*/ - - -class HyperbolicOctagonTranslation { - -public: - - - /// \name Types - - /// Number type of the coefficients of \f$\alpha\f$ and \f$\beta\f$. - /// This number type must be compatible with the field type `FT` of the concept - /// `Periodic_4HyperbolicDelaunayTriangulationTraits_2`. - typedef unspecified_type NT; - - /// \cgalModifBegin Represents a single letter of the word corresponding to the translation. \cgalModifEnd - typedef unsigned short int Word_letter; - - /// Word representation of the translation, a sequence of elements of type `Word_letter`. - typedef std::vector Word; - - /// \cgalModifBegin Represents a complex number with coefficients of type `NT`.\cgalModifEnd - typedef std::pair Complex; - - /// \cgalModifBegin Represents the coefficients \f$\alpha\f$ and \f$\beta\f$ of a hyperbolic translation.\cgalModifEnd - typedef std::pair Coefficients; - - /// \name Creation - - /// Default constructor. Creates the identity translation. - HyperbolicOctagonTranslation(); - - /// Creates the translation described by the word `w`. - HyperbolicOctagonTranslation(Word w); - - /// Creates the translation described by the one-letter word `l`. - HyperbolicOctagonTranslation(Word_letter l); - - /// Creates the translation described by the two-letter word `lm`. - HyperbolicOctagonTranslation(Word_letter l, Word_letter m); - - /// Creates the translation described by the three-letter word `lmn`. - HyperbolicOctagonTranslation(Word_letter l, Word_letter m, Word_letter n); - - /// Creates the translation described by the four-letter word `lmno`. - HyperbolicOctagonTranslation(Word_letter l, Word_letter m, Word_letter n, Word_letter o); - - - /// \name Operations - - /// Multiplication operator; composes the current translation with `other`. - HyperbolicOctagonTranslation operator*(const HyperbolicOctagonTranslation& other) const; - - /// Difference operator; the difference of two translations \f$v\f$ and \f$w\f$ is defined as \f$v * w^{-1}\f$. - HyperbolicOctagonTranslation operator-(const HyperbolicOctagonTranslation& other) const; - - /// Assignment operator; modifying the translation after the assignment leaves `other` unaffected. - HyperbolicOctagonTranslation& operator=(const HyperbolicOctagonTranslation& other); - - /// Equality operator. - bool operator==(const Hyperbolic_octagon_translation& other) const; - - /// Inequality operator. - bool operator!=(const Hyperbolic_octagon_translation& other) const; - - /// Comparison operator. - /// The comparison is done on the ordering of the translations around the original domain. - bool operator<(const Hyperbolic_octagon_translation& other) const; - - /// Returns the inverse of the current translation. - HyperbolicOctagonTranslation inverse() const; - - - /// \name Access Functions - - /// Returns the coefficient \f$\alpha\f$ of the translation's matrix. The first element of the returned `pair` - /// contains the real part of \f$\alpha\f$. The second element contains its imaginary part. - Complex alpha() const; - - /// Returns the coefficient \f$\beta\f$ of the translation's matrix. The first element of the returned `pair` - /// contains the real part of \f$\beta\f$. The second element contains its imaginary part. - Complex beta() const; - - /// Returns `true` if the current translation represents the identity element of the group. - bool is_identity(); - - - /// \name Static Access Functions - - /*! - \cgalModifBegin - Returns a vector containing the coefficients of the generators of \f$\mathcal G\f$ and of their inverses. - The translations must be given in the order: - \f[ [g_0, g_1, \ldots, g_7]. \f] - \cgalModifEnd - */ - static void get_generator_coefficients(std::vector< Coefficients >& gens); - - - /*! - \cgalModifBegin - Returns a vector containing the generators of \f$\mathcal G\f$ and their inverses. - The translations must be given in the order: - \f[ [g_0, g_1, \ldots, g_7]. \f] - \cgalModifEnd - */ - static void get_generators(std::vector& gens); - -}; // end of class HyperbolicOctagonTranslation - diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h index 38876c0ee49..21a556b8eb2 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h @@ -7,23 +7,13 @@ \cgalRefines Periodic_4HyperbolicTriangulationTraits_2 -The concept `Periodic_4HyperbolicDelaunayTriangulationTraits_2` refines the concept -`Periodic_4HyperbolicDelaunayTriangulationTraits_2`. It adds a requirement that needs -to be fulfilled by any class used to instantiate the first template parameter of the class +The concept `Periodic_4HyperbolicDelaunayTriangulationTraits_2` adds a requirement +to `Periodic_4HyperbolicDelaunayTriangulationTraits_2` that needs to be fulfilled +by any class used to instantiate the first template parameter of the class `CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2`. The added requirement is essential for the removal of existing vertices in a Delaunay triangulation of the Bolza surface. -\cgalModifBegin - The concept requires that two nested types are provided: -
    -
  • A field number type `FT` that must support exact computations with algebraic - numbers, in particular with nested square roots; -
  • A `Hyperbolic_translation` type, which satisfies the requirements described - in the concept `HyperbolicOctagonTranslation`. -
-\cgalModifEnd - \cgalHasModel CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2 */ @@ -36,13 +26,15 @@ public: /// \name Computation Types /// @{ /*! + \cgalModifBegin Type that permits to compute the hyperbolic diameter of a circle. Must provide the function operator - `double operator()(Circle_2 c),` + `double operator()(Hyperbolic_point_2 p1, Hyperbolic_point_2 p2, Hyperbolic_point_2 p3),` which returns a floating-point approximation of the hyperbolic diameter - of the circle `c`. + of the circle defined by the points `p1, p2,` and `p3`. + \cgalModifEnd */ typedef unspecified_type Compute_approximate_hyperbolic_diameter; /// @} diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h index 66ac0ac653b..ab67d08d709 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h @@ -16,9 +16,11 @@ Compare with Section \ref Section_2D_Triangulations_Software_Design of the 2D Tr package. The vertices and neighbors are indexed counter-clockwise 0, 1, and 2. Neighbor `i` lies opposite to vertex `i`. -For periodic hyperbolic triangulations, the face base class needs to store three hyperbolic translations, -one for each vertex. Applying each translation to the point stored in the corresponding vertex produces -the canonical representative of the face in the hyperbolic plane. +For periodic hyperbolic triangulations, the face base class needs to store three hyperbolic +translations, one for each vertex. Applying each translation to the point stored in the +corresponding vertex produces the canonical representative of the face in the hyperbolic plane. +Hyperbolic translations are represented by a nested type which is provided by the concept +`Periodic_4HyperbolicDelaunayTriangulationTraits_2`. \cgalHasModel CGAL::Periodic_4_hyperbolic_triangulation_face_base_2 @@ -32,12 +34,9 @@ class Periodic_4HyperbolicTriangulationFaceBase_2 public: /// \name Types - /// @{ - - /*! - This must be a model of the concept HyperbolicOctagonTranslation. - */ - typedef undefined_type Hyperbolic_translation; + /// @{ + typedef Periodic_4HyperbolicDelaunayTriangulationTraits_2 Geometric_traits; + typedef Geometric_traits::Hyperbolic_translation Hyperbolic_translation; ///@} diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h index 852d0ccf9a5..8508e80598c 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h @@ -7,22 +7,16 @@ \cgalRefines HyperbolicDelaunayTriangulationTraits_2 -The concept `Periodic_4HyperbolicTriangulationTraits_2` refines the concept -`HyperbolicDelaunayTriangulationTraits_2`. It describes the set of requirements to be -fulfilled by any class used to instantiate the first template parameter of the class -`CGAL::Periodic_4_hyperbolic_triangulation_2`. In addition to the geometric -types and the operations defined on them in `HyperbolicDelaunayTriangulationTraits_2`, -it defines the hyperbolic translations that allow to encode the periodicity of the -triangulation. +The concept `Periodic_4HyperbolicTriangulationTraits_2` describes the set of requirements +to be fulfilled by any class used to instantiate the first template parameter of the class +`CGAL::Periodic_4_hyperbolic_triangulation_2`. In addition to the geometric types and the +operations defined on them in `HyperbolicDelaunayTriangulationTraits_2`, it defines the +hyperbolic translations that allow to encode the periodicity of the triangulation. \cgalModifBegin - The concept requires that two nested types are provided: -
    -
  • A field number type `FT` that must support exact computations with algebraic - numbers, in particular with nested square roots; -
  • A `Hyperbolic_translation` type, which satisfies the requirements described - in the concept `HyperbolicOctagonTranslation`. -
+The concept requires that a nested field number type `FT` is provided. The type `FT` +must support exact computations with algebraic numbers, in particular with nested +square roots. \cgalModifEnd */ @@ -37,18 +31,10 @@ public: /// \name Types /// @{ - /*! - \cgalModifBegin - Represents a hyperbolic circle, i.e., a circle contained in the unit disk. - \cgalModifEnd - */ - typedef unspecified_type Circle_2; - /*! Represents a hyperbolic translation. - Must be a model of the concept `HyperbolicOctagonTranslation`. */ - typedef unspecified_type Hyperbolic_translation; + typedef CGAL::Hyperbolic_octagon_translation Hyperbolic_translation; /// @} @@ -57,7 +43,7 @@ public: /*! Predicate type. Must provide the function operator - `Bounded_side operator()(Point_2 p),` + `Bounded_side operator()(Hyperbolic_point_2 p),` which returns the position of point `p` relative to the half-open regular hyperbolic octagon. @@ -71,12 +57,12 @@ public: /*! Construction type. Must provide the function operator - `Point_2 operator() ( const Point_2& pt, const HyperbolicOctagonTranslation& tr ) const,` + `Hyperbolic_point_2 operator() ( const Hyperbolic_point_2& pt, const Hyperbolic_translation& tr ) const,` which returns the image of the point `pt` under the action of the hyperbolic translation `tr`. */ - typedef unspecified_type Construct_point_2; + typedef unspecified_type Construct_hyperbolic_point_2; /// @} @@ -92,8 +78,8 @@ public: /// \name /// The following functions give access to the construction objects: /// @{ - Construct_point_2 - construct_point_2_object() const; + Construct_hyperbolic_point_2 + construct_hyperbolic_point_2_object() const; /// @} };