File: app_walk.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 (86 lines) | stat: -rw-r--r-- 1,810 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#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 "ep_standard.h"
#include "ep_xfig.h"
#include "genericwalk.h"
#include "gfanapplication.h"
#include "timer.h"

class WalkApplication : public GFanApplication
{
  FieldOption theFieldOption;
public:
  bool includeInDefaultInstallation()
  {
    return false;
  }
  WalkApplication()
  {
    registerOptions();
  }

  const char *name()
  {
    return "_walk";
  }

  int main()
  {
    lpSetSolver("cddgmp");


    FileParser p(Stdin);
    PolynomialSet g=p.parsePolynomialSetWithRing();

    //  StandardGradedLexicographicTermOrder t1;
    WeightReverseLexicographicTermOrder t1(StringParser("(1,1,1,1,1,1)").parseIntegerVector());
    AsciiPrinter P(Stderr);

    assert(g.checkMarkings(t1));
      //    g.mark(t1);
      // AsciiPrinter(Stdout).printPolynomialSet(g);

    t1.printMatrix(P,6);
    LexicographicTermOrder t2;
    //    LexicographicTermOrder t1(1);
    //    LexicographicTermOrder t2;

    fprintf(Stderr,"Computing starting Groebner basis\n");

    autoReduce(&g,t1);
    //    buchberger(&g,t1);

    AsciiPrinter(Stdout).printPolynomialSet(g);

    fprintf(Stderr,"Walking with perturbation\n");


    //    int n=g.numberOfVariablesInRing();
    //    for(int i=n;i>=0;i--)
    //    for(int i=n-4;i>=0;i--)
    {
      PolynomialSet g2(g.getRing());

      //      g2=genericWalkPerturbation(g,t1,t2,i,i);
      g2=genericWalkPerturbation(g,t1,t2,6,6);

      AsciiPrinter(Stdout).printPolynomialSet(g2);
    }

    return 0;
  }
  const char *helpText()
  {
    return "This program walks. THIS PROGRAM NEEDS TO BE FIXED.\n";
  }
};

static WalkApplication theApplication;