My Project
UNKNOWN_GIT_VERSION
kernel
GBEngine
f5data.h
Go to the documentation of this file.
1
//! \file f5data.cc
2
/****************************************
3
* Computer Algebra System SINGULAR *
4
****************************************/
5
/*
6
* ABSTRACT: labeled polynomial interface
7
*/
8
#ifndef F5DATA_HEADER
9
#define F5DATA_HEADER
10
#ifdef HAVE_F5
11
/*!
12
=========================================================
13
=========================================================
14
classes for labeled polynomials/pairs/S-polynomials in F5
15
=========================================================
16
=========================================================
17
*/
18
class
LPolyOld
;
19
class
CPairOld
;
20
class
RuleOld
;
21
22
23
/*!
24
============================
25
class of labeled polynomials
26
============================
27
*/
28
class
LPolyOld
{
29
private
:
30
poly
term
;
//term of signature
31
int
index
;
//index of signature
32
poly
polynomial
;
//standard polynomial data
33
RuleOld
*
_ruleOld
;
34
bool
del
;
35
public
:
36
inline
LPolyOld
(poly t,
int
i
, poly
p
,
RuleOld
* r=
NULL
);
37
// inline LPolyOld(poly t, int i, poly p, RuleOld* r=NULL, bool b=0);
38
inline
void
setPoly
(poly
p
);
39
inline
poly
getPoly
();
40
inline
void
setTerm
(poly t);
41
inline
poly
getTerm
();
42
inline
void
setIndex
(
int
i
);
43
inline
int
getIndex
();
44
inline
void
setRuleOld
(
RuleOld
* r);
45
inline
RuleOld
*
getRuleOld
();
46
inline
void
setDel
(
bool
d);
47
inline
bool
getDel
();
48
inline
void
set
(poly t,
int
i
, poly
p
,
RuleOld
* r);
49
inline
LPolyOld
*
get
();
50
};
51
52
LPolyOld::LPolyOld
(poly t,
int
i
,poly
p
,
RuleOld
* r) {
53
set
(t,
i
,
p
,r);
54
del
= 0;
55
}
56
57
/*LPolyOld::LPolyOld(poly t,int i,poly p, RuleOld* r, bool b) {
58
set(t,i,p,r);
59
del = b;
60
}
61
*/
62
void
LPolyOld::setPoly
(poly
p
) {
63
//poly _p = pInit();
64
//_p = pCopy(p);
65
polynomial
=
p
;
66
}
67
68
void
LPolyOld::setTerm
(poly t) {
69
//poly _t = pInit();
70
//_t = pCopy(t);
71
term
= t;
72
}
73
74
void
LPolyOld::setIndex
(
int
i
) {
75
index
=
i
;
76
}
77
78
void
LPolyOld::setRuleOld
(
RuleOld
* r) {
79
_ruleOld
= r;
80
}
81
82
void
LPolyOld::setDel
(
bool
d) {
83
del
= d;
84
}
85
86
poly
LPolyOld::getPoly
() {
87
return
polynomial
;
88
}
89
90
poly
LPolyOld::getTerm
() {
91
return
term
;
92
}
93
94
int
LPolyOld::getIndex
() {
95
return
index
;
96
}
97
98
RuleOld
*
LPolyOld::getRuleOld
() {
99
return
_ruleOld
;
100
}
101
102
bool
LPolyOld::getDel
() {
103
return
del
;
104
}
105
106
void
LPolyOld::set
(poly t,
int
i
, poly
p
,
RuleOld
* r) {
107
this->
setTerm
(t);
108
this->
setIndex
(i);
109
this->
setPoly
(p);
110
this->
setRuleOld
(r);
111
}
112
113
LPolyOld
*
LPolyOld::get
() {
114
return
this
;
115
}
116
117
118
/*!
119
===================================
120
structure of labeled critical pairs
121
===================================
122
*/
123
class
CPairOld
{
124
private
:
125
long
deg
;
// total degree of the critical pair
126
poly
t1
;
// first term for label
127
LPolyOld
*
lp1
;
// first labeled poly
128
poly
t2
;
// second term for label
129
LPolyOld
*
lp2
;
// second labeled poly
130
RuleOld
*
testedRuleOld
;
// already tested by RuleOlds up to lastRuleOldTested
131
bool
del
;
132
public
:
133
inline
CPairOld
(
long
degree
, poly term1,
LPolyOld
* LPolyOld1, poly term2,
LPolyOld
* LPolyOld2,
bool
useless,
RuleOld
* r =
NULL
);
134
inline
long
getDeg
();
135
inline
poly
getT1
();
136
inline
poly*
getAdT1
();
137
inline
LPolyOld
*
getAdLp1
();
138
inline
poly
getLp1Poly
();
139
inline
poly
getLp1Term
();
140
inline
int
getLp1Index
();
141
inline
poly
getT2
();
142
inline
poly*
getAdT2
();
143
inline
LPolyOld
*
getAdLp2
();
144
inline
poly
getLp2Poly
();
145
inline
poly
getLp2Term
();
146
inline
int
getLp2Index
();
147
inline
bool
getDel
();
148
inline
RuleOld
*
getTestedRuleOld
();
149
inline
void
setTestedRuleOld
(
RuleOld
* r);
150
};
151
152
CPairOld::CPairOld
(
long
degree
, poly term1,
LPolyOld
* LPolyOld1, poly term2,
LPolyOld
* LPolyOld2,
bool
useless,
RuleOld
* r) {
153
deg
=
degree
;
154
t1
= term1;
155
lp1
= LPolyOld1;
156
t2
= term2;
157
lp2
= LPolyOld2;
158
testedRuleOld
= r;
159
del
= useless;
160
}
161
162
long
CPairOld::getDeg
() {
163
return
deg
;
164
}
165
166
poly
CPairOld::getT1
() {
167
return
t1
;
168
}
169
170
poly*
CPairOld::getAdT1
() {
171
return
&
t1
;
172
}
173
174
poly*
CPairOld::getAdT2
() {
175
return
&
t2
;
176
}
177
178
poly
CPairOld::getT2
() {
179
return
t2
;
180
}
181
182
LPolyOld
*
CPairOld::getAdLp1
() {
183
return
lp1
;
184
}
185
186
LPolyOld
*
CPairOld::getAdLp2
() {
187
return
lp2
;
188
}
189
190
poly
CPairOld::getLp1Poly
() {
191
return
lp1
->
getPoly
();
192
}
193
194
poly
CPairOld::getLp2Poly
() {
195
return
lp2
->
getPoly
();
196
}
197
198
poly
CPairOld::getLp1Term
() {
199
return
lp1
->
getTerm
();
200
}
201
202
poly
CPairOld::getLp2Term
() {
203
return
lp2
->
getTerm
();
204
}
205
206
int
CPairOld::getLp1Index
() {
207
return
lp1
->
getIndex
();
208
}
209
210
int
CPairOld::getLp2Index
() {
211
return
lp2
->
getIndex
();
212
}
213
214
bool
CPairOld::getDel
() {
215
return
del
;
216
}
217
218
RuleOld
*
CPairOld::getTestedRuleOld
() {
219
return
testedRuleOld
;
220
}
221
222
void
CPairOld::setTestedRuleOld
(
RuleOld
* r) {
223
testedRuleOld
= r;
224
}
225
226
227
/*!
228
========================================================
229
structure of RuleOlds(i.e. already computed / known labels)
230
========================================================
231
*/
232
class
RuleOld
{
233
private
:
234
int
index
;
// index of the labeled polynomial the RuleOld comes from
235
poly
term
;
// term of the labeled polynomial the RuleOld comes from
236
public
:
237
inline
RuleOld
(
int
i
, poly
term
);
238
inline
~RuleOld
();
239
inline
int
getIndex
();
240
inline
poly
getTerm
();
241
};
242
243
RuleOld::RuleOld
(
int
i
, poly t) {
244
index
=
i
;
245
term
= t;
246
}
247
248
RuleOld::~RuleOld
() {
249
//pDelete(&term);
250
}
251
252
int
RuleOld::getIndex
() {
253
return
index
;
254
}
255
256
poly
RuleOld::getTerm
() {
257
return
term
;
258
}
259
#endif
260
#endif
CPairOld::getLp1Term
poly getLp1Term()
Definition:
f5data.h:198
LPolyOld::get
LPolyOld * get()
Definition:
f5data.h:113
CPairOld::t1
poly t1
Definition:
f5data.h:126
RuleOld::~RuleOld
~RuleOld()
Definition:
f5data.h:248
LPolyOld::setDel
void setDel(bool d)
Definition:
f5data.h:82
CPairOld::getLp2Index
int getLp2Index()
Definition:
f5data.h:210
RuleOld
Definition:
f5data.h:232
CPairOld::getT1
poly getT1()
Definition:
f5data.h:166
CPairOld::getLp2Poly
poly getLp2Poly()
Definition:
f5data.h:194
LPolyOld::getIndex
int getIndex()
Definition:
f5data.h:94
CPairOld::getTestedRuleOld
RuleOld * getTestedRuleOld()
Definition:
f5data.h:218
LPolyOld::setIndex
void setIndex(int i)
Definition:
f5data.h:74
CPairOld::getAdLp2
LPolyOld * getAdLp2()
Definition:
f5data.h:186
LPolyOld::del
bool del
Definition:
f5data.h:34
CPairOld::getAdT1
poly * getAdT1()
Definition:
f5data.h:170
LPolyOld::setTerm
void setTerm(poly t)
Definition:
f5data.h:68
LPolyOld::getPoly
poly getPoly()
Definition:
f5data.h:86
term
Definition:
int_poly.h:33
CPairOld::setTestedRuleOld
void setTestedRuleOld(RuleOld *r)
Definition:
f5data.h:222
i
int i
Definition:
cfEzgcd.cc:125
RuleOld::index
int index
Definition:
f5data.h:234
CPairOld::getLp1Index
int getLp1Index()
Definition:
f5data.h:206
CPairOld::getAdT2
poly * getAdT2()
Definition:
f5data.h:174
LPolyOld::index
int index
Definition:
f5data.h:31
LPolyOld::_ruleOld
RuleOld * _ruleOld
Definition:
f5data.h:33
LPolyOld::setPoly
void setPoly(poly p)
Definition:
f5data.h:62
CPairOld::t2
poly t2
Definition:
f5data.h:128
LPolyOld::getDel
bool getDel()
Definition:
f5data.h:102
RuleOld::getIndex
int getIndex()
Definition:
f5data.h:252
CPairOld::lp1
LPolyOld * lp1
Definition:
f5data.h:127
CPairOld
Definition:
f5data.h:123
LPolyOld::polynomial
poly polynomial
Definition:
f5data.h:32
LPolyOld::setRuleOld
void setRuleOld(RuleOld *r)
Definition:
f5data.h:78
CPairOld::del
bool del
Definition:
f5data.h:131
RuleOld::term
poly term
Definition:
f5data.h:235
LPolyOld::getTerm
poly getTerm()
Definition:
f5data.h:90
LPolyOld::LPolyOld
LPolyOld(poly t, int i, poly p, RuleOld *r=NULL)
Definition:
f5data.h:52
CPairOld::CPairOld
CPairOld(long degree, poly term1, LPolyOld *LPolyOld1, poly term2, LPolyOld *LPolyOld2, bool useless, RuleOld *r=NULL)
Definition:
f5data.h:152
CPairOld::getAdLp1
LPolyOld * getAdLp1()
Definition:
f5data.h:182
CPairOld::getLp2Term
poly getLp2Term()
Definition:
f5data.h:202
NULL
#define NULL
Definition:
omList.c:10
CPairOld::testedRuleOld
RuleOld * testedRuleOld
Definition:
f5data.h:130
RuleOld::getTerm
poly getTerm()
Definition:
f5data.h:256
LPolyOld::set
void set(poly t, int i, poly p, RuleOld *r)
Definition:
f5data.h:106
p
int p
Definition:
cfModGcd.cc:4019
CPairOld::getDel
bool getDel()
Definition:
f5data.h:214
CPairOld::deg
long deg
Definition:
f5data.h:125
CPairOld::lp2
LPolyOld * lp2
Definition:
f5data.h:129
LPolyOld::term
poly term
Definition:
f5data.h:30
LPolyOld::getRuleOld
RuleOld * getRuleOld()
Definition:
f5data.h:98
degree
int degree(const CanonicalForm &f)
Definition:
canonicalform.h:309
CPairOld::getDeg
long getDeg()
Definition:
f5data.h:162
RuleOld::RuleOld
RuleOld(int i, poly term)
Definition:
f5data.h:243
CPairOld::getT2
poly getT2()
Definition:
f5data.h:178
LPolyOld
Definition:
f5data.h:28
CPairOld::getLp1Poly
poly getLp1Poly()
Definition:
f5data.h:190
Generated on Sat Jul 11 2020 00:00:00 for My Project by
doxygen 1.8.18
for
Singular UNKNOWN_GIT_VERSION