File: app_homogeneityspace.cpp

package info (click to toggle)
gfan 0.5%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,348 kB
  • ctags: 5,683
  • sloc: cpp: 39,675; makefile: 454; sh: 1
file content (49 lines) | stat: -rw-r--r-- 1,228 bytes parent folder | download | duplicates (6)
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();
  }

  const 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;