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: 418384
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 "libQnormaliz/Qcone.h"
30
31
using namespace std;
32
using namespace libQnormaliz;
33
34
//---------------------------------------------------------------------------
35
36
template<typename Number>
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<Number>* 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
63
64
//---------------------------------------------------------------------------
65
public:
66
//---------------------------------------------------------------------------
67
// Construction and destruction
68
//---------------------------------------------------------------------------
69
70
Output(); //main constructor
71
// default copy constructor and destructors are ok
72
// the Cone Object is handled at another place
73
74
//---------------------------------------------------------------------------
75
// Data acces
76
//---------------------------------------------------------------------------
77
78
void read() const; // to be modified, just for tests
79
80
void set_name(const string& n);
81
void setCone(Cone<Number> & C);
82
83
void set_write_out(const bool& flag); //sets the write .out flag
84
void set_write_inv(const bool& flag); //sets the write .inv flag
85
void set_write_ext(const bool& flag); //sets the write .ext flag
86
void set_write_esp(const bool& flag); //sets the write .esp flag
87
void set_write_typ(const bool& flag); //sets the write .typ flag
88
void set_write_egn(const bool& flag); //sets the write .egn flag
89
void set_write_gen(const bool& flag); //sets the write .gen flag
90
void set_write_cst(const bool& flag); //sets the write .cst flag
91
void set_write_tri(const bool& flag); //sets the write .tri flag
92
void set_write_tgn(const bool& flag); //sets the write .tgn flag
93
void set_write_ht1(const bool& flag); //sets the write .ht1 flag
94
void set_write_dec(const bool& flag); //sets the write .dec flag
95
void set_write_lat(const bool& flag); //sets the write .lat flag
96
void set_write_mod(const bool& flag); //sets the write .mod flag
97
void set_write_msp(const bool& flag); //sets the write .msp flag
98
void set_write_extra_files(); //sets some flags to true
99
void set_write_all_files(); //sets most flags to true
100
101
void write_matrix_ext(const Matrix<Number>& M) const; //writes M to file name.ext
102
void write_matrix_lat(const Matrix<Number>& M) const; //writes M to file name.lat
103
void write_matrix_esp(const Matrix<Number>& M) const; //writes M to file name.esp
104
void write_matrix_typ(const Matrix<Number>& M) const; //writes M to file name.typ
105
void write_matrix_egn(const Matrix<Number>& M) const; //writes M to file name.egn
106
void write_matrix_gen(const Matrix<Number>& M) const; //writes M to file name.gen
107
void write_matrix_mod(const Matrix<Number>& M) const; //writes M to file name.mod
108
void write_matrix_msp(const Matrix<Number>& M) const; //writes M to file name.msp
109
void write_tri() const; //writes the .tri file
110
void write_Stanley_dec() const;
111
void write_matrix_ht1(const Matrix<Number>& M) const; //writes M to file name.ht1
112
113
void write_inv_file() const;
114
115
void set_lattice_ideal_input(bool lattice_odeal_input);
116
117
118
//---------------------------------------------------------------------------
119
// Output Algorithms
120
//---------------------------------------------------------------------------
121
122
void write_files() const;
123
124
};
125
//class end *****************************************************************
126
127
//---------------------------------------------------------------------------
128
#endif
129
//---------------------------------------------------------------------------
130
131
132