My Project  debian-1:4.1.2-p1+ds-2
Public Member Functions | Data Fields
sLObject Class Reference

#include <kutil.h>

Public Member Functions

KINLINE void Init (ring tailRing=currRing)
 
KINLINE sLObject (ring tailRing=currRing)
 
KINLINE sLObject (poly p, ring tailRing=currRing)
 
KINLINE sLObject (poly p, ring c_r, ring tailRing)
 
KINLINE void Delete ()
 
KINLINE void Clear ()
 
KINLINE void LmDeleteAndIter ()
 
KINLINE poly LmExtractAndIter ()
 
KINLINE void PrepareRed (BOOLEAN use_bucket)
 
KINLINE void SetLmTail (poly lm, poly new_p, int length, int use_bucket, ring r)
 
KINLINE void Tail_Minus_mm_Mult_qq (poly m, poly qq, int lq, poly spNoether)
 
KINLINE void Tail_Mult_nn (number n)
 
KINLINE poly GetP (omBin lmBin=(omBin) NULL)
 
KINLINE poly GetTP ()
 
KINLINE void CanonicalizeP ()
 
KINLINE void Copy ()
 
KINLINE int GetpLength ()
 
KINLINE long pLDeg (BOOLEAN use_last)
 
KINLINE long pLDeg ()
 
KINLINE int SetLength (BOOLEAN lengt_pLength=FALSE)
 
KINLINE long SetDegStuffReturnLDeg ()
 
KINLINE long SetDegStuffReturnLDeg (BOOLEAN use_last)
 
KINLINE long MinComp ()
 
KINLINE long Comp ()
 
