4
4
#include "gfanapplication.h"
6
#include "polyhedralcone.h"
7
#include "polyhedralfan.h"
11
IntegerVector indices;
18
IntegerMatrix vertices;
23
typedef IntegerVector tree;
25
class UnfoldedPolytope{
29
11
class UnfoldApplication : public GFanApplication
38
TransposeMatrixApplication()
38
input1Option("-i1","Specify the name of the first input file.","polymake.out")
48
lpSetSolver("cddgmp");
49
48
FileParser P(Stdin);
50
PolyhedralFan f1=PolyhedralFan::readFan(input1Option.getValue());
52
assert(f1.getAmbientDimension()==4);
55
IntegerVectorList equations;
56
IntegerVectorList inequalities;
57
inequalities.push_back(boxSize*IntegerVector::standardVector(4,0)+IntegerVector::standardVector(n,1));
58
inequalities.push_back(boxSize*IntegerVector::standardVector(4,0)+IntegerVector::standardVector(n,2));
59
inequalities.push_back(boxSize*IntegerVector::standardVector(4,0)+IntegerVector::standardVector(n,3));
61
PolyhedralCone C(inequalities,equalities,4);
66
PolyhedralFan f2=refinement(f1,F);
68
IntegerVectorList rays=f2.getRays();
72
for(PolyhedralFan::coneIterator i=f2.conesBegin();i!=f2.conesEnd();i++)
76
PolyhedralFan f3=PolyhedralFan::facetsOfCone(*i);
77
for(PolyhedralFan::coneIterator i=f3.conesBegin();i!=f3.conesEnd();i++)
81
for(IntegerVectorList::const_iterator j=rays.begin();j!=rays.end();j++,J++)
86
s.facets.push_back(F);
50
90
IntegerVectorList v=P.parseIntegerVectorList();
51
91
fprintf(Stderr,"Rank:%i\n",rankOfMatrix(v));
52
92
AsciiPrinter(Stdout).printVectorList(transposeIntegerVectorList(v));