My Project  debian-1:4.1.1-p2+ds-4build3
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 408 of file kInline.h.

409 {
410  assume(FDeg == this->pFDeg());
411  return FDeg;
412 }

◆ 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 429 of file kInline.h.

430 {
431  assume(p != NULL);
432  if (TEST_OPT_CONTENTSB)
433  {
434  number n;
435  if (t_p != NULL)
436  {
439  }
440  else
441  {
443  }
444  if (!nIsOne(n))
445  {
447  denom->n=nInvers(n);
448  denom->next=DENOMINATOR_LIST;
449  DENOMINATOR_LIST=denom;
450  }
451  nDelete(&n);
452  }
453  else
454  {
455  if (t_p != NULL)
456  {
459  }
460  else
461  {
463  }
464  }
465 }

◆ pFDeg()

KINLINE long sTObject::pFDeg ( ) const

Definition at line 393 of file kInline.h.

394 {
395  if (p != NULL) return p_FDeg(p, currRing);
396  return tailRing->pFDeg(t_p, tailRing);
397 }

◆ pLDeg()

KINLINE long sTObject::pLDeg ( )

Definition at line 413 of file kInline.h.

414 {
415  return tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
416 }

◆ pNorm()

KINLINE void sTObject::pNorm ( )

Definition at line 467 of file kInline.h.

468 {
469  assume(p != NULL);
470  if (! is_normalized)
471  {
472  p_Norm(p, currRing);
473  if (t_p != NULL)
476  }
477 }

◆ pTotalDeg()

KINLINE long sTObject::pTotalDeg ( ) const

Definition at line 398 of file kInline.h.

399 {
400  if (p != NULL) return p_Totaldegree(p, currRing);
401  return p_Totaldegree(t_p,tailRing);
402 }

◆ 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 417 of file kInline.h.

418 {
419  FDeg = this->pFDeg();
420  long d = this->pLDeg();
421  ecart = d - FDeg;
422  return d;
423 }

◆ 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 403 of file kInline.h.

404 {
405  FDeg = this->pFDeg();
406  return FDeg;
407 }

◆ ShallowCopyDelete()

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

Definition at line 352 of file kInline.h.

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

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:413
k_LmInit_tailRing_2_currRing
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
Definition: kInline.h:889
p_LmDeleteAndNext
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:725
sTObject::pFDeg
KINLINE long pFDeg() const
Definition: kInline.h:393
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:1281
sTObject
Definition: kutil.h:65
TEST_OPT_CONTENTSB
#define TEST_OPT_CONTENTSB
Definition: options.h:125
p_Test
#define p_Test(p, r)
Definition: p_polys.h:163
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:880
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:812
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:683
p_Delete
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:857
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:66
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:1453
p_Norm
void p_Norm(poly p1, const ring r)
Definition: p_polys.cc:3656
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:51
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:380
pNext
#define pNext(p)
Definition: monomials.h:43
p_Mult_nn
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:914
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