KINLINE void ShallowCopyDelete (ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
 
KINLINE void SetShortExpVector ()
 
KINLINE sLObjectoperator= (const sTObject &)
 
KINLINE TObjectT_1 (const skStrategy *strat)
 
KINLINE TObjectT_2 (const skStrategy *strat)
 
KINLINE void T_1_2 (const skStrategy *strat, TObject *&T_1, TObject *&T_2)
 
KINLINE void Normalize ()
 
KINLINE void HeadNormalize ()
 
- Public Member Functions inherited from sTObject
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 ()
 
void wrp ()
 

Data Fields

unsigned long sev
 
poly p1
 
poly p2
 
poly lcm
 
kBucket_pt bucket
 
int i_r1
 
int i_r2
 
unsigned checked
 
BOOLEAN prod_crit
 
- Data Fields inherited from sTObject
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 178 of file kutil.h.

Constructor & Destructor Documentation

◆ sLObject() [1/3]

KINLINE sLObject::sLObject ( ring  tailRing = currRing)

Definition at line 548 of file kInline.h.

549 {
550  Init(r);
551 }
KINLINE void Init(ring tailRing=currRing)
Definition: kInline.h:540

◆ sLObject() [2/3]

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

Definition at line 552 of file kInline.h.

553 {
554  Init(r);
555  Set(p_in, r);
556 }
KINLINE void Set(ring r=currRing)
Definition: kInline.h:106

◆ sLObject() [3/3]

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

Definition at line 558 of file kInline.h.

559 {
560  Init(t_r);
561  Set(p_in, c_r, t_r);
562 }

Member Function Documentation

◆ CanonicalizeP()

KINLINE void sLObject::CanonicalizeP ( )

Definition at line 372 of file kInline.h.

373 {
374  if (bucket != NULL)
376 }
kBucket_pt bucket
Definition: kutil.h:187
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
#define NULL
Definition: omList.c:12

◆ Clear()

KINLINE void sLObject::Clear ( )

Definition at line 527 of file kInline.h.

528 {
529  sTObject::Clear();
530  sev = 0;
531 }
unsigned long sev
Definition: kutil.h:182
KINLINE void Clear()
Definition: kInline.h:224

◆ Comp()

KINLINE long sLObject::Comp ( )

Definition at line 841 of file kInline.h.

842 {
843  poly pp;
844  ring r;
845  GetLm(pp, r);
846  assume(pp != NULL);
847  return p_GetComp(pp, r);
848 }
CanonicalForm pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:248
KINLINE poly GetLm(ring r)
Definition: kInline.h:273
#define assume(x)
Definition: mod2.h:390
#define p_GetComp(p, r)
Definition: monomials.h:64

◆ Copy()

KINLINE void sLObject::Copy ( )

Definition at line 748 of file kInline.h.

749 {
750  if (bucket != NULL)
751  {
753  kBucket_pt new_bucket = kBucketCreate(tailRing);
754  kBucketInit(new_bucket,
755  p_Copy(bucket->buckets[i], tailRing),
756  bucket->buckets_length[i]);
757  bucket = new_bucket;
758  if (t_p != NULL) pNext(t_p) = NULL;
759  if (p != NULL) pNext(p) = NULL;
760  }
761  TObject::Copy();
762 }
int i
Definition: cfEzgcd.cc:125
poly p
Definition: kutil.h:69
poly t_p
Definition: kutil.h:70
ring tailRing
Definition: kutil.h:72
static number Copy(number a, const coeffs r)
Definition: flintcf_Q.cc:200
void kBucketInit(kBucket_pt bucket, poly lm, int length)
Definition: kbuckets.cc:493
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
Definition: kbuckets.cc:209
#define pNext(p)
Definition: monomials.h:36
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 533 of file kInline.h.

534 {
536  if (bucket != NULL)
538 }
KINLINE void Delete()
Definition: kInline.h:210
void kBucketDeleteAndDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:223

◆ GetP()

KINLINE poly sLObject::GetP ( omBin  lmBin = (omBin)NULL)

Definition at line 698 of file kInline.h.

699 {
700  //kTest_L(this);
701  if (p == NULL)
702  {
704  (lmBin!=NULL?lmBin:currRing->PolyBin));
705  FDeg = pFDeg();
706  }
707  else if (lmBin != NULL && lmBin != currRing->PolyBin)
708  {
710  FDeg = pFDeg();
711  }
712 
713  if (bucket != NULL)
714  {
717  pLength++;
718  if (t_p != NULL) pNext(t_p) = pNext(p);
719  }
720  //kTest_L(this);
721  return p;
722 }
int pLength
Definition: kutil.h:76
KINLINE long pFDeg() const
Definition: kInline.h:433
long FDeg
Definition: kutil.h:73
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
Definition: kInline.h:914
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition: kbuckets.cc:521
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:216
static poly p_LmShallowCopyDelete(poly p, const ring r)
Definition: p_polys.h:1332
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13

◆ GetpLength()

KINLINE int sLObject::GetpLength ( )

Definition at line 809 of file kInline.h.

810 {
811  if (bucket == NULL)
812  return sTObject::GetpLength();
814  return bucket->buckets_length[i] + 1;
815 }
KINLINE int GetpLength()
Definition: kInline.h:304

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 682 of file kInline.h.

683 {
684  //kTest_L(this);
685  poly tp = GetLmTailRing();
686  assume(tp != NULL);
687 
688  if (bucket != NULL)
689  {
690  kBucketClear(bucket, &pNext(tp), &pLength);
692  pLength++;
693  }
694  return tp;
695 }
KINLINE poly GetLmTailRing()
Definition: kInline.h:260

◆ HeadNormalize()

KINLINE void sLObject::HeadNormalize ( )

Definition at line 378 of file kInline.h.

379 {
380  if (t_p != NULL)
381  {
383  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
384  }
385  else
386  {
388  }
389 }
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
#define pSetCoeff0(p, n)
Definition: monomials.h:59
#define nNormalize(n)
Definition: numbers.h:30

◆ Init()

KINLINE void sLObject::Init ( ring  tailRing = currRing)

