My Project  UNKNOWN_GIT_VERSION
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 ()
 

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
 
char is_normalized
 
char is_redundant
 
char is_sigsafe
 
char is_special
 

Detailed Description

Definition at line 64 of file kutil.h.

Constructor & Destructor Documentation

◆ sTObject() [1/4]

KINLINE sTObject::sTObject ( ring  tailRing = currRing)

Definition at line 113 of file kInline.h.

114 {
115  Init(r);
116 }

◆ sTObject() [2/4]

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

Definition at line 133 of file kInline.h.

134 {
135  Init(r);
136  Set(p_in, r);
137 }

◆ sTObject() [3/4]

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

Definition at line 154 of file kInline.h.

155 {
156  Init(t_r);
157  Set(p_in, c_r, t_r);
158 }

◆ sTObject() [4/4]

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

Definition at line 160 of file kInline.h.

161 {
162  *this = *T;
163  if (copy)
164  {
165  if (t_p != NULL)
166  {
167  t_p = p_Copy(t_p, tailRing);
169  }
170  else
171  {
172  p = p_Copy(p, currRing);
173  }
174  }
175 }

Member Function Documentation

◆ Clear()

KINLINE void sTObject::Clear ( )

Definition at line 191 of file kInline.h.

192 {
193  p = NULL;
194  t_p = NULL;
195  ecart = 0;
196  length = 0;
197  pLength = 0;
198  FDeg = 0;
200 }

◆ Copy()

KINLINE void sTObject::Copy ( )

Definition at line 202 of file kInline.h.

203 {
204  if (t_p != NULL)
205  {
206  t_p = p_Copy(t_p, tailRing);
207  if (p != NULL) /* and t_p!=NULL*/
208  {
209  p = p_LmInit(p, currRing);
211  pNext(p) = pNext(t_p);
212  }
213  }
214  else
215  {
216  p = p_Copy(p, currRing);
217  }
218 }

◆ Delete()

KINLINE void sTObject::Delete ( )

Definition at line 177 of file kInline.h.

178 {
179  if (t_p != NULL)
180  {
181  p_Delete(&t_p, tailRing);
182  if (p != NULL)
183  p_LmFree(p, currRing);
184  }
185  else
186  {
187  p_Delete(&p, currRing);
188  }
189 }

◆ GetLm() [1/2]

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

Definition at line 252 of file kInline.h.

253 {
254  if (t_p != NULL)
255  {
256  p_r = t_p;
257  r_r = tailRing;
258  }
259  else
260  {
261  p_r = p;
262  r_r = currRing;
263  }
264 }

◆ GetLm() [2/2]

KINLINE poly sTObject::GetLm ( ring  r)

Definition at line 240 of file kInline.h.

241 {
242  assume(r == tailRing || r == currRing);
243  if (r == currRing)
244  return GetLmCurrRing();
245 
246  if (t_p == NULL && p != NULL)
248 
249  return t_p;
250 }

◆ GetLmCurrRing()

KINLINE poly sTObject::GetLmCurrRing ( )

Definition at line 220 of file kInline.h.

221 {
222  if (p == NULL && t_p != NULL)
224 
225  return p;
226 }

◆ GetLmTailRing()

KINLINE poly sTObject::GetLmTailRing ( )

Definition at line 227 of file kInline.h.

228 {
229  if (t_p == NULL)
230  {
231  if (p != NULL && tailRing != currRing)
232  {
234  return t_p;
235  }
236  return p;
237  }
238  return t_p;
239 }

◆ GetpFDeg()

KINLINE long sTObject::GetpFDeg ( ) const

Definition at line 415 of file kInline.h.

416 {
417  assume(FDeg == this->pFDeg());
418  return FDeg;
419 }

◆ GetpLength()

KINLINE int sTObject::GetpLength ( )

Definition at line 271 of file kInline.h.

272 {
273  if (pLength <= 0) pLength = ::pLength(p != NULL ? p : t_p);
274  return pLength;
275 }

◆ Init()

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

Definition at line 107 of file kInline.h.

108 {
109  memset(this, 0, sizeof(sTObject));
110  i_r = -1;
111  Set(r);
112 }

◆ IsNull()

KINLINE BOOLEAN sTObject::IsNull ( ) const

Definition at line 266 of file kInline.h.

267 {
268  return (p == NULL && t_p == NULL);
269 }

◆ LmDeleteAndIter()

KINLINE void sTObject::LmDeleteAndIter ( )

Definition at line 291 of file kInline.h.

292 {
293  assume(p != NULL || t_p != NULL);
294  if (t_p != NULL)
295  {
297  if (p != NULL)
298  {
299  p_LmFree(p, currRing);
300  p = NULL;
301  }
302  }
303  else
304  {
306  }
308 }

◆ Mult_nn()

KINLINE void sTObject::Mult_nn ( number  n)

Definition at line 312 of file kInline.h.

313 {
314  if (t_p != NULL)
315  {
316  t_p = p_Mult_nn(t_p, n, tailRing);
317  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
318  }
319  else
320  {
321  p = p_Mult_nn(p, n, currRing, tailRing);
322  }
323 }

◆ Next()

KINLINE poly sTObject::Next ( )

Definition at line 283 of file kInline.h.

284 {
285  assume(p != NULL || t_p != NULL);
286  if (t_p != NULL) return pNext(t_p);
287  return pNext(p);
288 }

◆ pCleardenom()

KINLINE void sTObject::pCleardenom ( )

Definition at line 436 of file kInline.h.

437 {
438  assume(p != NULL);
439  if (TEST_OPT_CONTENTSB)
440  {
441  number n;
442  if (t_p != NULL)
443  {
446  }
447  else
448  {
450  }
451  if (!nIsOne(n))
452  {
454  denom->n=nInvers(n);
455  denom->next=DENOMINATOR_LIST;
456  DENOMINATOR_LIST=denom;
457  }
458  nDelete(&n);
459  }
460  else
461  {
462  if (t_p != NULL)
463  {
466  }
467  else
468  {
470  }
471  }
472 }

◆ pFDeg()

KINLINE long sTObject::pFDeg ( ) const

Definition at line 400 of file kInline.h.

401 {
402  if (p != NULL) return p_FDeg(p, currRing);
403  return tailRing->pFDeg(t_p, tailRing);
404 }

◆ pLDeg()

KINLINE long sTObject::pLDeg ( )

Definition at line 420 of file kInline.h.

421 {
422  return tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
423 }

◆ pNorm()

KINLINE void sTObject::pNorm ( )

Definition at line 474 of file kInline.h.

475 {
476  assume(p != NULL);
477  if (! is_normalized)
478  {
479  p_Norm(p, currRing);
480  if (t_p != NULL)
483  }
484 }

◆ pTotalDeg()

KINLINE long sTObject::pTotalDeg ( ) const

Definition at line 405 of file kInline.h.

406 {
407  if (p != NULL) return p_Totaldegree(p, currRing);
408  return p_Totaldegree(t_p,tailRing);
409 }

◆ Set() [1/3]

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

Definition at line 139 of file kInline.h.

140 {
141  if (c_r != t_r)
142  {
143  assume(c_r == currRing && t_r == tailRing);
144  p_Test(p_in, currRing);
145  p = p_in;
146  pLength=::pLength(p_in);
147  }
148  else
149  {
150  Set(p_in, c_r);
151  }
152 }

◆ Set() [2/3]

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

Definition at line 117 of file kInline.h.

118 {
119  if (r != currRing)
120  {
121  assume(r == tailRing);
122  p_Test(p_in, r);
123  t_p = p_in;
124  }
125  else
126  {
127  p_Test(p_in, currRing);
128  p = p_in;
129  }
130  pLength=::pLength(p_in);
131 }

◆ Set() [3/3]

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

Definition at line 103 of file kInline.h.

104 {
105  tailRing = r;
106 }

◆ SetDegStuffReturnLDeg()

KINLINE long sTObject::SetDegStuffReturnLDeg ( )

Definition at line 424 of file kInline.h.

425 {
426  FDeg = this->pFDeg();
427  long d = this->pLDeg();
428  ecart = d - FDeg;
429  return d;
430 }

◆ SetLmCurrRing()

KINLINE void sTObject::SetLmCurrRing ( )

Definition at line 277 of file kInline.h.

278 {
279  if (p == NULL && t_p != NULL)
281 }

◆ SetpFDeg()

KINLINE long sTObject::SetpFDeg ( )

Definition at line 410 of file kInline.h.

411 {
412  FDeg = this->pFDeg();
413  return FDeg;
414 }

◆ ShallowCopyDelete()

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

Definition at line 359 of file kInline.h.

362 {
363  if (new_tailBin == NULL) new_tailBin = new_tailRing->PolyBin;
364  if (t_p != NULL)
365  {
366  t_p = p_shallow_copy_delete(t_p, tailRing, new_tailRing, new_tailBin);
367  if (p != NULL)
368  pNext(p) = pNext(t_p);
369  if (new_tailRing == currRing)
370  {
371  if (p == NULL) p = t_p;
372  else p_LmFree(t_p, tailRing);
373  t_p = NULL;
374  }
375  }
376  else if (p != NULL) /* && t_p==NULL */
377  {
378  if (pNext(p) != NULL)
379  {
380  pNext(p) = p_shallow_copy_delete(pNext(p),
381  tailRing, new_tailRing, new_tailBin);
382  }
383  if (new_tailRing != currRing)
384  {
385  t_p = k_LmInit_currRing_2_tailRing(p, new_tailRing);
386  pNext(t_p) = pNext(p);
387  }
388  }
389  if (max_exp != NULL)
390  {
391  max_exp = p_shallow_copy_delete(max_exp,tailRing,new_tailRing,new_tailBin);
392  }
393  else if (set_max && pNext(t_p) != NULL)
394  {
395  max_exp = p_GetMaxExpP(pNext(t_p), new_tailRing);
396  }
397  tailRing = new_tailRing;
398 }

Field Documentation

◆ ecart

int sTObject::ecart

