3
#include "polynomial.h"
6
#include "gfanapplication.h"
7
#include "polyhedralcone.h"
8
#include "polyhedralfan.h"
11
#include "polymakefile.h"
13
class IsConnectedApplication : public GFanApplication
15
StringOption inputOption;
16
SimpleOption optionSymmetry;
18
bool includeInDefaultInstallation()
22
const char *helpText()
24
return "This program checks if a PURE d-dimensional fan is connected in codimension one (in the sense of [Bogart, Jensen, Speyer, Sturmfels, Thomas]).\n";
26
IsConnectedApplication():
27
inputOption("-i","Specify the name of the input file.","polymake.out"),
28
optionSymmetry("--symmetry",
29
"Reads in the cone stored with symmetry. The generators of the symmetry group are given on the input. IF SYMMETRY IS SPECIFIED THEN "
30
"THE CHECK IS NOT COMPLETE AND IT WILL ONLY BE CHECKED IF THAT GIVEN"
31
"TWO CONES THAT EXIST ELEMENTS IN THE TWO RESPECTIVE ORBITS"
32
"WHICH ARE CONNECTED BY A RIDGE PATH\n")
39
return "_isconnected";
44
PolyhedralFan f=PolyhedralFan::readFan(inputOption.getValue(),true,0,0,0,true);
45
int n=f.getAmbientDimension();
48
if(optionSymmetry.getValue())
50
IntegerVectorList generators=FileParser(Stdin).parseIntegerVectorList();
51
s.computeClosure(generators);
54
cout << f.isConnected(&s) << endl;
60
static IsConnectedApplication theApplication;