Definition at line 540 of file kInline.h.

541 {
542  memset(this, 0, sizeof(sLObject));
543  i_r1 = -1;
544  i_r2 = -1;
545  i_r = -1;
546  Set(r);
547 }
int i_r1
Definition: kutil.h:188
int i_r2
Definition: kutil.h:188
int i_r
Definition: kutil.h:77

◆ LmDeleteAndIter()

KINLINE void sLObject::LmDeleteAndIter ( )

Definition at line 636 of file kInline.h.

637 {
639  if (bucket != NULL)
640  {
641  poly _p = kBucketExtractLm(bucket);
642  if (_p == NULL)
643  {
645  p = t_p = NULL;
646  return;
647  }
648  Set(_p, tailRing);
649  }
650  else
651  {
652  pLength--;
653  }
654 }
KINLINE void LmDeleteAndIter()
Definition: kInline.h:324
poly kBucketExtractLm(kBucket_pt bucket)
Definition: kbuckets.cc:511

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 656 of file kInline.h.

657 {
658  poly ret = GetLmTailRing();
659  poly pn;
660 
661  assume(p != NULL || t_p != NULL);
662 
663  if (bucket != NULL)
664  {
665  pn = kBucketExtractLm(bucket);
666  if (pn == NULL)
668  }
669  else
670  {
671  pn = pNext(ret);
672  }
673  pLength--;
674  pNext(ret) = NULL;
675  if (p != NULL && t_p != NULL)
676  p_LmFree(p, currRing);
677 
678  Set(pn, tailRing);
679  return ret;
680 }
static void p_LmFree(poly p, ring)
Definition: p_polys.h:682

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 826 of file kInline.h.

827 {
828  poly tp = GetLmTailRing();
829  assume(tp != NULL);
830  if (bucket != NULL)
831  {
833  pNext(tp) = bucket->buckets[i];
834  long m = p_MinComp(tp, tailRing);
835  pNext(tp) = NULL;
836  return m;
837  }
838  else
839  return p_MinComp(tp, tailRing);
840 }
int m
Definition: cfEzgcd.cc:121
static long p_MinComp(poly p, ring lmRing, ring tailRing)
Definition: p_polys.h:312

◆ Normalize()

KINLINE void sLObject::Normalize ( )

Definition at line 358 of file kInline.h.

359 {
360  if (t_p != NULL)
361  {
362  pNormalize(t_p);
363  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
364  }
365  else
366  {
367  pNormalize(p);
368  }
370 }
void kBucketNormalize(kBucket_pt bucket)
apply n_Normalize to all coefficients
#define pNormalize(p)
Definition: polys.h:313

◆ operator=()

KINLINE sLObject & sLObject::operator= ( const sTObject t)

Definition at line 850 of file kInline.h.

851 {
852  memset(this, 0, sizeof(*this));
853  memcpy(this, &t, sizeof(sTObject));
854  return *this;
855 }
Definition: kutil.h:65

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 764 of file kInline.h.

765 {
766  poly tp = GetLmTailRing();
767  assume(tp != NULL);
768  if (bucket != NULL)
769  {
771  pNext(tp) = bucket->buckets[i];
772  long ldeg = tailRing->pLDeg(tp, &length, tailRing);
773  pNext(tp) = NULL;
774  return ldeg;
775  }
776  else
777  return tailRing->pLDeg(tp, &length, tailRing);
778 }
int length
Definition: kutil.h:75

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN  use_last)

Definition at line 779 of file kInline.h.

780 {
781  if (! deg_last || bucket != NULL) return sLObject::pLDeg();
782 
783  long ldeg;
784  ldeg = tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
785 #ifndef SING_NDEBUG
786  if ( pLength == 0)
789 #else
790  pLength=length;
791 #endif
792  return ldeg;
793 }
KINLINE long pLDeg()
Definition: kInline.h:764
poly p_Last(const poly p, int &l, const ring r)
Definition: p_polys.cc:4527
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition: ring.h:715

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN  use_bucket)

Definition at line 564 of file kInline.h.

565 {
566  if (bucket == NULL)
567  {
568  unsigned l = GetpLength();
569  if (use_bucket && (l > 1))
570  {
571  poly tp = GetLmTailRing();
572  assume(l == ::pLength(tp));
574  kBucketInit(bucket, pNext(tp), l-1);
575  pNext(tp) = NULL;
576  if (p != NULL) pNext(p) = NULL;
577  pLength = 0;
578  }
579  }
580 }
int l
Definition: cfEzgcd.cc:93
KINLINE int GetpLength()
Definition: kInline.h:809

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 795 of file kInline.h.

796 {
797  FDeg = this->pFDeg();
798  long d = this->pLDeg();
799  ecart = d - FDeg;
800  return d;
801 }
int ecart
Definition: kutil.h:74

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN  use_last)

Definition at line 802 of file kInline.h.

803 {
804  FDeg = this->pFDeg();
805  long d = this->pLDeg(use_last);
806  ecart = d - FDeg;
807  return d;
808 }

◆ SetLength()

KINLINE int sLObject::SetLength ( BOOLEAN  lengt_pLength = FALSE)

Definition at line 816 of file kInline.h.

817 {
818  if (length_pLength)
819  {
820  length = this->GetpLength();
821  }
822  else
823  this->pLDeg();
824  return length;
825 }

◆ SetLmTail()

KINLINE void sLObject::SetLmTail ( poly  lm,
poly  new_p,
int  length,
int  use_bucket,
ring  r 
)

Definition at line 582 of file kInline.h.

583 {
584 
585  Set(lm, _tailRing);
586  if (use_bucket)
587  {
588  bucket = kBucketCreate(_tailRing);
589  kBucketInit(bucket, p_tail, p_Length);
590  pNext(lm) = NULL;
591  pLength = 0;
592  }
593  else
594  {
595  pNext(lm) = p_tail;
596  pLength = p_Length + 1;
597  }
598 }
p_Length
Definition: p_Procs_Impl.h:123

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 736 of file kInline.h.

737 {
738  if (t_p != NULL)
739  {
741  }
742  else
743  {
745  }
746 }
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition: p_polys.cc:4687

◆ ShallowCopyDelete()

KINLINE void sLObject::ShallowCopyDelete ( ring  new_tailRing,
pShallowCopyDeleteProc  p_shallow_copy_delete 
)

Definition at line 725 of file kInline.h.

727 {
728  if (bucket != NULL)
729  kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
730  p_shallow_copy_delete);
731  sTObject::ShallowCopyDelete(new_tailRing,
732  new_tailRing->PolyBin,p_shallow_copy_delete,
733  FALSE);
734 }
#define FALSE
Definition: auxiliary.h:96
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
Definition: kInline.h:392
void kBucketShallowCopyDelete(kBucket_pt bucket, ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete)
For changing the ring of the Bpoly to new_tailBin.
Definition: kbuckets.cc:535

◆ T_1()

KINLINE TObject * sLObject::T_1 ( const skStrategy strat)

Definition at line 857 of file kInline.h.

858 {
859  if (p1 == NULL) return NULL;
860  if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
861  assume(i_r1 >= 0 && i_r1 <= s->tl);
862  TObject* T = s->R[i_r1];
863  assume(T->p == p1);
864  return T;
865 }
poly p1
Definition: kutil.h:183
const CanonicalForm int s
Definition: facAbsFact.cc:55
STATIC_VAR jList * T
Definition: janet.cc:30
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
Definition: kutil.cc:711
class sTObject TObject
Definition: kutil.h:53

◆ T_1_2()

KINLINE void sLObject::T_1_2 ( const skStrategy strat,
TObject *&  T_1,
TObject *&  T_2 
)

