AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
rationalinteger_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 RATIONALINTEGER_INFINITENSYMETRIES_H
32 #define RATIONALINTEGER_INFINITENSYMETRIES_H
33 
34 #include "infinitensymetries.h"
35 #include "rationalinteger.h"
36 
37 namespace Eigen
38 {
39  template<class> struct NumTraits;
40  template<> struct NumTraits<Rational<RationalInteger>>
41  {
42  typedef Rational<RationalInteger> Real;
43  typedef Rational<RationalInteger> NonInteger;
44  typedef Rational<RationalInteger> Nested;
45  typedef Rational<RationalInteger> Literal;
46 
47  static inline Real epsilon() { return 0; }
48  static inline Real dummy_precision() { return 0; }
49  enum {
50  IsInteger = 0,
51  IsSigned = 1,
52  IsComplex = 0,
53  RequireInitialization = 1,
54  ReadCost = Eigen::HugeCost,
55  AddCost = Eigen::HugeCost,
56  MulCost = Eigen::HugeCost
57  };
58  };
59 
60  namespace internal {
61  template<>
62  struct significant_decimals_impl<Rational<RationalInteger>>
63  {
64  // Infinite precision when printing
65  static inline int run() { return 0; }
66  };
67  }
68 };
69 
71 {
72  private:
73  vector< Matrix< Rational<RationalInteger>, Dynamic, 1 > > rriVectorsC;
74  vector< vector< Rational<RationalInteger> > > riDottedWeights;
75 
76  Matrix< Rational<RationalInteger>, Dynamic, Dynamic > rriBasisFixedPoints;
77 
78  vector< Rational<RationalInteger> > rriQF;
79  vector< vector< RationalInteger > > riVectorsProducts;
80 
81  public:
84 
85  Rational<RationalInteger> rriVectorNorm( const Matrix< Rational<RationalInteger>, Dynamic, 1 >& rriV ) const;
86  Rational<RationalInteger> rriVectorsProduct( const Matrix< Rational<RationalInteger>, Dynamic, 1 >& rriV1, const Matrix< Rational<RationalInteger>, Dynamic, 1 >& rriV2 ) const;
87  bool FindIntegralSymmetryFromSubgraph( const vector< unsigned int >& iVertices );
88 
89  virtual void print_basisFixedPoints( const string& strSpacer = "" ) const;
90 
91  private:
92  bool bDottedSameWeight( const unsigned int& v1, const unsigned int& v2, const unsigned int& w1, const unsigned int& w2 ) const;
93  void WorkWithIsomorphisms( const vector< unsigned int >& iVertices, const vector< GraphInvolution >& iIsomorphisms );
94  vector< GraphInvolution > FindIsomorphismsInSubgraph( const vector< unsigned int >& iVertices );
95 };
96 
97 
98 #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
Main class for AlVin.
Definition: alvin.h:52
Definition: quadraticinteger_infinitensymetries.h:38
To find integral symmetries of the space.
Definition: rationalinteger_infinitensymetries.h:70
Rational integers.
Definition: rationalinteger.h:36