File: app_homogeneityspace.cpp

package info (click to toggle)
gfan 0.3dfsg-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 2,012 kB
  • ctags: 1,935
  • sloc: cpp: 17,728; makefile: 251
file content (49 lines) | stat: -rw-r--r-- 1,232 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "parser.h"
#include "printer.h"
#include "polynomial.h"
#include "division.h"
#include "buchberger.h"
#include "wallideal.h"
#include "lp.h"
#include "reversesearch.h"
#include "termorder.h"
#include "gfanapplication.h"
#include "wallideal.h"
#include "polyhedralcone.h"

class HomogeneitySpaceApplication : public GFanApplication
{
public:
  const char *helpText()
  {
    return "This program computes the homogeneity space of a list of polynomials - as a cone. Thus generators for the homogeneity space are found in the section LINEALITY_SPACE. If you wish the homogeneity space of an ideal you should first compute a set of homogeneous generators and call the program on these. A reduced Groebner basis will always suffice for this purpose.\n";
  }
  HomogeneitySpaceApplication()
  {
    registerOptions();
  }
  
  char *name()
  {
    return "_homogeneityspace";
  }

  int main()
  {
    FileParser P(Stdin);

    PolynomialSet g=P.parsePolynomialSetWithRing();

    IntegerVectorList l=wallInequalities(g);
    IntegerVectorList a;
    PolyhedralCone c(a,l);
    
    c.canonicalize();
    AsciiPrinter(Stdout).printPolyhedralCone(c);
    
    return 0;
  }
};

static HomogeneitySpaceApplication theApplication;