My Project  debian-1:4.1.2-p1+ds-2
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
 
int shift
 
char is_normalized
 
char is_redundant
 
char is_sigsafe
 
char is_special
 

Detailed Description

Definition at line 63 of file kutil.h.

Constructor & Destructor Documentation

◆ sTObject() [1/4]

KINLINE sTObject::sTObject ( ring  tailRing = currRing)

Definition at line 115 of file kInline.h.

117 {
118  Init(r);

◆ sTObject() [2/4]

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

Definition at line 155 of file kInline.h.

157 {
158  Init(r);
159  Set(p_in, r);

◆ sTObject() [3/4]

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

Definition at line 186 of file kInline.h.

188 {
189  Init(t_r);
190  Set(p_in, c_r, t_r);

◆ sTObject() [4/4]

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

Definition at line 192 of file kInline.h.

194 {
195  *this = *T;
196  if (copy)
197  {
198  if (t_p != NULL)
199  {
200  t_p = p_Copy(t_p, tailRing);
202  }
203  else
204  {
205  p = p_Copy(p, currRing);
206  }
207  }

Member Function Documentation

◆ Clear()

KINLINE void sTObject::Clear ( )

Definition at line 223 of file kInline.h.

225 {
226  p = NULL;
227  t_p = NULL;
228  ecart = 0;
229  length = 0;
230  pLength = 0;
231  FDeg = 0;

◆ Copy()

KINLINE void sTObject::Copy ( )

Definition at line 234 of file kInline.h.

236 {
237  if (t_p != NULL)
238  {
239  t_p = p_Copy(t_p, tailRing);
240  if (p != NULL) /* and t_p!=NULL*/
241  {
242  p = p_LmInit(p, currRing);
244  pNext(p) = pNext(t_p);
245  }
246  }
247  else
248  {
249  p = p_Copy(p, currRing);
250  }

◆ Delete()

KINLINE void sTObject::Delete ( )

Definition at line 209 of file kInline.h.

211 {
212  if (t_p != NULL)
213  {
214  p_Delete(&t_p, tailRing);
215  if (p != NULL)
216  p_LmFree(p, currRing);
217  }
218  else
219  {
220  p_Delete(&p, currRing);
221  }

◆ GetLm() [1/2]

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

Definition at line 284 of file kInline.h.

286 {
287  if (t_p != NULL)
288  {
289  p_r = t_p;
290  r_r = tailRing;
291  }
292  else
293  {
294  p_r = p;
295  r_r = currRing;
296  }

◆ GetLm() [2/2]

KINLINE poly sTObject::GetLm ( ring  r)

Definition at line 272 of file kInline.h.

274 {
275  assume(r == tailRing || r == currRing);
276  if (r == currRing)
277  return GetLmCurrRing();
278 
279  if (t_p == NULL && p != NULL)
281 
282  return t_p;

◆ GetLmCurrRing()

KINLINE poly sTObject::GetLmCurrRing ( )

Definition at line 252 of file kInline.h.

254 {
255  if (p == NULL && t_p != NULL)
257 
258  return p;

◆ GetLmTailRing()

KINLINE poly sTObject::GetLmTailRing ( )

Definition at line 259 of file kInline.h.

261 {
262  if (t_p == NULL)
263  {
264  if (p != NULL && tailRing != currRing)
265  {
267  return t_p;
268  }
269  return p;
270  }
271  return t_p;

◆ GetpFDeg()

KINLINE long sTObject::GetpFDeg ( ) const

Definition at line 447 of file kInline.h.

449 {
450  assume(FDeg == this->pFDeg());
451  return FDeg;

◆ GetpLength()

KINLINE int sTObject::GetpLength ( )

Definition at line 303 of file kInline.h.

305 {
306  if (pLength <= 0) pLength = ::pLength(p != NULL ? p : t_p);
307  return pLength;

◆ Init()

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

Definition at line 109 of file kInline.h.

111 {
112  memset(this, 0, sizeof(sTObject));
113  i_r = -1;
114  Set(r);

◆ IsNull()

KINLINE BOOLEAN sTObject::IsNull ( ) const

Definition at line 298 of file kInline.h.

300 {
301  return (p == NULL && t_p == NULL);

◆ LmDeleteAndIter()

KINLINE void sTObject::LmDeleteAndIter ( )

Definition at line 323 of file kInline.h.

325 {
326  assume(p != NULL || t_p != NULL);
327  if (t_p != NULL)
328  {
330  if (p != NULL)
331  {
332  p_LmFree(p, currRing);
333  p = NULL;
334  }
335  }
336  else
337  {
339  }

◆ Mult_nn()

KINLINE void sTObject::Mult_nn ( number  n)

Definition at line 344 of file kInline.h.

346 {
347  if (t_p != NULL)
348  {
349  t_p = p_Mult_nn(t_p, n, tailRing);
350  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
351  }
352  else
353  {
354  p = p_Mult_nn(p, n, currRing, tailRing);
355  }

◆ Next()

KINLINE poly sTObject::Next ( )

Definition at line 315 of file kInline.h.

317 {
318  assume(p != NULL || t_p != NULL);
319  if (t_p != NULL) return pNext(t_p);
320  return pNext(p);

◆ pCleardenom()

KINLINE void sTObject::pCleardenom ( )

Definition at line 468 of file kInline.h.

470 {
471  assume(p != NULL);
472  if (TEST_OPT_CONTENTSB)
473  {
474  number n;
475  if (t_p != NULL)
476  {
479  }
480  else
481  {
483  }
484  if (!nIsOne(n))
485  {
487  denom->n=nInvers(n);
488  denom->next=DENOMINATOR_LIST;
489  DENOMINATOR_LIST=denom;
490  }
491  nDelete(&n);
492  }
493  else
494  {
495  if (t_p != NULL)
496  {
499  }
500  else
501  {
503  }
504  }

◆ pFDeg()

KINLINE long sTObject::pFDeg ( ) const

Definition at line 432 of file kInline.h.

434 {
435  if (p != NULL) return p_FDeg(p, currRing);
436  return tailRing->pFDeg(t_p, tailRing);

◆ pLDeg()

KINLINE long sTObject::pLDeg ( )

Definition at line 452 of file kInline.h.

454 {
455  return tailRing->pLDeg(GetLmTailRing(), &length, tailRing);

◆ pNorm()

KINLINE void sTObject::pNorm ( )

Definition at line 506 of file kInline.h.

508 {
509  assume(p != NULL);
510  if (! is_normalized)
511  {
512  p_Norm(p, currRing);
513  if (t_p != NULL)
516  }

◆ pTotalDeg()

KINLINE long sTObject::pTotalDeg ( ) const

Definition at line 437 of file kInline.h.

439 {
440  if (p != NULL) return p_Totaldegree(p, currRing);
441  return p_Totaldegree(t_p,tailRing);

◆ Set() [1/3]

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

Definition at line 161 of file kInline.h.

163 {
164  if (c_r != t_r)
165  {
166  assume(c_r == currRing && t_r == tailRing);
167 #ifdef HAVE_SHIFTBBA
168  if (c_r->isLPring)
169  {
170  shift = si_max(p_mFirstVblock(p_in, c_r) - 1, 0);
171  if (!shift) p_Test(p_in, currRing);
172  }
173  else
174 #endif
175  {
176  p_Test(p_in, currRing);
177  }
178  p = p_in;
179  pLength=::pLength(p_in);
180  }
181  else
182  {
183  Set(p_in, c_r);
184  }

◆ Set() [2/3]

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

Definition at line 119 of file kInline.h.

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

◆ Set() [3/3]

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

Definition at line 105 of file kInline.h.

107 {
108  tailRing = r;

◆ SetDegStuffReturnLDeg()

KINLINE long sTObject::SetDegStuffReturnLDeg ( )

Definition at line 456 of file kInline.h.

458 {
459  FDeg = this->pFDeg();
460  long d = this->pLDeg();
461  ecart = d - FDeg;
462  return d;

◆ SetLmCurrRing()

KINLINE void sTObject::SetLmCurrRing ( )

Definition at line 309 of file kInline.h.

311 {
312  if (p == NULL && t_p != NULL)

◆ SetpFDeg()

KINLINE long sTObject::SetpFDeg ( )

Definition at line 442 of file kInline.h.

444 {
445  FDeg = this->pFDeg();
446  return FDeg;

◆ ShallowCopyDelete()

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

Definition at line 391 of file kInline.h.

395 {
396  if (new_tailBin == NULL) new_tailBin = new_tailRing->PolyBin;
397  if (t_p != NULL)
398  {
399  t_p = p_shallow_copy_delete(t_p, tailRing, new_tailRing, new_tailBin);
400  if (p != NULL)
401  pNext(p) = pNext(t_p);
402  if (new_tailRing == currRing)
403  {
404  if (p == NULL) p = t_p;
405  else p_LmFree(t_p, tailRing);
406  t_p = NULL;
407  }
408  }
409  else if (p != NULL) /* && t_p==NULL */
410  {
411  if (pNext(p) != NULL)
412  {
413  pNext(p) = p_shallow_copy_delete(pNext(p),
414  tailRing, new_tailRing, new_tailBin);
415  }
416  if (new_tailRing != currRing)
417  {
418  t_p = k_LmInit_currRing_2_tailRing(p, new_tailRing);
419  pNext(t_p) = pNext(p);
420  }
421  }
422  if (max_exp != NULL)
423  {
424  max_exp = p_shallow_copy_delete(max_exp,tailRing,new_tailRing,new_tailBin);
425  }
426  else if (set_max && pNext(t_p) != NULL)
427  {
428  max_exp = p_GetMaxExpP(pNext(t_p), new_tailRing);
429  }
430  tailRing = new_tailRing;

Field Documentation

◆ ecart

int sTObject::ecart

Definition at line 73 of file kutil.h.

◆ FDeg

long sTObject::FDeg

Definition at line 72 of file kutil.h.

◆ i_r

int sTObject::i_r

Definition at line 73 of file kutil.h.

◆ is_normalized

char sTObject::is_normalized

Definition at line 82 of file kutil.h.

◆ is_redundant

char sTObject::is_redundant

Definition at line 88 of file kutil.h.

◆ is_sigsafe

char sTObject::is_sigsafe

Definition at line 93 of file kutil.h.

◆ is_special

char sTObject::is_special

Definition at line 97 of file kutil.h.

◆ length

int sTObject::length

Definition at line 73 of file kutil.h.

◆ max_exp

poly sTObject::max_exp

Definition at line 70 of file kutil.h.

◆ p

poly sTObject::p

Definition at line 68 of file kutil.h.

◆ pLength

int sTObject::pLength

Definition at line 73 of file kutil.h.

◆ sevSig

unsigned long sTObject::sevSig

Definition at line 66 of file kutil.h.

◆ shift

int sTObject::shift

Definition at line 79 of file kutil.h.

◆ sig

poly sTObject::sig

Definition at line 67 of file kutil.h.

◆ t_p

poly sTObject::t_p

Definition at line 69 of file kutil.h.

◆ tailRing

ring sTObject::tailRing

Definition at line 71 of file kutil.h.


The documentation for this class was generated from the following files:
FALSE
#define FALSE
Definition: auxiliary.h:96
sTObject::is_normalized
char is_normalized
Definition: kutil.h:82
sTObject::pLDeg
KINLINE long pLDeg()
Definition: kInline.h:452
k_LmInit_tailRing_2_currRing
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
Definition: kInline.h:911
p_LmDeleteAndNext
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:711
sTObject::pFDeg
KINLINE long pFDeg() const
Definition: kInline.h:432
sTObject::FDeg
long FDeg
Definition: kutil.h:72
sTObject::length
int length
Definition: kutil.h:73
p_LmInit
static poly p_LmInit(poly p, const ring r)
Definition: p_polys.h:1257
sTObject
Definition: kutil.h:63
TEST_OPT_CONTENTSB
#define TEST_OPT_CONTENTSB
Definition: options.h:123
p_Test
#define p_Test(p, r)
Definition: p_polys.h:154
sTObject::Set
KINLINE void Set(ring r=currRing)
Definition: kInline.h:105
k_LmInit_currRing_2_tailRing
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
Definition: kInline.h:902
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:796
sTObject::t_p
poly t_p
Definition: kutil.h:69
denominator_list
denominator_list_s * denominator_list
Definition: kutil.h:58
TRUE
#define TRUE
Definition: auxiliary.h:100
nIsOne
#define nIsOne(n)
Definition: numbers.h:24
DENOMINATOR_LIST
VAR denominator_list DENOMINATOR_LIST
Definition: kutil.cc:87
denominator_list_s
Definition: kutil.h:60
sTObject::max_exp
poly max_exp
Definition: kutil.h:70
omAlloc
#define omAlloc(size)
Definition: omAllocDecl.h:208
p_ProjectiveUnique
void p_ProjectiveUnique(poly ph, const ring r)
Definition: p_polys.cc:3086
T
STATIC_VAR jList * T
Definition: janet.cc:30
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:1126
sTObject::pLength
int pLength
Definition: kutil.h:73
sTObject::i_r
int i_r
Definition: kutil.h:73
sTObject::GetLmCurrRing
KINLINE poly GetLmCurrRing()
Definition: kInline.h:252
p_LmFree
static void p_LmFree(poly p, ring)
Definition: p_polys.h:669
p_Delete
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:845
sTObject::shift
int shift
Definition: kutil.h:79
si_max
static int si_max(const int a, const int b)
Definition: auxiliary.h:140
sTObject::ecart
int ecart
Definition: kutil.h:73
p_mFirstVblock
int p_mFirstVblock(poly p, const ring ri)
Definition: shiftop.cc:473
nInvers
#define nInvers(a)
Definition: numbers.h:32
sTObject::GetLmTailRing
KINLINE poly GetLmTailRing()
Definition: kInline.h:259
pSetCoeff0
#define pSetCoeff0(p, n)
Definition: monomials.h:56
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:11
nDelete
#define nDelete(n)
Definition: numbers.h:15
sTObject::p
poly p
Definition: kutil.h:68
denominator_list_s::next
denominator_list next
Definition: kutil.h:60
p_Totaldegree
static long p_Totaldegree(poly p, const ring r)
Definition: p_polys.h:1428
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
p_Norm
void p_Norm(poly p1, const ring r)
Definition: p_polys.cc:3676
sTObject::tailRing
ring tailRing
Definition: kutil.h:71
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:41
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:60
p_FDeg
static long p_FDeg(const poly p, const ring r)
Definition: p_polys.h:368
pNext
#define pNext(p)
Definition: monomials.h:33
p_Mult_nn
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:902
p_Cleardenom_n
void p_Cleardenom_n(poly ph, const ring r, number &c)
Definition: p_polys.cc:2897
sTObject::Init
KINLINE void Init(ring r=currRing)
Definition: kInline.h:109