Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

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

563554 views
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
//---------------------------------------------------------------------------
25
#ifndef OUTPUT_H
26
#define OUTPUT_H
27
//---------------------------------------------------------------------------
28
29
#include "libnormaliz/cone.h"
30
31
using namespace std;
32
using namespace libnormaliz;
33
34
//---------------------------------------------------------------------------
35
36
template<typename Integer>
37
class Output {
38
string name;
39
bool out;
40
bool inv;
41
bool ext;
42
bool esp;
43
bool typ;
44
bool egn;
45
bool gen;
46
bool cst;
47
bool tri;
48
bool tgn;
49
bool ht1;
50
bool dec;
51
bool lat;
52
bool mod;
53
bool msp;
54
Cone<Integer>* Result;
55
size_t dim;
56
bool homogeneous;
57
string of_cone;
58
string of_monoid;
59
string of_polyhedron;
60
61
bool lattice_ideal_input;
62
bool no_ext_rays_output;
63
64
65
//---------------------------------------------------------------------------
66
public:
67
//---------------------------------------------------------------------------
68
// Construction and destruction
69
//---------------------------------------------------------------------------
70
71
Output(); //main constructor
72
// default copy constructor and destructors are ok
73
// the Cone Object is handled at another place
74
75
//---------------------------------------------------------------------------
76
// Data acces
77
//---------------------------------------------------------------------------
78
79
void read() const; // to be modified, just for tests
80
81
void set_name(const string& n);
82
void setCone(Cone<Integer> & C);
83
84
void set_write_out(const bool& flag); //sets the write .out flag
85
void set_write_inv(const bool& flag); //sets the write .inv flag
86
void set_write_ext(const bool& flag); //sets the write .ext flag
87
void set_write_esp(const bool& flag); //sets the write .esp flag
88
void set_write_typ(const bool& flag); //sets the write .typ flag
89
void set_write_egn(const bool& flag); //sets the write .egn flag
90
void set_write_gen(const bool& flag); //sets the write .gen flag
91
void set_write_cst(const bool& flag); //sets the write .cst flag
92
void set_write_tri(const bool& flag); //sets the write .tri flag
93
void set_write_tgn(const bool& flag); //sets the write .tgn flag
94
void set_write_ht1(const bool& flag); //sets the write .ht1 flag
95
void set_write_dec(const bool& flag); //sets the write .dec flag
96
void set_write_lat(const bool& flag); //sets the write .lat flag
97
void set_write_mod(const bool& flag); //sets the write .mod flag
98
void set_write_msp(const bool& flag); //sets the write .msp flag
99
void set_write_extra_files(); //sets some flags to true
100
void set_write_all_files(); //sets most flags to true
101
102
void write_matrix_ext(const Matrix<Integer>& M) const; //writes M to file name.ext
103
void write_matrix_lat(const Matrix<Integer>& M) const; //writes M to file name.lat
104
void write_matrix_esp(const Matrix<Integer>& M) const; //writes M to file name.esp
105
void write_matrix_typ(const Matrix<Integer>& M) const; //writes M to file name.typ
106
void write_matrix_egn(const Matrix<Integer>& M) const; //writes M to file name.egn
107
void write_matrix_gen(const Matrix<Integer>& M) const; //writes M to file name.gen
108
void write_matrix_mod(const Matrix<Integer>& M) const; //writes M to file name.mod
109
void write_matrix_msp(const Matrix<Integer>& M) const; //writes M to file name.msp
110
void write_tri() const; //writes the .tri file
111
void write_Stanley_dec() const;
112
void write_matrix_ht1(const Matrix<Integer>& M) const; //writes M to file name.ht1
113
114
void write_float(ofstream& out, const Matrix<nmz_float>& mat, size_t nr, size_t nc) const;
115
116
void write_inv_file() const;
117
118
void set_lattice_ideal_input(bool lattice_odeal_input);
119
120
void set_no_ext_rays_output();
121
122
123
//---------------------------------------------------------------------------
124
// Output Algorithms
125
//---------------------------------------------------------------------------
126
127
void write_files() const;
128
void writeWeightedEhrhartSeries(ofstream& out) const;
129
130
};
131
//class end *****************************************************************
132
133
//---------------------------------------------------------------------------
134
#endif
135
//---------------------------------------------------------------------------
136
137
138