AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
quadraticinteger_alvin.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 QUADRATICINTEGER_ALVIN_H
32 #define QUADRATICINTEGER_ALVIN_H
33 
34 #include "alvin.h"
35 #include "quadraticinteger.h"
37 
39 {
40  private:
41  vector< QuadraticInteger > qiQF;
42  vector< QuadraticInteger > qi2QF;
43  vector< QuadraticInteger > qiDQF;
44  vector< QuadraticInteger > qiDQFConj;
45 
46  vector< QuadraticInteger > qiBilinearProducts;
47  vector< QuadraticInteger > qiVectorCurrent;
48  vector< vector< QuadraticInteger* > > qiVectors;
49 
50  long int d;
51  long int dISqrt;
52  bool bIsOneMod4;
53 
54  public:
55  QuadraticInteger_AlVin( const vector< QuadraticInteger >& iQuadraticFormCoeffs, const string &strOuputMathematicalFormat, const bool& bWriteInfo, const bool& bDebug );
56 
57  virtual string get_strField() const;
58 
59  private:
60  void findPossibleNorms2();
61 
62  bool PreRun();
63 
64  void findVector( AlgebraicInteger* aiX0, AlgebraicInteger* aiNorm2 );
65 
77  void findVector( QuadraticInteger* qi0, QuadraticInteger* qiNorm2, unsigned int iIndex, QuadraticInteger qiSumComp, QuadraticInteger qiGCDComponents );
78 
79  void addCandidate();
80  virtual void addVectorChild( const vector< AlgebraicInteger* >& aiVector );
81  virtual int addVector_iFindWeight( AlgebraicInteger* aiNumerator, AlgebraicInteger* aiDenominator );
82 };
83 
84 #endif // QUADRATICINTEGER_ALVIN_H
virtual string get_strField() const
Return the field of definition of the current quadratic form.
Definition: quadraticinteger_alvin.cpp:494
Main class for AlVin.
Definition: alvin.h:52
Quadratic integers.
Definition: quadraticinteger.h:44
Parent class for rational, quadratic and rc7 integers.
Definition: algebraicinteger.h:43
bool bWriteInfo
If we want to write informations (false if AlVin is used "as a plugin")
Definition: alvin.h:60
AlVin for quadratic integers.
Definition: quadraticinteger_alvin.h:38
bool bDebug
If true, more information are displayed.
Definition: alvin.h:59