Definition at line 74 of file kutil.h.

◆ FDeg

long sTObject::FDeg

Definition at line 73 of file kutil.h.

◆ i_r

int sTObject::i_r

Definition at line 77 of file kutil.h.

◆ is_normalized

char sTObject::is_normalized

Definition at line 78 of file kutil.h.

◆ is_redundant

char sTObject::is_redundant

Definition at line 84 of file kutil.h.

◆ is_sigsafe

char sTObject::is_sigsafe

Definition at line 89 of file kutil.h.

◆ is_special

char sTObject::is_special

Definition at line 93 of file kutil.h.

◆ length

int sTObject::length

Definition at line 75 of file kutil.h.

◆ max_exp

poly sTObject::max_exp

Definition at line 71 of file kutil.h.

◆ p

poly sTObject::p

Definition at line 69 of file kutil.h.

◆ pLength

int sTObject::pLength

Definition at line 76 of file kutil.h.

◆ sevSig

unsigned long sTObject::sevSig

Definition at line 67 of file kutil.h.

◆ sig

poly sTObject::sig

Definition at line 68 of file kutil.h.

◆ t_p

poly sTObject::t_p

Definition at line 70 of file kutil.h.

◆ tailRing

ring sTObject::tailRing

Definition at line 72 of file kutil.h.


The documentation for this class was generated from the following files:
FALSE
#define FALSE
Definition: auxiliary.h:94
sTObject::is_normalized
char is_normalized
Definition: kutil.h:78
sTObject::pLDeg
KINLINE long pLDeg()
Definition: kInline.h:420
k_LmInit_tailRing_2_currRing
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
Definition: kInline.h:881
p_LmDeleteAndNext
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:726
sTObject::pFDeg
KINLINE long pFDeg() const
Definition: kInline.h:400
sTObject::FDeg
long FDeg
Definition: kutil.h:73
sTObject::length
int length
Definition: kutil.h:75
p_LmInit
static poly p_LmInit(poly p, const ring r)
Definition: p_polys.h:1272
sTObject
Definition: kutil.h:64
TEST_OPT_CONTENTSB
#define TEST_OPT_CONTENTSB
Definition: options.h:125
p_Test
#define p_Test(p, r)
Definition: p_polys.h:164
sTObject::Set
KINLINE void Set(ring r=currRing)
Definition: kInline.h:103
k_LmInit_currRing_2_tailRing
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
Definition: kInline.h:872
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:813
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
sTObject::t_p
poly t_p
Definition: kutil.h:70
denominator_list
denominator_list_s * denominator_list
Definition: kutil.h:59
TRUE
#define TRUE
Definition: auxiliary.h:98
nIsOne
#define nIsOne(n)
Definition: numbers.h:26
T
static jList * T
Definition: janet.cc:31
denominator_list_s
Definition: kutil.h:61
sTObject::max_exp
poly max_exp
Definition: kutil.h:71
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:210
p_ProjectiveUnique
void p_ProjectiveUnique(poly ph, const ring r)
Definition: p_polys.cc:3080
p_GetMaxExpP
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:1130
sTObject::pLength
int pLength
Definition: kutil.h:76
sTObject::i_r
int i_r
Definition: kutil.h:77
sTObject::GetLmCurrRing
KINLINE poly GetLmCurrRing()
Definition: kInline.h:220
DENOMINATOR_LIST
denominator_list DENOMINATOR_LIST
Definition: kutil.cc:87
p_LmFree
static void p_LmFree(poly p, ring)
Definition: p_polys.h:684
p_Delete
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:858
sTObject::ecart
int ecart
Definition: kutil.h:74
nInvers
#define nInvers(a)
Definition: numbers.h:34
sTObject::GetLmTailRing
KINLINE poly GetLmTailRing()
Definition: kInline.h:227
pSetCoeff0
#define pSetCoeff0(p, n)
Definition: monomials.h:60
assume
#define assume(x)
Definition: mod2.h:390
NULL
#define NULL
Definition: omList.c:10
nDelete
#define nDelete(n)
Definition: numbers.h:17
sTObject::p
poly p
Definition: kutil.h:69
denominator_list_s::next
denominator_list next
Definition: kutil.h:61
p_Totaldegree
static long p_Totaldegree(poly p, const ring r)
Definition: p_polys.h:1444
p_Norm
void p_Norm(poly p1, const ring r)
Definition: p_polys.cc:3670
sTObject::tailRing
ring tailRing
Definition: kutil.h:72
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:45
copy
CFArray copy(const CFList &list)
write elements of list into an array
Definition: facFqBivarUtil.cc:364
denominator_list_s::n
number n
Definition: kutil.h:61
p_FDeg
static long p_FDeg(const poly p, const ring r)
Definition: p_polys.h:381
pNext
#define pNext(p)
Definition: monomials.h:37
p_Mult_nn
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:915
p_Cleardenom_n
void p_Cleardenom_n(poly ph, const ring r, number &c)
Definition: p_polys.cc:2891
sTObject::Init
KINLINE void Init(ring r=currRing)
Definition: kInline.h:107