File: app_markpolynomialset.cpp

package info (click to toggle)
gfan 0.5%2Bdfsg-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,296 kB
  • ctags: 5,612
  • sloc: cpp: 39,675; makefile: 453; sh: 1
file content (40 lines) | stat: -rw-r--r-- 1,058 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
#include "vektor.h"
#include "printer.h"
#include "parser.h"
#include "gfanapplication.h"
#include "minkowskisum.h"
#include "newtonpolytope.h"
#include "buchberger.h"
#include "wallideal.h"
#include "lp.h"

class MarkPolynomialSetApplication : public GFanApplication
{
public:
  const char *helpText()
  {
    return "This program marks a set of polynomials with respect to the vector given at the end of the input, meaning that the largest terms are moved to the front. In case of a tie the lexicographic term order with $a>b>c...$ is used to break it.\n";
  }
  MarkPolynomialSetApplication()
  {
    registerOptions();
  }
  const char *name()
  {
    return "_markpolynomialset";
  }
  int main()
  {
    FileParser P(Stdin);
    PolynomialSet g=P.parsePolynomialSetWithRing();
    IntegerVector v=P.parseIntegerVector();
    WeightTermOrder t(v);
    g.markAndScale(t);
    AsciiPrinter(Stdout).printPolynomialRing(g.getRing());
    AsciiPrinter(Stdout).printPolynomialSet(g);

    return 0;
  }
};

static MarkPolynomialSetApplication theApplication;