AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
rcyclotomic7integer_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 RCYCLOTOMIC7INTEGER_ALVIN_H
32 #define RCYCLOTOMIC7INTEGER_ALVIN_H
33 
34 #include "alvin.h"
35 #include "rcyclotomic7integer.h"
37 
39 {
40  private:
41  vector< RCyclotomic7Integer > rciQF;
42  vector< RCyclotomic7Integer > rci2QF;
43 
44  vector< RCyclotomic7Integer > rciBilinearProducts;
45  vector< RCyclotomic7Integer > rciVectorCurrent;
46  vector< vector< RCyclotomic7Integer* > > rciVectors;
47 
48  public:
49  RCyclotomic7Integer_AlVin( const vector< RCyclotomic7Integer >& rciQuadraticFormCoeffs, const string &strOuputMathematicalFormat, const bool& bWriteInfo, const bool& bDebug );
50 
51  virtual std::string get_strField() const;
52  virtual bool PreRun();
53 
54  private:
55  void findPossibleNorms2();
56  void findVector( AlgebraicInteger* aiX0, AlgebraicInteger* aiNorm2 );
57  void addVectorChild( const vector< AlgebraicInteger* >& aiVector );
58  virtual int addVector_iFindWeight( AlgebraicInteger* aiNumerator, AlgebraicInteger* aiDenominator );
59 
60  void findVector( RCyclotomic7Integer* rci0, RCyclotomic7Integer* rciNorm2, unsigned int iIndex, RCyclotomic7Integer rciSumComp, RCyclotomic7Integer rciGCDComponents );
61  void addCandidate();
62 
63  virtual void print_initialInformationChild() const;
64 };
65 
66 #endif // RCYCLOTOMIC7INTEGER_ALVIN_H
AlVin for RC7.
Definition: rcyclotomic7integer_alvin.h:38
virtual bool PreRun()
Prepare the computations.
Definition: rcyclotomic7integer_alvin.cpp:10
Main class for AlVin.
Definition: alvin.h:52
RC7 and their operations.
Definition: rcyclotomic7integer.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
virtual std::string get_strField() const
Return the field of definition of the current quadratic form.
Definition: rcyclotomic7integer_alvin.cpp:5
bool bDebug
If true, more information are displayed.
Definition: alvin.h:59