CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418425
1
/*
2
* Normaliz
3
* Copyright (C) 2007-2014 Winfried Bruns, Bogdan Ichim, Christof Soeger
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*
17
* As an exception, when this program is distributed through (i) the App Store
18
* by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or (iii) Google Play
19
* by Google Inc., then that store may impose any digital rights management,
20
* device limits and/or redistribution restrictions that are required by its
21
* terms of service.
22
*/
23
24
#ifndef LIBNORMALIZ_H_
25
#define LIBNORMALIZ_H_
26
27
#include <iostream>
28
#include <string>
29
#include <signal.h>
30
31
#include "libnormaliz/version.h"
32
33
namespace libnormaliz {
34
35
namespace Type {
36
enum InputType {
37
integral_closure,
38
polyhedron,
39
normalization,
40
polytope,
41
rees_algebra,
42
inequalities,
43
strict_inequalities,
44
signs,
45
strict_signs,
46
equations,
47
congruences,
48
inhom_inequalities,
49
dehomogenization,
50
inhom_equations,
51
inhom_congruences,
52
lattice_ideal,
53
grading,
54
excluded_faces,
55
lattice,
56
saturation,
57
cone,
58
offset,
59
vertices,
60
support_hyperplanes,
61
cone_and_lattice,
62
subspace,
63
open_facets
64
};
65
} //end namespace Type
66
67
using Type::InputType;
68
69
/* converts a string to an InputType
70
* throws an BadInputException if the string cannot be converted */
71
InputType to_type(const std::string& type_string);
72
73
/* gives the difference of the number of columns to the dimension */
74
long type_nr_columns_correction(InputType type);
75
76
/* returns true if the input of this type is a vector */
77
bool type_is_vector(InputType type);
78
79
/* this type is used in the entries of keys
80
* it has to be able to hold number of generators */
81
typedef unsigned int key_t;
82
83
extern bool verbose;
84
extern size_t GMP_mat, GMP_hyp, GMP_scal_prod;
85
extern size_t TotDet;
86
/*
87
* If this variable is set to true, the current computation is interrupted and
88
* an InterruptException is raised.
89
*/
90
extern volatile sig_atomic_t nmz_interrupted;
91
92
extern bool nmz_scip; // controls the use of Scip
93
94
#define INTERRUPT_COMPUTATION_BY_EXCEPTION \
95
if(nmz_interrupted){ \
96
throw InterruptException( "external interrupt" ); \
97
}
98
99
/* if test_arithmetic_overflow is true, many operations are also done
100
* modulo overflow_test_modulus to ensure the correctness of the calculations */
101
// extern bool test_arithmetic_overflow;
102
// extern long overflow_test_modulus;
103
104
extern long default_thread_limit;
105
extern long thread_limit;
106
extern bool parallelization_set;
107
long set_thread_limit(long t);
108
109
/* set the verbose default value */
110
bool setVerboseDefault(bool v);
111
/* methods to set and use the output streams */
112
void setVerboseOutput(std::ostream&);
113
void setErrorOutput(std::ostream&);
114
115
std::ostream& verboseOutput();
116
std::ostream& errorOutput();
117
118
void interrupt_signal_handler( int signal );
119
120
} /* end namespace libnormaliz */
121
122
#endif /* LIBNORMALIZ_H_ */
123
124