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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
#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 "polyhedralcone.h"
#include "gfanapplication.h"
#include "saturation.h"
#include "field_rationals.h"
#include "field_zmodpz.h"
class TestApplication : public GFanApplication
{
FieldOption theFieldOption;
public:
bool includeInDefaultInstallation()
{
return false;
}
const char *helpText()
{
return "This\n";
}
TestApplication()
{
registerOptions();
}
char *name()
{
return "_test";
}
Field test(Field &a)
{
return a;
}
FieldElement test2()
{
FieldZModPZ f(3);
return f.zHomomorphism(1);
}
FieldElement test3(FieldElement &a)
{
return a.one();
}
int main()
{
FieldElement a=Q.zHomomorphism(2);
FieldElement b=Q.zHomomorphism(3);
FieldElement c=Q.zHomomorphism(3);
c=a*b;
Field QQ(Q);
QQ=Q;
QQ=QQ;
QQ=test(Q);
QQ=test(Q);
c=c;
c=test3(c);
PolynomialRing R=StringParser("Q[a]").parsePolynomialRing();
// Term s=StringParser("a").parseTerm(R);
FieldElement k(R.getField());
// k=R.getField().zHomomorphism(1);
/*
{
{
FieldElement k(r.getField());
k=r.getField().zHomomorphism(1);
Monomial m=parseMonomial(r);
return Term(k,m);
}
}
*/
// Polynomial s2=s;
FieldElement e=test2();
AsciiPrinter(Stdout).printFieldElement(e);
// fprintf(Stderr,"Number of living FieldImplementations:%i\n",FieldImplementation::getNumberOfLivingFieldImplementations());
AsciiPrinter(Stdout).printField(e.getField());
// AsciiPrinter(Stdout).printFieldElement(c);
/* PolynomialSet g=FileParser(Stdin).parsePolynomialSetWithRing();
AsciiPrinter(Stdout).printPolynomialSet(nonHomogeneousSaturation(g));
*/
// Field FF=c.getField();
return 0;
}
};
static TestApplication theApplication;
|