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
 
ring tailRing
 
long FDeg
 
int ecart
 
int length
 
int pLength
 
int i_r
 
BOOLEAN is_normalized
 
BOOLEAN is_redundant
 
BOOLEAN is_sigsafe
 
BOOLEAN is_special
 

Detailed Description

Definition at line 70 of file kutil.h.

Constructor & Destructor Documentation

KINLINE sTObject::sTObject ( ring  tailRing = currRing)

Definition at line 113 of file kInline.h.

114 {
115  Init(r);
116 }
KINLINE void Init(ring r=currRing)
Definition: kInline.h:107
const ring r
Definition: syzextra.cc:208
KINLINE sTObject::sTObject ( poly  p,
ring  tailRing = currRing 
)

Definition at line 132 of file kInline.h.

133 {
134  Init(r);
135  Set(p_in, r);
136 }
KINLINE void Set(ring r=currRing)
Definition: kInline.h:103
KINLINE void Init(ring r=currRing)
Definition: kInline.h:107
const ring r
Definition: syzextra.cc:208
KINLINE sTObject::sTObject ( poly  p,
ring  c_r,
ring  tailRing 
)

Definition at line 152 of file kInline.h.

153 {
154  Init(t_r);
155  Set(p_in, c_r, t_r);
156 }
KINLINE void Set(ring r=currRing)
Definition: kInline.h:103
KINLINE void Init(ring r=currRing)
Definition: kInline.h:107
KINLINE sTObject::sTObject ( sTObject T,
int  copy 
)

Definition at line 158 of file kInline.h.

159 {
160  *this = *T;
161  if (copy)
162  {
163  if (t_p != NULL)
164  {
165  t_p = p_Copy(t_p, tailRing);
167  }
168  else
169  {
170  p = p_Copy(p, currRing, tailRing);
171  }
172  }
173 }
CFArray copy(const CFList &list)
write elements of list into an array
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
Definition: kInline.h:914
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define NULL
Definition: omList.c:10
static jList * T
Definition: janet.cc:37
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75

Member Function Documentation

KINLINE void sTObject::Clear ( )

Definition at line 189 of file kInline.h.

190 {
191  p = NULL;
192  t_p = NULL;
193  ecart = 0;
194  length = 0;
195  pLength = 0;
196  FDeg = 0;
198 }
BOOLEAN is_normalized
Definition: kutil.h:84
#define FALSE
Definition: auxiliary.h:140
int length
Definition: kutil.h:80
poly t_p
Definition: kutil.h:76
long FDeg
Definition: kutil.h:79
int pLength
Definition: kutil.h:80
#define NULL
Definition: omList.c:10
int ecart
Definition: kutil.h:80
poly p
Definition: kutil.h:75
KINLINE void sTObject::Copy ( )

Definition at line 200 of file kInline.h.

201 {
202  if (t_p != NULL)
203  {
204  t_p = p_Copy(t_p, tailRing);
205  if (p != NULL)
206  {
207  p = p_Head(p, currRing);
208  if (pNext(t_p) != NULL) pNext(p) = pNext(t_p);
209  }
210  }
211  else
212  {
213  p = p_Copy(p, currRing, tailRing);
214  }
215 }
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
static poly p_Head(poly p, const ring r)
Definition: p_polys.h:819
#define NULL
Definition: omList.c:10
#define pNext(p)
Definition: monomials.h:43
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE void sTObject::Delete ( )

Definition at line 175 of file kInline.h.

176 {
177  if (t_p != NULL)
178  {
179  p_Delete(&t_p, tailRing);
180  if (p != NULL)
181  p_LmFree(p, currRing);
182  }
183  else
184  {
186  }
187 }
static void p_LmFree(poly p, ring)
Definition: p_polys.h:679
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE poly sTObject::GetLm ( ring  r)

Definition at line 237 of file kInline.h.

238 {
239  assume(r == tailRing || r == currRing);
240  if (r == currRing)
241  return GetLmCurrRing();
242 
243  if (t_p == NULL && p != NULL)
245 
246  return t_p;
247 }
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
const ring r
Definition: syzextra.cc:208
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
Definition: kInline.h:905
#define assume(x)
Definition: mod2.h:405
KINLINE poly GetLmCurrRing()
Definition: kInline.h:217
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE void sTObject::GetLm ( poly p,
ring &  r 
) const

