1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /* $Id: lpolynomial.h,v 1.6 2009-01-25 17:13:06 ederc Exp $ */ |
---|
5 | /* |
---|
6 | * ABSTRACT: labeled polynomial interface |
---|
7 | */ |
---|
8 | #ifndef LPOLYNOMIAL_HEADER |
---|
9 | #define LPOLYNOMIAL_HEADER |
---|
10 | |
---|
11 | #ifdef HAVE_F5 |
---|
12 | /* |
---|
13 | ========================================================= |
---|
14 | ========================================================= |
---|
15 | classes for labeled polynomials/pairs/S-polynomials in F5 |
---|
16 | ========================================================= |
---|
17 | ========================================================= |
---|
18 | */ |
---|
19 | class LPoly; |
---|
20 | class CPair; |
---|
21 | class Rule; |
---|
22 | |
---|
23 | |
---|
24 | /* |
---|
25 | ============================ |
---|
26 | class of labeled polynomials |
---|
27 | ============================ |
---|
28 | */ |
---|
29 | class LPoly { |
---|
30 | private: |
---|
31 | poly term; //term of signature |
---|
32 | int index; //index of signature |
---|
33 | poly polynomial; //standard polynomial data |
---|
34 | bool del; //for deletion in TopReduction Subalgorithm |
---|
35 | public: |
---|
36 | LPoly(poly*t,int* i,poly* p); |
---|
37 | void setPoly(poly* p); |
---|
38 | poly* getPoly(); |
---|
39 | void setTerm(poly* t); |
---|
40 | poly* getTerm(); |
---|
41 | void setIndex(int* i); |
---|
42 | int* getIndex(); |
---|
43 | void setDel(bool b); |
---|
44 | bool getDel() const; |
---|
45 | void set(poly* t, int* i, poly* p); |
---|
46 | LPoly* get(); |
---|
47 | }; |
---|
48 | |
---|
49 | |
---|
50 | /* |
---|
51 | =================================== |
---|
52 | structure of labeled critical pairs |
---|
53 | =================================== |
---|
54 | */ |
---|
55 | class CPair { |
---|
56 | private: |
---|
57 | long deg; // total degree of the critical pair |
---|
58 | poly t1; // first term for label |
---|
59 | LPoly* lp1; // first labeled poly |
---|
60 | poly t2; // second term for label |
---|
61 | LPoly* lp2; // second labeled poly |
---|
62 | public: |
---|
63 | CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2); |
---|
64 | long getDeg(); |
---|
65 | poly getT1(); |
---|
66 | poly getLp1Poly(); |
---|
67 | poly getLp1Term(); |
---|
68 | int getLp1Index(); |
---|
69 | poly getT2(); |
---|
70 | poly getLp2Poly(); |
---|
71 | poly getLp2Term(); |
---|
72 | int getLp2Index(); |
---|
73 | }; |
---|
74 | |
---|
75 | |
---|
76 | /* |
---|
77 | ======================================================== |
---|
78 | structure of rules(i.e. already computed / known labels) |
---|
79 | ======================================================== |
---|
80 | */ |
---|
81 | class Rule { |
---|
82 | private: |
---|
83 | int* index; // index of the labeled polynomial the rule comes from |
---|
84 | poly* term; // term of the labeled polynomial the rule comes from |
---|
85 | public: |
---|
86 | Rule(int* i, poly* term); |
---|
87 | int getIndex(); |
---|
88 | poly getTerm(); |
---|
89 | }; |
---|
90 | #endif |
---|
91 | #endif |
---|