My Project
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
sTObject Class Reference

#include <kutil.h>

Public Member Functions

KINLINE void Init (ring r=currRing)
 
KINLINE sTObject (ring tailRing=currRing)
 
KINLINE sTObject (poly p, ring tailRing=currRing)
 
KINLINE sTObject (poly p, ring c_r, ring tailRing)
 
KINLINE sTObject (sTObject *T, int copy)
 
KINLINE void Set (ring r=currRing)
 
KINLINE void Set (poly p_in, ring r=currRing)
 
KINLINE void Set (poly p_in, ring c_r, ring t_r)
 
KINLINE void Delete ()
 
KINLINE void Clear ()
 
KINLINE void Copy ()
 
KINLINE poly GetLmCurrRing ()
 
KINLINE poly GetLmTailRing ()
 
KINLINE poly GetLm (ring r)
 
KINLINE void GetLm (poly &p, ring &r) const
 
KINLINE BOOLEAN IsNull () const
 
KINLINE int GetpLength ()
 
KINLINE void SetLmCurrRing ()
 
KINLINE poly Next ()
 
KINLINE void LmDeleteAndIter ()
 
KINLINE long pTotalDeg () const
 
KINLINE long pFDeg () const
 
KINLINE long SetpFDeg ()
 
KINLINE long GetpFDeg () const
 
KINLINE long pLDeg ()
 
KINLINE long SetDegStuffReturnLDeg ()
 
KINLINE void Mult_nn (number n)
 