Definition at line 878 of file kInline.h.

880 {
881  if (p1 == NULL)
882  {
883  T_1 = NULL;
884  T_2 = NULL;
885  return;
886  }
887  assume(p1 != NULL && p2 != NULL);
888  if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
889  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
890  assume(i_r1 >= 0 && i_r1 <= strat->tl);
891  assume(i_r2 >= 0 && i_r2 <= strat->tl);
892  T_1 = strat->R[i_r1];
893  T_2 = strat->R[i_r2];
894  assume(T_1->p == p1);
895  assume(T_2->p == p2);
896  return;
897 }
KINLINE TObject * T_2(const skStrategy *strat)
Definition: kInline.h:867
poly p2
Definition: kutil.h:183
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:857
TSet T
Definition: kutil.h:322
TObject ** R
Definition: kutil.h:338
int tl
Definition: kutil.h:348

◆ T_2()

KINLINE TObject * sLObject::T_2 ( const skStrategy strat)

Definition at line 867 of file kInline.h.

868 {
869  if (p1 == NULL) return NULL;
870  assume(p2 != NULL);
871  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
872  assume(i_r2 >= 0 && i_r2 <= strat->tl);
873  TObject* T = strat->R[i_r2];
874  assume(T->p == p2);
875  return T;
876 }

◆ Tail_Minus_mm_Mult_qq()

KINLINE void sLObject::Tail_Minus_mm_Mult_qq ( poly  m,
poly  qq,
int  lq,
poly  spNoether 
)

Definition at line 614 of file kInline.h.

616 {
617  if (bucket != NULL)
618  {
619  kBucket_Minus_m_Mult_p(bucket, m, q, &lq, spNoether);
620  }
621  else
622  {
623  if (lq<=0) lq= ::pLength(q);
624  poly _p = (t_p != NULL ? t_p : p);
625  assume(_p != NULL);
626 
627  int lp=pLength-1;
628  pNext(_p) = p_Minus_mm_Mult_qq( pNext(_p), m, q, lp, lq,
629  spNoether, tailRing );
630  pLength=lp+1;
631 // tailRing->p_Procs->p_Minus_mm_Mult_qq(pNext(_p), m, q, shorter,spNoether, tailRing, last);
632 // pLength += lq - shorter;
633  }
634 }
void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
Definition: kbuckets.cc:716
Definition: lq.h:40
static poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq, const poly spNoether, const ring r)
Definition: p_polys.h:1009

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number  n)

Definition at line 600 of file kInline.h.

601 {
602  if (bucket != NULL)
603  {
605  }
606  else
607  {
608  poly _p = (t_p != NULL ? t_p : p);
609  assume(_p != NULL);
610  pNext(_p) = __p_Mult_nn(pNext(_p), n, tailRing);
611  }
612 }
void kBucket_Mult_n(kBucket_pt bucket, number n)
Multiply Bucket by number ,i.e. Bpoly == n*Bpoly.
Definition: kbuckets.cc:598
#define __p_Mult_nn(p, n, r)
Definition: p_polys.h:930

Field Documentation

◆ bucket

kBucket_pt sLObject::bucket

Definition at line 187 of file kutil.h.

◆ checked

unsigned sLObject::checked

Definition at line 189 of file kutil.h.

◆ i_r1

int sLObject::i_r1

Definition at line 188 of file kutil.h.

◆ i_r2

int sLObject::i_r2

Definition at line 188 of file kutil.h.

◆ lcm

poly sLObject::lcm

Definition at line 186 of file kutil.h.

◆ p1

poly sLObject::p1

Definition at line 183 of file kutil.h.

◆ p2

poly sLObject::p2

Definition at line 183 of file kutil.h.

◆ prod_crit

BOOLEAN sLObject::prod_crit

Definition at line 194 of file kutil.h.

◆ sev

unsigned long sLObject::sev

Definition at line 182 of file kutil.h.


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