AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
alvinfraction.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2014, 2015, 2016
3 Rafael Guglielmetti, rafael.guglielmetti@unifr.ch
4 */
5 
6 /*
7 This file is part of AlVin.
8 
9 CoxIter is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as
11 published by the Free Software Foundation, either version 3 of the
12 License, or (at your option) any later version.
13 
14 CoxIter is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with AlVin. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
31 #ifndef ALVINFRACTION_H
32 #define ALVINFRACTION_H
33 
34 #include "algebraicinteger.h"
35 
37 {
38  public: // For simplicity, variables are public be are meant to be read-only. Careful.
42 
43  public:
44  AlVinFraction( AlgebraicInteger* aiX0, AlgebraicInteger* aiNorm2, AlgebraicInteger* aiNumerator );
45  ~AlVinFraction();
46 
47  bool operator==( AlVinFraction const& ) const;
48  bool operator!=( AlVinFraction const& ) const;
49 
50  friend bool operator<( const AlVinFraction &f1, const AlVinFraction &f2 );
51  friend ostream& operator<<( ostream& , AlVinFraction const & );
52 };
53 
57 bool isLessThanPtrAlVinFraction( const AlVinFraction* a, const AlVinFraction* b );
58 
59 #endif // ALVINFRACTION_H
AlgebraicInteger * aiNumerator
When normalized with respect to the biggest possible value for (e,e): x_0^2 / (e,e) = ( x_0^2 * (e_ma...
Definition: alvinfraction.h:41
bool isLessThanPtrAlVinFraction(const AlVinFraction *a, const AlVinFraction *b)
Check if *a < *b.
Definition: alvinfraction.cpp:37
AlgebraicInteger * aiX0
x_0
Definition: alvinfraction.h:39
Parent class for rational, quadratic and rc7 integers.
Definition: algebraicinteger.h:43
AlgebraicInteger * aiNorm2
(e,e)
Definition: alvinfraction.h:40
This class represents one fraction x0^2 / (e,e)
Definition: alvinfraction.h:36