~ubuntu-branches/ubuntu/saucy/gfan/saucy-proposed

« back to all changes in this revision

Viewing changes to app_commonrefinement.cpp

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier
  • Date: 2013-07-09 10:44:01 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130709104401-5q66ozz5j5af0dak
Tags: 0.5+dfsg-3
* Upload to unstable.
* modify remove_failing_tests_on_32bits.patch to replace command of
  0009RenderStairCase test with an empty one instead of deleting it.
* remove lintian override about spelling error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 CommonRefinementApplication : public GFanApplication
 
10
{
 
11
  StringOption input1Option;
 
12
  StringOption input2Option;
 
13
public:
 
14
  const char *helpText()
 
15
  {
 
16
    return "This program takes two polyhedral fans and computes their common refinement.\n";
 
17
  }
 
18
  CommonRefinementApplication():
 
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
 
 
25
  const char *name()
 
26
  {
 
27
    return "_fancommonrefinement";
 
28
  }
 
29
 
 
30
  int main()
 
31
  {
 
32
    PolyhedralFan f1=PolyhedralFan::readFan(input1Option.getValue());
 
33
    PolyhedralFan f2=PolyhedralFan::readFan(input2Option.getValue());
 
34
 
 
35
    PolyhedralFan f=refinement(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 CommonRefinementApplication theApplication;