AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
quadraticinteger_infinitensymetries.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 QUADRATIC_INFINITENSYMETRIES_H
32 #define QUADRATIC_INFINITENSYMETRIES_H
33 
34 #include "infinitensymetries.h"
35 #include "quadraticinteger_big.h"
36 #include "quadraticinteger.h"
37 
38 namespace Eigen
39 {
40  template<class> struct NumTraits;
41  template<> struct NumTraits<Rational<QuadraticIntegerBig>>
42  {
43  typedef Rational<QuadraticIntegerBig> Real;
44  typedef Rational<QuadraticIntegerBig> NonInteger;
45  typedef Rational<QuadraticIntegerBig> Nested;
46  typedef Rational<QuadraticIntegerBig> Literal;
47 
48  static inline Real epsilon() { return 0; }
49  static inline Real dummy_precision() { return 0; }
50  enum {
51  IsInteger = 0,
52  IsSigned = 1,
53  IsComplex = 0,
54  RequireInitialization = 1,
55  ReadCost = Eigen::HugeCost,
56  AddCost = Eigen::HugeCost,
57  MulCost = Eigen::HugeCost
58  };
59  };
60 
61  namespace internal {
62  template<>
63  struct significant_decimals_impl<Rational<QuadraticIntegerBig>>
64  {
65  // Infinite precision when printing
66  static inline int run() { return 0; }
67  };
68  }
69 };
70 
72 {
73  private:
74  vector< Matrix< Rational<QuadraticIntegerBig>, Dynamic, 1 > > rqiVectorsC;
75  vector< vector< Rational<QuadraticIntegerBig> > > qiDottedWeights;
76 
77  Matrix< Rational<QuadraticIntegerBig>, Dynamic, Dynamic > rqiBasisFixedPoints;
78 
79  vector< Rational<QuadraticIntegerBig> > rqiQF;
80  vector< vector< QuadraticIntegerBig > > riVectorsProducts;
81  vector< long int > iVectorsNormsFloor;
82 
83  public:
86 
87  Rational<QuadraticIntegerBig> rqiVectorNorm( const Matrix< Rational<QuadraticIntegerBig>, Dynamic, 1 >& rqiV ) const;
88  Rational<QuadraticIntegerBig> rqiVectorsProduct( const Matrix< Rational<QuadraticIntegerBig>, Dynamic, 1 >& rqiV1, const Matrix< Rational<QuadraticIntegerBig>, Dynamic, 1 >& rqiV2 ) const;
89  bool FindIntegralSymmetryFromSubgraph( const vector< unsigned int >& iVertices );
90 
91  virtual void print_basisFixedPoints( const string& strSpacer = "" ) const;
92 
93  private:
94  bool bDottedSameWeight( const unsigned int& v1, const unsigned int& v2, const unsigned int& w1, const unsigned int& w2 ) const;
95  void WorkWithIsomorphisms( const vector< unsigned int >& iVertices, const vector< GraphInvolution >& iIsomorphisms );
96  vector< GraphInvolution > FindIsomorphismsInSubgraph( const vector< unsigned int >& iVertices );
97 };
98 
99 
100 #endif // RATIONALINTEGER_INFINITENSYMETRIES_H
Definition: quadraticinteger_infinitensymetries.h:40
Try to find integral symmetries of the polyhedron which do not have any common fixed point inside the...
Definition: infinitensymetries.h:55
To find integral symmetries of the space.
Definition: quadraticinteger_infinitensymetries.h:71
Main class for AlVin.
Definition: alvin.h:52
Definition: quadraticinteger_infinitensymetries.h:38
Quadratic integers with bigint components.
Definition: quadraticinteger_big.h:46