Definition at line 249 of file kInline.h.

250 {
251  if (t_p != NULL)
252  {
253  p_r = t_p;
254  r_r = tailRing;
255  }
256  else
257  {
258  p_r = p;
259  r_r = currRing;
260  }
261 }
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE poly sTObject::GetLmCurrRing ( )

Definition at line 217 of file kInline.h.

218 {
219  if (p == NULL && t_p != NULL)
221 
222  return p;
223 }
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
Definition: kInline.h:914
poly t_p
Definition: kutil.h:76
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE poly sTObject::GetLmTailRing ( )

Definition at line 224 of file kInline.h.

225 {
226  if (t_p == NULL)
227  {
228  if (p != NULL && tailRing != currRing)
229  {
231  return t_p;
232  }
233  return p;
234  }
235  return t_p;
236 }
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
Definition: kInline.h:905
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE long sTObject::GetpFDeg ( ) const

Definition at line 410 of file kInline.h.

411 {
412  assume(FDeg == this->pFDeg());
413  return FDeg;
414 }
long FDeg
Definition: kutil.h:79
#define assume(x)
Definition: mod2.h:405
KINLINE long pFDeg() const
Definition: kInline.h:395
KINLINE int sTObject::GetpLength ( )

Definition at line 268 of file kInline.h.

269 {
270  if (pLength <= 0) pLength = ::pLength(p != NULL ? p : t_p);
271  return pLength;
272 }
poly t_p
Definition: kutil.h:76
int pLength
Definition: kutil.h:80
#define NULL
Definition: omList.c:10
poly p
Definition: kutil.h:75
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 }
KINLINE void Set(ring r=currRing)
Definition: kInline.h:103
int i_r
Definition: kutil.h:80
const ring r
Definition: syzextra.cc:208
Definition: kutil.h:70
KINLINE BOOLEAN sTObject::IsNull ( ) const

Definition at line 263 of file kInline.h.

264 {
265  return (p == NULL && t_p == NULL);
266 }
poly t_p
Definition: kutil.h:76
#define NULL
Definition: omList.c:10
poly p
Definition: kutil.h:75
KINLINE void sTObject::LmDeleteAndIter ( )

Definition at line 288 of file kInline.h.

289 {
290  assume(p != NULL || t_p != NULL);
291  if (t_p != NULL)
292  {
294  if (p != NULL)
295  {
296  p_LmFree(p, currRing);
297  p = NULL;
298  }
299  }
300  else
301  {
303  }
305 }
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:721
BOOLEAN is_normalized
Definition: kutil.h:84
#define FALSE
Definition: auxiliary.h:140
static void p_LmFree(poly p, ring)
Definition: p_polys.h:679
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define assume(x)
Definition: mod2.h:405
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE void sTObject::Mult_nn ( number  n)

Definition at line 309 of file kInline.h.

310 {
311  if (t_p != NULL)
312  { t_p = p_Mult_nn(t_p, n, tailRing);
313  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
314  }
315  else
316  {
317  p = p_Mult_nn(p, n, currRing, tailRing);
318  }
319 }
const CanonicalForm CFMap CFMap int &both_non_zero int n
Definition: cfEzgcd.cc:52
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
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:902
#define NULL
Definition: omList.c:10
#define pSetCoeff0(p, n)
Definition: monomials.h:67
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE poly sTObject::Next ( )

Definition at line 280 of file kInline.h.

281 {
282  assume(p != NULL || t_p != NULL);
283  if (t_p != NULL) return pNext(t_p);
284  return pNext(p);
285 }
poly t_p
Definition: kutil.h:76
#define assume(x)
Definition: mod2.h:405
#define NULL
Definition: omList.c:10
#define pNext(p)
Definition: monomials.h:43
poly p
Definition: kutil.h:75
KINLINE void sTObject::pCleardenom ( )

Definition at line 431 of file kInline.h.

432 {
433  assume(p != NULL);
434  if (TEST_OPT_CONTENTSB)
435  {
436  number n;
437  if (t_p != NULL)
438  {
441  }
442  else
443  {
445  }
446  if (!nIsOne(n))
447  {
449  denom->n=nInvers(n);
450  denom->next=DENOMINATOR_LIST;
451  DENOMINATOR_LIST=denom;
452  }
453  nDelete(&n);
454  }
455  else
456  {
457  if (t_p != NULL)
458  {
461  }
462  else
463  {
464 #ifdef HAVE_RATGRING
466 #else
468 #endif
469  }
470  }
471 }
denominator_list_s * denominator_list
Definition: kutil.h:65
#define TEST_OPT_CONTENTSB
Definition: options.h:121
const CanonicalForm CFMap CFMap int &both_non_zero int n
Definition: cfEzgcd.cc:52
#define nIsOne(n)
Definition: numbers.h:25
denominator_list DENOMINATOR_LIST
Definition: kutil.cc:81
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
#define omAlloc(size)
Definition: omAllocDecl.h:210
poly t_p
Definition: kutil.h:76
void p_Cleardenom_n(poly ph, const ring r, number &c)
Definition: p_polys.cc:2826
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define assume(x)
Definition: mod2.h:405
#define nDelete(n)
Definition: numbers.h:16
#define nInvers(a)
Definition: numbers.h:33
#define NULL
Definition: omList.c:10
denominator_list next
Definition: kutil.h:67
#define pSetCoeff0(p, n)
Definition: monomials.h:67
void p_ProjectiveUnique(poly ph, const ring r)
Definition: p_polys.cc:3008
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE long sTObject::pFDeg ( ) const

Definition at line 395 of file kInline.h.

396 {
397  if (p != NULL) return p_FDeg(p, currRing);
398  return tailRing->pFDeg(t_p, tailRing);
399 }
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
static long p_FDeg(const poly p, const ring r)
Definition: p_polys.h:369
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE long sTObject::pLDeg ( )

Definition at line 415 of file kInline.h.

416 {
417  return tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
418 }
int length
Definition: kutil.h:80
KINLINE poly GetLmTailRing()
Definition: kInline.h:224
ring tailRing
Definition: kutil.h:78
KINLINE void sTObject::pNorm ( )

Definition at line 473 of file kInline.h.

474 {
475  assume(p != NULL);
476  if (! is_normalized)
477  {
478  p_Norm(p, currRing);
479  if (t_p != NULL)
482  }
483 }
BOOLEAN is_normalized
Definition: kutil.h:84
#define TRUE
Definition: auxiliary.h:144
void p_Norm(poly p1, const ring r)
Definition: p_polys.cc:3565
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
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define assume(x)
Definition: mod2.h:405
#define NULL
Definition: omList.c:10
#define pSetCoeff0(p, n)
Definition: monomials.h:67
poly p
Definition: kutil.h:75
KINLINE long sTObject::pTotalDeg ( ) const

Definition at line 400 of file kInline.h.

401 {
402  if (p != NULL) return p_Totaldegree(p, currRing);
403  return p_Totaldegree(t_p,tailRing);
404 }
static long p_Totaldegree(poly p, const ring r)
Definition: p_polys.h:1435
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE void sTObject::Set ( ring  r = currRing)

Definition at line 103 of file kInline.h.

104 {
105  tailRing = r;
106 }
const ring r
Definition: syzextra.cc:208
ring tailRing
Definition: kutil.h:78
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  pp_Test(p_in, currRing, tailRing);
128  p = p_in;
129  }
130 }
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
const ring r
Definition: syzextra.cc:208
#define assume(x)
Definition: mod2.h:405
#define pp_Test(p, lmRing, tailRing)
Definition: p_polys.h:162
#define p_Test(p, r)
Definition: p_polys.h:160
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE void sTObject::Set ( poly  p_in,
ring  c_r,
ring  t_r 
)

Definition at line 138 of file kInline.h.

139 {
140  if (c_r != t_r)
141  {
142  assume(c_r == currRing && t_r == tailRing);
143  pp_Test(p_in, currRing, t_r);
144  p = p_in;
145  }
146  else
147  {
148  Set(p_in, c_r);
149  }
150 }
KINLINE void Set(ring r=currRing)
Definition: kInline.h:103
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define assume(x)
Definition: mod2.h:405
#define pp_Test(p, lmRing, tailRing)
Definition: p_polys.h:162
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE long sTObject::SetDegStuffReturnLDeg ( )