KINLINE void ShallowCopyDelete (ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
 
KINLINE void pNorm ()
 
KINLINE void pCleardenom ()
 
KINLINE void pContent ()
 
void wrp ()
 

Data Fields

unsigned long sevSig
 
poly sig
 
poly p
 
poly t_p
 
poly max_exp
 
ring tailRing
 
long FDeg
 
int ecart
 
int length
 
int pLength
 
int i_r
 
int shift
 
char is_normalized
 
char is_redundant
 
char is_sigsafe
 
char is_special
 

Detailed Description

Definition at line 68 of file kutil.h.

Constructor & Destructor Documentation

◆ sTObject() [1/4]

KINLINE sTObject::sTObject ( ring  tailRing = currRing)

Definition at line 116 of file kInline.h.

117{
118 Init(r);
119}
KINLINE void Init(ring r=currRing)
Definition: kInline.h:110

◆ sTObject() [2/4]

KINLINE sTObject::sTObject ( poly  p,
ring  tailRing = currRing 
)

Definition at line 145 of file kInline.h.

146{
147 Init(r);
148 Set(p_in, r);
149}
KINLINE void Set(ring r=currRing)
Definition: kInline.h:106

◆ sTObject() [3/4]

KINLINE sTObject::sTObject ( poly  p,
ring  c_r,
ring  tailRing 
)

Definition at line 176 of file kInline.h.

177{
178 Init(t_r);
179 Set(p_in, c_r, t_r);
180}

◆ sTObject() [4/4]

KINLINE sTObject::sTObject ( sTObject T,
int  copy 
)

Definition at line 182 of file kInline.h.

183{
184 *this = *T;
185 if (copy)
186 {
187 if (t_p != NULL)
188 {
191 }
192 else
193 {
194 p = p_Copy(p, currRing);
195 }
196 }
197}
poly p
Definition: kutil.h:73
poly t_p
Definition: kutil.h:74
ring tailRing
Definition: kutil.h:76
CFArray copy(const CFList &list)
write elements of list into an array
STATIC_VAR jList * T
Definition: janet.cc:30
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
Definition: kInline.h:968
#define NULL
Definition: omList.c:12
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:844
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13

Member Function Documentation

◆ Clear()

KINLINE void sTObject::Clear ( )

Definition at line 213 of file kInline.h.

214{
215 p = NULL;
216 t_p = NULL;
217 ecart = 0;
218 length = 0;
219 pLength = 0;
220 FDeg = 0;
222}
#define FALSE
Definition: auxiliary.h:96
int length
Definition: kutil.h:79
int ecart
Definition: kutil.h:78
char is_normalized
Definition: kutil.h:87
int pLength
Definition: kutil.h:80
long FDeg
Definition: kutil.h:77

◆ Copy()

KINLINE void sTObject::Copy ( )

Definition at line 224 of file kInline.h.

225{
226 if (t_p != NULL)
227 {
229 if (p != NULL) /* and t_p!=NULL*/
230 {
231 p = p_LmInit(p, currRing);
233 pNext(p) = pNext(t_p);
234 }
235 }
236 else
237 {
238 p = p_Copy(p, currRing);
239 }
240}
#define pNext(p)
Definition: monomials.h:36
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:44
static poly p_LmInit(poly p, const ring r)
Definition: p_polys.h:1333

◆ Delete()

KINLINE void sTObject::Delete ( )

Definition at line 199 of file kInline.h.

200{
201 if (t_p != NULL)
202 {
204 if (p != NULL)
206 }
207 else
208 {
210 }
211}
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:899
static void p_LmFree(poly p, ring)
Definition: p_polys.h:681

◆ GetLm() [1/2]

KINLINE void sTObject::GetLm ( poly &  p,
ring &  r 
) const

Definition at line 274 of file kInline.h.

275{
276 if (t_p != NULL)
277 {
278 p_r = t_p;
279 r_r = tailRing;
280 }
281 else
282 {
283 p_r = p;
284 r_r = currRing;
285 }
286}

◆ GetLm() [2/2]

KINLINE poly sTObject::GetLm ( ring  r)

Definition at line 262 of file kInline.h.

263{
264 assume(r == tailRing || r == currRing);
265 if (r == currRing)
266 return GetLmCurrRing();
267
268 if (t_p == NULL && p != NULL)
270
271 return t_p;
272}
KINLINE poly GetLmCurrRing()
Definition: kInline.h:242
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
Definition: kInline.h:959
#define assume(x)
Definition: mod2.h:389

◆ GetLmCurrRing()

KINLINE poly sTObject::GetLmCurrRing ( )

Definition at line 242 of file kInline.h.

243{
244 if (p == NULL && t_p != NULL)
246
247 return p;
248}

◆ GetLmTailRing()

KINLINE poly sTObject::GetLmTailRing ( )

Definition at line 249 of file kInline.h.

250{
251 if (t_p == NULL)
252 {
253 if (p != NULL && tailRing != currRing)
254 {
256 return t_p;
257 }
258 return p;
259 }
260 return t_p;
261}

◆ GetpFDeg()

KINLINE long sTObject::GetpFDeg ( ) const

Definition at line 437 of file kInline.h.

438{
439 assume(FDeg == this->pFDeg());
440 return FDeg;
441}
KINLINE long pFDeg() const
Definition: kInline.h:422

◆ GetpLength()

KINLINE int sTObject::GetpLength ( )

Definition at line 293 of file kInline.h.

294{
295 if (pLength <= 0) pLength = ::pLength(p != NULL ? p : t_p);
296 return pLength;
297}

◆ Init()

KINLINE void sTObject::Init ( ring  r = currRing)

Definition at line 110 of file kInline.h.

111{
112 memset(this, 0, sizeof(sTObject));
113 i_r = -1;
114 Set(r);
115}
Definition: kutil.h:69
int i_r
Definition: kutil.h:81

◆ IsNull()

KINLINE BOOLEAN sTObject::IsNull ( ) const

Definition at line 288 of file kInline.h.

289{
290 return (p == NULL && t_p == NULL);
291}

◆ LmDeleteAndIter()

KINLINE void sTObject::LmDeleteAndIter ( )

Definition at line 313 of file kInline.h.

314{
315 assume(p != NULL || t_p != NULL);
316 if (t_p != NULL)
317 {
319 if (p != NULL)
320 {
322 p = NULL;
323 }
324 }
325 else
326 {
328 }
330}
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:753

◆ Mult_nn()

KINLINE void sTObject::Mult_nn ( number  n)

Definition at line 334 of file kInline.h.

335{
336 if (t_p != NULL)
337 {
338 t_p = p_Mult_nn(t_p, n, tailRing);
339 if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
340 }
341 else
342 {
343 p = p_Mult_nn(p, n, currRing, tailRing);
344 }
345}
#define pSetCoeff0(p, n)
Definition: monomials.h:59
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:956

◆ Next()

KINLINE poly sTObject::Next ( )

Definition at line 305 of file kInline.h.

306{
307 assume(p != NULL || t_p != NULL);
308 if (t_p != NULL) return pNext(t_p);
309 return pNext(p);
310}

◆ pCleardenom()

KINLINE void sTObject::pCleardenom ( )

Definition at line 458 of file kInline.h.

459{
460 assume(p != NULL);
462 if ((TEST_OPT_CONTENTSB) && (!is_ring))
463 {
464 number n;
465 if (t_p != NULL)
466 {
469 }
470 else
471 {
473 }
474 if (!nIsOne(n))
475 {
477 denom->n=nInvers(n);
478 denom->next=DENOMINATOR_LIST;
479 DENOMINATOR_LIST=denom;
480 }
481 nDelete(&n);
482 }
483 #ifdef HAVE_RINGS
484 else if (is_ring)
485 {
486 number c;
487 if (t_p != NULL)
488 c=pGetCoeff(t_p);
489 else
490 c=pGetCoeff(p);
491 const coeffs C=tailRing->cf;
492 number u=n_GetUnit(c,C);
493
494 if (t_p != NULL)
495 {
496 if (!n_IsOne(u,C))
497 {
498 number uInv = n_Invers(u, C);
500 n_Delete(&uInv,C);
501 }
503 {
505 }
507 }
508 else
509 {
510 if (!n_IsOne(u,C))
511 {
512 number uInv = n_Invers(u, C);
513 p=p_Mult_nn(p,uInv,tailRing);
514 n_Delete(&uInv,C);
515 }
517 {
518 p = p_Neg(p,tailRing);
519 }
520 }
521 n_Delete(&u,C);
522 }
523 #endif
524 else
525 {
526 if (t_p != NULL)
527 {
530 }
531 else
532 {
534 }
535 }
536}
int BOOLEAN
Definition: auxiliary.h:87
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
Definition: coeffs.h:561
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
Definition: coeffs.h:491
static FORCE_INLINE number n_GetUnit(number n, const coeffs r)
in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k i...
Definition: coeffs.h:529
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:452
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition: coeffs.h:465
denominator_list_s * denominator_list
Definition: kutil.h:63
EXTERN_VAR denominator_list DENOMINATOR_LIST
Definition: kutil.h:66
denominator_list next
Definition: kutil.h:65
The main handler for Singular numbers which are suitable for Singular polynomials.
#define nDelete(n)
Definition: numbers.h:16
#define nInvers(a)
Definition: numbers.h:33
#define nIsOne(n)
Definition: numbers.h:25
#define omAlloc(size)
Definition: omAllocDecl.h:210
#define TEST_OPT_CONTENTSB
Definition: options.h:128
void p_Cleardenom_n(poly ph, const ring r, number &c)
Definition: p_polys.cc:2954
void p_ProjectiveUnique(poly ph, const ring r)
Definition: p_polys.cc:3143
static poly p_Neg(poly p, const ring r)
Definition: p_polys.h:1105
#define rField_is_Ring(R)
Definition: ring.h:485

◆ pContent()

KINLINE void sTObject::pContent ( )

Definition at line 538 of file kInline.h.

539{
540 assume(p != NULL);
541 if (t_p != NULL)
542 {
545 {
547 }
549 }
550 else
551 {
554 {
555 p=p_Neg (p,currRing);
556 }
557 }
558}
void p_SimpleContent(poly ph, int smax, const ring r)
Definition: p_polys.cc:2564

◆ pFDeg()

KINLINE long sTObject::pFDeg ( ) const

Definition at line 422 of file kInline.h.

423{
424 if (p != NULL) return p_FDeg(p, currRing);
425 return tailRing->pFDeg(t_p, tailRing);
426}
static long p_FDeg(const poly p, const ring r)
Definition: p_polys.h:378

◆ pLDeg()

KINLINE long sTObject::pLDeg ( )

Definition at line 442 of file kInline.h.

443{
444 return tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
445}
KINLINE poly GetLmTailRing()
Definition: kInline.h:249

◆ pNorm()

KINLINE void sTObject::pNorm ( )

Definition at line 560 of file kInline.h.

561{
562 assume(p != NULL);
563 if (! is_normalized)
564 {
565 p_Norm(p, currRing);
566 if (t_p != NULL)
569 }
570}
#define TRUE
Definition: auxiliary.h:100
void p_Norm(poly p1, const ring r)
Definition: p_polys.cc:3719

◆ pTotalDeg()

KINLINE long sTObject::pTotalDeg ( ) const

Definition at line 427 of file kInline.h.

428{
429 if (p != NULL) return p_Totaldegree(p, currRing);
430 return p_Totaldegree(t_p,tailRing);
431}
static long p_Totaldegree(poly p, const ring r)
Definition: p_polys.h:1505

◆ Set() [1/3]

KINLINE void sTObject::Set ( poly  p_in,
ring  c_r,
ring  t_r 
)

Definition at line 151 of file kInline.h.

152{
153 if (c_r != t_r)
154 {
155 assume(c_r == currRing && t_r == tailRing);
156#ifdef HAVE_SHIFTBBA
157 if (c_r->isLPring)
158 {
159 shift = si_max(p_mFirstVblock(p_in, c_r) - 1, 0);
160 if (!shift) p_Test(p_in, currRing);
161 }
162 else
163#endif
164 {
165 p_Test(p_in, currRing);
166 }
167 p = p_in;
168 pLength=::pLength(p_in);
169 }
170 else
171 {
172 Set(p_in, c_r);
173 }
174}
static int si_max(const int a, const int b)
Definition: auxiliary.h:124
int shift
Definition: kutil.h:84
#define p_Test(p, r)
Definition: p_polys.h:159
int p_mFirstVblock(poly p, const ring ri)
Definition: shiftop.cc:478

◆ Set() [2/3]

KINLINE void sTObject::Set ( poly  p_in,
ring  r = currRing 
)

Definition at line 120 of file kInline.h.

121{
122#ifdef HAVE_SHIFTBBA
123 if (r->isLPring)
124 {
125 shift = si_max(p_mFirstVblock(p_in, r) - 1, 0);
126 if (!shift) p_Test(p_in, r);
127 }
128 else
129#endif
130 {
131 p_Test(p_in, r);
132 }
133 if (r != currRing)
134 {
135 assume(r == tailRing);
136 t_p = p_in;
137 }
138 else
139 {
140 p = p_in;
141 }
142 pLength=::pLength(p_in);
143}

◆ Set() [3/3]

KINLINE void sTObject::Set ( ring  r = currRing)

Definition at line 106 of file kInline.h.

107{
108 tailRing = r;
109}

◆ SetDegStuffReturnLDeg()

KINLINE long sTObject::SetDegStuffReturnLDeg ( )

Definition at line 446 of file kInline.h.

447{
448 FDeg = this->pFDeg();
449 long d = this->pLDeg();
450 ecart = d - FDeg;
451 return d;
452}
KINLINE long pLDeg()
Definition: kInline.h:442

◆ SetLmCurrRing()

KINLINE void sTObject::SetLmCurrRing ( )

Definition at line 299 of file kInline.h.

300{
301 if (p == NULL && t_p != NULL)
303}

◆ SetpFDeg()

KINLINE long sTObject::SetpFDeg ( )

Definition at line 432 of file kInline.h.

433{
434 FDeg = this->pFDeg();
435 return FDeg;
436}

◆ ShallowCopyDelete()

KINLINE void sTObject::ShallowCopyDelete ( ring  new_tailRing,
omBin  new_tailBin,
pShallowCopyDeleteProc  p_shallow_copy_delete,
BOOLEAN  set_max = TRUE 
)

Definition at line 381 of file kInline.h.

384{
385 if (new_tailBin == NULL) new_tailBin = new_tailRing->PolyBin;
386 if (t_p != NULL)
387 {
388 t_p = p_shallow_copy_delete(t_p, tailRing, new_tailRing, new_tailBin);
389 if (p != NULL)
390 pNext(p) = pNext(t_p);
391 if (new_tailRing == currRing)
392 {
393 if (p == NULL) p = t_p;
394 else p_LmFree(t_p, tailRing);
395 t_p = NULL;
396 }
397 }
398 else if (p != NULL) /* && t_p==NULL */
399 {
400 if (pNext(p) != NULL)
401 {
402 pNext(p) = p_shallow_copy_delete(pNext(p),
403 tailRing, new_tailRing, new_tailBin);
404 }
405 if (new_tailRing != currRing)
406 {
407 t_p = k_LmInit_currRing_2_tailRing(p, new_tailRing);
408 pNext(t_p) = pNext(p);
409 }
410 }
411 if (max_exp != NULL)
412 {
413 max_exp = p_shallow_copy_delete(max_exp,tailRing,new_tailRing,new_tailBin);
414 }
415 else if (set_max && pNext(t_p) != NULL)
416 {
417 max_exp = p_GetMaxExpP(pNext(t_p), new_tailRing);
418 }
419 tailRing = new_tailRing;
420}
poly max_exp
Definition: kutil.h:75
poly p_GetMaxExpP(poly p, const ring r)
return monomial r such that GetExp(r,i) is maximum of all monomials in p; coeff == 0,...
Definition: p_polys.cc:1138

◆ wrp()

void sTObject::wrp ( )

Definition at line 773 of file kutil.cc.

774{
775 if (t_p != NULL) p_wrp(t_p, tailRing);
776 else if (p != NULL) p_wrp(p, currRing, tailRing);
777 else ::wrp(NULL);
778}
void p_wrp(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:373

Field Documentation

◆ ecart

int sTObject::ecart

Definition at line 78 of file kutil.h.

◆ FDeg

long sTObject::FDeg

Definition at line 77 of file kutil.h.

◆ i_r

int sTObject::i_r

Definition at line 81 of file kutil.h.

◆ is_normalized

char sTObject::is_normalized

Definition at line 87 of file kutil.h.

◆ is_redundant

char sTObject::is_redundant

Definition at line 93 of file kutil.h.

◆ is_sigsafe

char sTObject::is_sigsafe

Definition at line 98 of file kutil.h.

◆ is_special

char sTObject::is_special

Definition at line 102 of file kutil.h.

◆ length

int sTObject::length

Definition at line 79 of file kutil.h.

◆ max_exp

poly sTObject::max_exp

Definition at line 75 of file kutil.h.

◆ p

poly sTObject::p

Definition at line 73 of file kutil.h.

◆ pLength

int sTObject::pLength

Definition at line 80 of file kutil.h.

◆ sevSig

unsigned long sTObject::sevSig

Definition at line 71 of file kutil.h.

◆ shift

int sTObject::shift

Definition at line 84 of file kutil.h.

◆ sig

poly sTObject::sig

Definition at line 72 of file kutil.h.

◆ t_p

poly sTObject::t_p

Definition at line 74 of file kutil.h.

◆ tailRing

ring sTObject::tailRing

Definition at line 76 of file kutil.h.


The documentation for this class was generated from the following files: