1 #include "parser.h"
2 #include "printer.h"
3 #include "lp.h"
4 #include "gfanapplication.h"
5 #include "polyhedralcone.h"
6 #include "polyhedralfan.h"
7 #include "polymakefile.h"
8 
9 class ProductApplication : public GFanApplication
10 {
11   StringOption input1Option;
12   StringOption input2Option;
13 public:
helpText()14   const char *helpText()
15   {
16     return "This program takes two polyhedral fans and computes their product.\n";
17   }
ProductApplication()18   ProductApplication():
19     input1Option("-i1","Specify the name of the first input file.","polymake.out"),
20     input2Option("-i2","Specify the name of the second input file.","polymake.out")
21   {
22     registerOptions();
23   }
24 
name()25   const char *name()
26   {
27     return "_fanproduct";
28   }
29 
main()30   int main()
31   {
32     PolyhedralFan f1=PolyhedralFan::readFan(input1Option.getValue());
33     PolyhedralFan f2=PolyhedralFan::readFan(input2Option.getValue());
34 
35     PolyhedralFan f=product(f1,f2);
36 
37     AsciiPrinter P(Stdout);
38 
39     f.printWithIndices(&P,FPF_default|FPF_multiplicities/*|FPF_values*/);
40 
41     return 0;
42   }
43 };
44 
45 static ProductApplication theApplication;
46 
47