CoxIter  1.3
CoxIter - Computing invariants of hyperbolic Coxeter groups
growthrate.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2013-2017
3 Rafael Guglielmetti, rafael.guglielmetti@unifr.ch
4 */
5 
6 /*
7 This file is part of CoxIter.
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 CoxIter. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
31 #ifndef GROWTHRATE_H
32 #define GROWTHRATE_H
33 
34 #include <pari/pari.h>
35 #include <vector>
36 #ifdef _USE_LOCAL_GMP_
37 #include "gmpxx.h"
38 #else
39 #include <gmpxx.h>
40 #endif
41 #include <iostream>
42 
43 #include "lib/paripolynomials.h"
44 
45 using namespace std;
46 using namespace PariPolynomials;
47 
49  int perron;
50  int pisot;
51  int salem;
52  string growthRate;
53  bool isComputed;
54 };
55 
56 class GrowthRate {
57 private:
58  vector<GEN>
61 
64  long int indexMaximalRoot;
65 
66  GEN gEpsilon;
67  long int pariPrecision;
68 
69 public:
70  GrowthRate();
71  ~GrowthRate();
72 
73  GrowthRate_Result grrComputations(vector<mpz_class> polynomial,
74  const bool &onlyGrowthRate = false);
75 
76 private:
82  void irreducibleFactors(const vector<mpz_class> &polynomial);
83 
88  void minimalRoot();
89 
95  long int numberRootsUnitCircle(GEN gPol);
96 };
97 
98 #endif // GROWTHRATE_H
To compute the growth rate.
Definition: growthrate.h:56
long int pariPrecision
Given as prec (typically 8)
Definition: growthrate.h:67
GEN gMaximalRoots
Roots of the polynomial which has the maximal root.
Definition: growthrate.h:63
GEN gEpsilon
Some small number (typically 10^-50)
Definition: growthrate.h:66
long int indexMaximalRoot
Factor which contains the minimal root.
Definition: growthrate.h:64
vector< GEN > t_POLfactors
Definition: growthrate.h:59
GEN gGrowthRate
Maximal positive root of the polynomial.
Definition: growthrate.h:62
Definition: paripolynomials.cpp:25
Definition: growthrate.h:48
int perron
Definition: growthrate.h:49
int salem
Definition: growthrate.h:51
string growthRate
Definition: growthrate.h:52
bool isComputed
Definition: growthrate.h:53
int pisot
Definition: growthrate.h:50