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

563624 views
1
#include <stdlib.h>
2
#include <vector>
3
#include <fstream>
4
#include <string>
5
#ifdef _OPENMP
6
#include <omp.h>
7
#endif
8
using namespace std;
9
10
#include "libnormaliz/libnormaliz.h"
11
#include "libnormaliz/cone.h"
12
#include "libnormaliz/vector_operations.h"
13
#include "libnormaliz/cone_property.h"
14
#include "libnormaliz/integer.h"
15
#include "libnormaliz/matrix.h"
16
using namespace libnormaliz;
17
18
typedef long long Integer;
19
20
21
22
int main(int argc, char* argv[]){
23
24
Matrix<Integer> Gens=readMatrix<Integer>(string("small_gens.mat"));
25
26
vector<Cone<Integer> > ParCones(16);
27
#pragma omp parallel for
28
for(size_t i=0;i<ParCones.size();++i){
29
ParCones[i]=Cone<Integer>(Type::cone,Gens);
30
// ParCones[i].setVerbose(true);
31
switch(i%8){
32
case 0: ParCones[i].compute(ConeProperty::DefaultMode);
33
break;
34
case 1: ParCones[i].compute(ConeProperty::DualMode, ConeProperty::Deg1Elements);
35
break;
36
case 2: ParCones[i].compute(ConeProperty::Projection);
37
break;
38
case 3: ParCones[i].compute(ConeProperty::ProjectionFloat);
39
break;
40
case 4: ParCones[i].compute(ConeProperty::Approximate, ConeProperty::IsGorenstein);
41
break;
42
case 5: ParCones[i].compute(ConeProperty::SupportHyperplanes);
43
break;
44
case 6: ParCones[i].compute(ConeProperty::IntegerHull);
45
break;
46
case 7: ParCones[i].compute(ConeProperty::IsIntegrallyClosed);
47
break;
48
default: break;
49
}
50
}
51
52
} //end main
53
54