Definition at line 419 of file kInline.h.

420 {
421  FDeg = this->pFDeg();
422  long d = this->pLDeg();
423  ecart = d - FDeg;
424  return d;
425 }
long FDeg
Definition: kutil.h:79
KINLINE long pLDeg()
Definition: kInline.h:415
KINLINE long pFDeg() const
Definition: kInline.h:395
int ecart
Definition: kutil.h:80
KINLINE void sTObject::SetLmCurrRing ( )

Definition at line 274 of file kInline.h.

275 {
276  if (p == NULL && t_p != NULL)
278 }
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
Definition: kInline.h:914
poly t_p
Definition: kutil.h:76
#define NULL
Definition: omList.c:10
ring tailRing
Definition: kutil.h:78
poly p
Definition: kutil.h:75
KINLINE long sTObject::SetpFDeg ( )

Definition at line 405 of file kInline.h.

406 {
407  FDeg = this->pFDeg();
408  return FDeg;
409 }
long FDeg
Definition: kutil.h:79
KINLINE long pFDeg() const
Definition: kInline.h:395
KINLINE void sTObject::ShallowCopyDelete ( ring  new_tailRing,
omBin  new_tailBin,
pShallowCopyDeleteProc  p_shallow_copy_delete,
BOOLEAN  set_max = TRUE 
)

Definition at line 348 of file kInline.h.

351 {
352  if (new_tailBin == NULL) new_tailBin = new_tailRing->PolyBin;
353  if (t_p != NULL)
354  {
355  t_p = p_shallow_copy_delete(t_p, tailRing, new_tailRing, new_tailBin);
356  if (p != NULL)
357  pNext(p) = pNext(t_p);
358  if (new_tailRing == currRing)
359  {
360  if (p == NULL) p = t_p;
361  else p_LmFree(t_p, tailRing);
362  t_p = NULL;
363  }
364  }
365  else if (p != NULL)
366  {
367  if (pNext(p) != NULL)
368  {
369  pNext(p) = p_shallow_copy_delete(pNext(p),
370  tailRing, new_tailRing, new_tailBin);
371  }
372  if (new_tailRing != currRing)
373  {
374  t_p = k_LmInit_currRing_2_tailRing(p, new_tailRing);
375  pNext(t_p) = pNext(p);
376  }
377  }
378  if (max != NULL)
379  {
380  if (new_tailRing == currRing)
381  {
383  max = NULL;
384  }
385  else
386  max = p_shallow_copy_delete(max,tailRing,new_tailRing,new_tailBin);
387  }
388  else if (set_max && new_tailRing != currRing && pNext(t_p) != NULL)
389  {
390  max = p_GetMaxExpP(pNext(t_p), new_tailRing);
391  }
392  tailRing = new_tailRing;
393 }
static void p_LmFree(poly p, ring)
Definition: p_polys.h:679
poly t_p
Definition: kutil.h:76
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
poly max
Definition: kutil.h:77
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
Definition: kInline.h:905
#define NULL
Definition: omList.c:10
#define pNext(p)
Definition: monomials.h:43
ring tailRing
Definition: kutil.h:78
poly p
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:1137

Field Documentation

int sTObject::ecart

Definition at line 80 of file kutil.h.

long sTObject::FDeg

Definition at line 79 of file kutil.h.

int sTObject::i_r

Definition at line 80 of file kutil.h.

BOOLEAN sTObject::is_normalized

Definition at line 84 of file kutil.h.

BOOLEAN sTObject::is_redundant

Definition at line 90 of file kutil.h.

BOOLEAN sTObject::is_sigsafe

Definition at line 95 of file kutil.h.

BOOLEAN sTObject::is_special

Definition at line 99 of file kutil.h.

int sTObject::length

Definition at line 80 of file kutil.h.

poly sTObject::max

Definition at line 77 of file kutil.h.

poly sTObject::p

Definition at line 75 of file kutil.h.

int sTObject::pLength

Definition at line 80 of file kutil.h.

unsigned long sTObject::sevSig

Definition at line 73 of file kutil.h.

poly sTObject::sig

Definition at line 74 of file kutil.h.

poly sTObject::t_p

Definition at line 76 of file kutil.h.

ring sTObject::tailRing

Definition at line 78 of file kutil.h.


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