CGAL 5.5.2 - 2D Periodic Hyperbolic Triangulations
CGAL::Hyperbolic_octagon_translation< FT > Class Template Reference

#include <CGAL/Hyperbolic_octagon_translation.h>

## Definition

### template<typename FT = CORE::Expr> class CGAL::Hyperbolic_octagon_translation< FT >

The class Hyperbolic_octagon_translation defines an object to represent a hyperbolic translation of the fundamental group of the Bolza surface $$\mathcal M$$.

It accepts one template parameter:

Template Parameters
 FT Field number type. Must provide exact computations with algebraic numbers, notably with nested square roots. The default value for this parameter is CORE::Expr.

A translation $$g$$ in $$\mathcal G$$ is a mapping acting on the hyperbolic plane $$\mathbb H^2$$. It has the form

$g(z) = \frac{ \alpha\cdot z + \beta }{ \overline{\beta}\cdot z + \overline{\alpha} }, \qquad \alpha,\beta \in \mathbb C, \qquad z \in \mathbb H^2, \qquad |\alpha|^2 - |\beta|^2 = 1,$

where $$\overline{\alpha}$$ ane $$\overline{\beta}$$ are the complex conjugates of $$\alpha$$ and $$\beta$$ respectively. In this implementation, the translation $$g$$ is uniquely defined by its coefficients $$\alpha$$ and $$\beta$$.

Considering the set of generators $$\mathcal A = [a, \overline{b}, c, \overline{d}, \overline{a}, b, \overline{c}, d]$$ as an alphabet, a translation $$g$$ in $$\mathcal G$$ can be seen as a word on the alphabet $$\mathcal A$$. Each letter of this alphabet is represented as an unsigned integer from from 0 to 7, and each word (i.e., translation) is a sequence of letters.

## Types

enum  Generator : Word_letter {
A = 0, B_BAR = 1, C = 2, D_BAR = 3,
A_BAR = 4, B = 5, C_BAR = 6, D = 7
}
Enumeration type for the alphabet $$\mathcal A$$. More...

typedef unspecified_type FT
Field number type of the coefficients of $$\alpha$$ and $$\beta$$. More...

typedef unsigned short int Word_letter
Represents a single letter of the alphabet $$\mathcal A$$. More...

typedef std::vector< Word_letterWord
Represents a word on the alphabet $$\mathcal A$$. More...

## Creation

Hyperbolic_octagon_translation ()
Default constructor. Creates the identity translation of the group $$\mathcal G$$.

Hyperbolic_octagon_translation (Word w)
Creates the translation described by the word w.

Hyperbolic_octagon_translation (Word_letter l)
Creates the translation described by the one-letter word l.

Hyperbolic_octagon_translation (Word_letter l, Word_letter m)
Creates the translation described by the two-letter word lm.

Hyperbolic_octagon_translation (Word_letter l, Word_letter m, Word_letter n)
Creates the translation described by the three-letter word lmn.

Hyperbolic_octagon_translation (Word_letter l, Word_letter m, Word_letter n, Word_letter o)
Creates the translation described by the four-letter word lmno.

## Operations

Hyperbolic_octagon_translation operator* (const Hyperbolic_octagon_translation &other) const
Multiplication operator; composes the current translation with other.

Hyperbolic_octagon_translation operator- (const Hyperbolic_octagon_translation &other) const
Difference operator; the difference of two translations $$v$$ and $$w$$ is defined as $$v * w^{-1}$$.

Hyperbolic_octagon_translationoperator= (const Hyperbolic_octagon_translation &other)
Assignment operator; modifying the translation after the assignment leaves other unaffected.

bool operator== (const Hyperbolic_octagon_translation< FT > &other) const
Equality operator.

bool operator!= (const Hyperbolic_octagon_translation< FT > &other) const
Inequality operator.

bool operator< (const Hyperbolic_octagon_translation< FT > &other) const
Comparison operator. More...

