AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
alvinfractions.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 
34 #ifndef ALVINFRACTIONS_H
35 #define ALVINFRACTIONS_H
36 
37 #include <vector>
38 #include <iostream>
39 #include <cmath>
40 
41 using namespace std;
42 
43 #include "algebraicinteger.h"
44 #include "alvinfraction.h"
45 
47 {
48  protected:
49  vector< AlgebraicInteger* > aiPossibleNorms2;
50  AlgebraicInteger* aiPossibleNorms2_max;
51 
52  vector< AlVinFraction* > alvinfractions;
53  vector< AlVinFraction* >::const_iterator alvinfractions_it;
54 
55  unsigned int iLastMaximum;
56  unsigned int iBatchSize;
57 
58  public:
63  AlVinFractions( vector< AlgebraicInteger* > aiPossibleNorms2 );
64 
65  virtual ~AlVinFractions();
66 
71  vector< AlVinFraction* > getNextAlVinFraction();
72 
73  vector< AlgebraicInteger* > get_aiPossibleNorm2() const;
74  const vector< AlgebraicInteger* >* get_ptraiPossibleNorm2() const;
75 
76  private:
77  virtual void computeNextAlVinFractions() = 0;
78 };
79 
80 #endif // ALVINFRACTIONS_H
Parent class for rational, quadratic and rc7 integers.
Definition: algebraicinteger.h:43
vector< AlVinFraction * >::const_iterator alvinfractions_it
Iterator to the next element to be returned.
Definition: alvinfractions.h:53
vector< AlgebraicInteger * > aiPossibleNorms2
Possible values for (e,e)
Definition: alvinfractions.h:49
This class represents a set of possible fractions x_0^2 / (e,e) We generate series of the type: (x0 +...
Definition: alvinfractions.h:46