-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.h
98 lines (74 loc) · 2.96 KB
/
app.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
Copyright (C) 2014, 2015, 2016
Rafael Guglielmetti, [email protected]
*/
/*
This file is part of AlVin.
CoxIter is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
CoxIter is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with AlVin. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
* \file app.h
* \author Rafael Guglielmetti
*
* \class App
* \brief Main class
*/
#ifndef APP_H
#define APP_H
#include "rationalinteger_alvin.h"
#include "rationalinteger_infinitensymetries.h"
#include "rationalinteger_invariantsqf.h"
#include "rationalinteger_notreflective.h"
#include "quadraticinteger_alvin.h"
#include "quadraticinteger_infinitensymetries.h"
#ifdef _RC7AVAILABLE_
#include "rcyclotomic7integer_alvin.h"
#include "rcyclotomic7integer_infinitensymetries.h"
#endif
#include <chrono>
#include <iostream>
#include <regex>
using namespace std;
class App {
private:
vector<AlgebraicInteger *> aiQF; ///< Coefficients of the quadratic form
bool bCheckNR; ///< If true, try to determine if the form is non-reflective
///< (needed: maxv, nrmin, nrmax)
unsigned int iNRMin; ///< Minimal number of vertices for the subsets
unsigned int iNRMax; ///< Maximal number of vertices for the subsets
bool bCheckNREquations; ///< Write the system of equations to check if the
///< form is non-reflective
bool bDebug; ///< If true, more information are displayed
bool bComputeInvariantsQF; ///< If true, compute the invariants of the qf
bool bComputeInvariantsPolyhedron; ///< If true, compute the invariants of the
///< polyhedra
int iCreateImage; ///< -1: not specified (i.e. yes if possible and if the
///< number of vectors is <= 25), 0: no, 1: force yes
unsigned int iMinVectors; ///< Minimal number of vectors to compute
unsigned int iMaxVectors; ///< Maximal number of vectors to compute
string strField; ///< Field of definition (rationals, quadratic)
unsigned int iFieldSupp; ///< Additional data (for example d if k=Q[ sqrt d ])
string strOuputMathematicalFormat; ///< Format for mathematical output
///< (generic, mathematica)
bool bPrintHelp; ///< If true, display help and then exit
public:
App();
~App();
void readMainParameters(int argc, char **argv);
void Run();
private:
AlVin *instanciateAlVin();
NotReflective *instanciateNotReflectiveEquations(AlVin *v);
InfiniteNSymetries *instanciateInfiniteNSymetries(AlVin *v);
void printHelp() const;
};
#endif // APP_H