Hyperbolic_octagon_translation inverse () const
Returns the inverse of the current translation.

## Access Functions

std::pair< FT, FTalpha () const
Returns the coefficient $$\alpha$$ of the translation. More...

std::pair< FT, FTbeta () const
Returns the coefficient $$\beta$$ of the translation. More...

bool is_identity ()
Returns true if the current translation represents the identity element of the group $$\mathcal G$$.

## Static Access Functions

static Self generator (const Word_letter wl)
Return the generator wl of the group $$\mathcal G$$. More...

static void generators (std::vector< Hyperbolic_octagon_translation< FT > > &gens)
Returns the set of generators of $$\mathcal G$$ and their inverses in a std::vector. More...

## Utility Functions

std::string to_string () const
Returns a string representation of the translation, containing its Word_letters. More...

## ◆ FT

template<typename FT = CORE::Expr>
 typedef unspecified_type CGAL::Hyperbolic_octagon_translation< FT >::FT

Field number type of the coefficients of $$\alpha$$ and $$\beta$$.

This number type must be the same as the field number type FT of the class Periodic_4_hyperbolic_Delaunay_triangulation_2_traits.

alpha()
beta()

## ◆ Word

template<typename FT = CORE::Expr>
 typedef std::vector CGAL::Hyperbolic_octagon_translation< FT >::Word

Represents a word on the alphabet $$\mathcal A$$.

By extension, represents a hyperbolic translation in the group $$\mathcal A$$.

## ◆ Word_letter

template<typename FT = CORE::Expr>
 typedef unsigned short int CGAL::Hyperbolic_octagon_translation< FT >::Word_letter

Represents a single letter of the alphabet $$\mathcal A$$.

By extension, represents a generator of the group $$\mathcal G$$.

## ◆ Generator

template<typename FT = CORE::Expr>

Enumeration type for the alphabet $$\mathcal A$$.

This enumeration can be used to recover the generators of the group $$\mathcal G$$.

generator()
Enumerator

translation $$a$$

B_BAR

translation $$\overline{b}$$

translation $$c$$

D_BAR

translation $$\overline{d}$$

A_BAR

translation $$\overline{a}$$

translation $$b$$

C_BAR

translation $$\overline{c}$$

translation $$d$$

## ◆ alpha()

template<typename FT = CORE::Expr>
 std::pair CGAL::Hyperbolic_octagon_translation< FT >::alpha ( ) const

Returns the coefficient $$\alpha$$ of the translation.

The first element of the returned pair contains the real part of $$\alpha$$. The second element contains its imaginary part.

## ◆ beta()

template<typename FT = CORE::Expr>
 std::pair CGAL::Hyperbolic_octagon_translation< FT >::beta ( ) const

Returns the coefficient $$\beta$$ of the translation.

The first element of the returned pair contains the real part of $$\beta$$. The second element contains its imaginary part.

## ◆ generator()

template<typename FT = CORE::Expr>
 static Self CGAL::Hyperbolic_octagon_translation< FT >::generator ( const Word_letter wl )
static

Return the generator wl of the group $$\mathcal G$$.

Note that wl can be an element of the enumeration set Generator. The calls generator(0) and generator(A) will both return the translation $$a$$.

## ◆ generators()

template<typename FT = CORE::Expr>
 static void CGAL::Hyperbolic_octagon_translation< FT >::generators ( std::vector< Hyperbolic_octagon_translation< FT > > & gens )
static

Returns the set of generators of $$\mathcal G$$ and their inverses in a std::vector.

The generators are given in the order: $$[a, \overline{b}, c, \overline{d}, \overline{a}, b, \overline{c}, d].$$

## ◆ to_string()

template<typename FT = CORE::Expr>
 std::string CGAL::Hyperbolic_octagon_translation< FT >::to_string ( ) const

Returns a string representation of the translation, containing its Word_letters.

This function is given as utility for printing/debugging purposes. For example, for the translation $$abcd$$, this function returns 0527, and for the identity it returns _.