CoxIter  1.2
CoxIter - Computing invariants of hyperbolic Coxeter groups
growthrate.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2013, 2014, 2015, 2016
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 <vector>
35 #include <pari/pari.h>
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 {
50  int iPerron;
51  int iPisot;
52  int iSalem;
53  string strGrowthRate;
54  bool bComputed;
55 };
56 
58 {
59  private:
60  vector< GEN > t_POLfactors;
61 
64  long int iIndexMaximalRoot;
65 
66  GEN gEpsilon;
67  long int iPariPrecision;
68 
69  public:
70  GrowthRate();
71  ~GrowthRate();
72 
73  GrowthRate_Result grrComputations( vector< mpz_class > iPolynomial, const bool& bOnlyGrowthRate = false );
74 
75  private:
80  void irreducibleFactors( const vector< mpz_class >& iPolynomial );
81 
85  void minimalRoot();
86 
92  long int iNumberRootsUnitCircle( GEN gPol );
93 };
94 
95 #endif // GROWTHRATE_H
Definition: growthrate.h:48
GEN gGrowthRate
Maximal positive root of the polynomial.
Definition: growthrate.h:62
vector< GEN > t_POLfactors
Irreducible factors of the denominator of the growth series (only those having a root between 0 and 1...
Definition: growthrate.h:60
GEN gEpsilon
Some small number (typically 10^-50)
Definition: growthrate.h:66
string strGrowthRate
Definition: growthrate.h:53
long int iPariPrecision
Given as prec (typically 8)
Definition: growthrate.h:67
To compute the growth rate.
Definition: growthrate.h:57
int iPisot
Definition: growthrate.h:51
long int iIndexMaximalRoot
Factor which contains the minimal root.
Definition: growthrate.h:64
bool bComputed
Definition: growthrate.h:54
int iPerron
Definition: growthrate.h:50
int iSalem
Definition: growthrate.h:52
GEN gMaximalRoots
Roots of the polynomial which has the maximal root.
Definition: growthrate.h:63
Definition: paripolynomials.cpp:25