AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
rationalinteger_invariantsqf.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 INVARIANTSQF_H
32 #define INVARIANTSQF_H
33 
42 #include <vector>
43 #include <string>
44 #include <algorithm>
45 #include <iostream>
46 #include <iterator>
47 
48 #include "CoxIter/lib/math_tools.h"
49 #include "CoxIter/lib/string.h"
50 
51 using namespace std;
52 using namespace MathTools;
53 
55 {
56  private:
57  vector< int > iQF;
58  unsigned int iDimension;
59 
60  vector< vector< unsigned int > > iQF_primes;
61 
62  vector< unsigned int > iRamification;
63  int iSignedDeterminant;
64  vector< unsigned int > iPrimesDeterminant;
65  int iDeterminant;
66  vector< unsigned int > iRamifiedPrimesQuadraticExtension;
67 
68  string strInvariant;
69 
70  public:
71  InvariantsQF( const vector< int >& iQuadraticFormCoeffs );
72 
73  vector< unsigned int > get_iRamification() const;
74  string get_strInvariant() const;
75 
76  private:
77  void computeInvariants();
78 
79  void primeNumbers();
80  void computeRamification();
81 
88  vector< unsigned int > iRamificationElementaryQuaternionAlgebra( int a, int b ) const;
89 
90  vector< unsigned int > iRamificationProduct( const vector< unsigned int >& iR1, const vector< unsigned int >& iR2 );
91 };
92 
93 #endif // INVARIANTSQF_H
Computation of the commensurability of a quadratic form over the rationals.
Definition: rationalinteger_invariantsqf.h:54