My Project
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 ()
 
KINLINE void pContent ()
 
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 183 of file kutil.h.

Constructor & Destructor Documentation

◆ sLObject() [1/3]

KINLINE sLObject::sLObject ( ring  tailRing = currRing)

Definition at line 612 of file kInline.h.

613 {
614  Init(r);
615 }
KINLINE void Init(ring tailRing=currRing)
Definition: kInline.h:604

◆ sLObject() [2/3]

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

Definition at line 616 of file kInline.h.

617 {
618  Init(r);
619  Set(p_in, r);
620 }
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 622 of file kInline.h.

623 {
624  Init(t_r);
625  Set(p_in, c_r, t_r);
626 }

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:192
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 591 of file kInline.h.

592 {
593  sTObject::Clear();
594  sev = 0;
595 }
unsigned long sev
Definition: kutil.h:187
KINLINE void Clear()
Definition: kInline.h:224

◆ Comp()

KINLINE long sLObject::Comp ( )

Definition at line 905 of file kInline.h.

906 {
907  poly pp;
908  ring r;
909  GetLm(pp, r);
910  assume(pp != NULL);
911  return p_GetComp(pp, r);
912 }
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:676
KINLINE poly GetLm(ring r)
Definition: kInline.h:273
#define assume(x)
Definition: mod2.h:387
#define p_GetComp(p, r)
Definition: monomials.h:64

◆ Copy()

KINLINE void sLObject::Copy ( )

Definition at line 812 of file kInline.h.

813 {
814  if (bucket != NULL)
815  {
817  kBucket_pt new_bucket = kBucketCreate(tailRing);
818  kBucketInit(new_bucket,
819  p_Copy(bucket->buckets[i], tailRing),
820  bucket->buckets_length[i]);
821  bucket = new_bucket;
822  if (t_p != NULL) pNext(t_p) = NULL;
823  if (p != NULL) pNext(p) = NULL;
824  }
825  TObject::Copy();
826 }
int i
Definition: cfEzgcd.cc:132
poly p
Definition: kutil.h:73
poly t_p
Definition: kutil.h:74
ring tailRing
Definition: kutil.h:76
static number Copy(number a, const coeffs)
Definition: flintcf_Q.cc:202
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:818

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 597 of file kInline.h.

598 {
600  if (bucket != NULL)
602 }
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 762 of file kInline.h.

763 {
764  //kTest_L(this);
765  if (p == NULL)
766  {
768  ((lmBin!=NULL)?lmBin:currRing->PolyBin));
769  FDeg = pFDeg();
770  }
771  else if ((lmBin != NULL) && (lmBin != currRing->PolyBin))
772  {
774  FDeg = pFDeg();
775  }
776 
777  if (bucket != NULL)
778  {
781  pLength++;
782  if (t_p != NULL) pNext(t_p) = pNext(p);
783  }
784  //kTest_L(this);
785  return p;
786 }
int pLength
Definition: kutil.h:80
KINLINE long pFDeg() const
Definition: kInline.h:433
long FDeg
Definition: kutil.h:77
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
Definition: kInline.h:978
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:1365
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 873 of file kInline.h.

874 {
875  if (bucket == NULL)
876  return sTObject::GetpLength();
878  return bucket->buckets_length[i] + 1;
879 }
KINLINE int GetpLength()
Definition: kInline.h:304

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 746 of file kInline.h.

747 {
748  //kTest_L(this);
749  poly tp = GetLmTailRing();
750  assume(tp != NULL);
751 
752  if (bucket != NULL)
753  {
754  kBucketClear(bucket, &pNext(tp), &pLength);
756  pLength++;
757  }
758  return tp;
759 }
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 604 of file kInline.h.

605 {
606  memset(this, 0, sizeof(sLObject));
607  i_r1 = -1;
608  i_r2 = -1;
609  i_r = -1;
610  Set(r);
611 }
int i_r1
Definition: kutil.h:193
int i_r2
Definition: kutil.h:193
int i_r
Definition: kutil.h:81

◆ LmDeleteAndIter()

KINLINE void sLObject::LmDeleteAndIter ( )

Definition at line 700 of file kInline.h.

701 {
703  if (bucket != NULL)
704  {
705  poly _p = kBucketExtractLm(bucket);
706  if (_p == NULL)
707  {
709  p = t_p = NULL;
710  return;
711  }
712  Set(_p, tailRing);
713  }
714  else
715  {
716  pLength--;
717  }
718 }
KINLINE void LmDeleteAndIter()
Definition: kInline.h:324
poly kBucketExtractLm(kBucket_pt bucket)
Definition: kbuckets.cc:511

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 720 of file kInline.h.

721 {
722  poly ret = GetLmTailRing();
723  poly pn;
724 
725  assume(p != NULL || t_p != NULL);
726 
727  if (bucket != NULL)
728  {
729  pn = kBucketExtractLm(bucket);
730  if (pn == NULL)
732  }
733  else
734  {
735  pn = pNext(ret);
736  }
737  pLength--;
738  pNext(ret) = NULL;
739  if (p != NULL && t_p != NULL)
740  p_LmFree(p, currRing);
741 
742  Set(pn, tailRing);
743  return ret;
744 }
static void p_LmFree(poly p, ring)
Definition: p_polys.h:683

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 890 of file kInline.h.

891 {
892  poly tp = GetLmTailRing();
893  assume(tp != NULL);
894  if (bucket != NULL)
895  {
897  pNext(tp) = bucket->buckets[i];
898  long m = p_MinComp(tp, tailRing);
899  pNext(tp) = NULL;
900  return m;
901  }
902  else
903  return p_MinComp(tp, tailRing);
904 }
int m
Definition: cfEzgcd.cc:128
static long p_MinComp(poly p, ring lmRing, ring tailRing)
Definition: p_polys.h:313

◆ 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:317

◆ operator=()

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

Definition at line 914 of file kInline.h.

915 {
916  memset(this, 0, sizeof(*this));
917  memcpy(this, &t, sizeof(sTObject));
918  return *this;
919 }
Definition: kutil.h:69

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 828 of file kInline.h.

829 {
830  poly tp = GetLmTailRing();
831  assume(tp != NULL);
832  if (bucket != NULL)
833  {
835  pNext(tp) = bucket->buckets[i];
836  long ldeg = tailRing->pLDeg(tp, &length, tailRing);
837  pNext(tp) = NULL;
838  return ldeg;
839  }
840  else
841  return tailRing->pLDeg(tp, &length, tailRing);
842 }
int length
Definition: kutil.h:79

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN  use_last)

Definition at line 843 of file kInline.h.

844 {
845  if (! deg_last || bucket != NULL) return sLObject::pLDeg();
846 
847  long ldeg;
848  ldeg = tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
849 #ifndef SING_NDEBUG
850  if ( pLength == 0)
853 #else
854  pLength=length;
855 #endif
856  return ldeg;
857 }
KINLINE long pLDeg()
Definition: kInline.h:828
poly p_Last(const poly p, int &l, const ring r)
Definition: p_polys.cc:4654
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition: ring.h:721

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN  use_bucket)

Definition at line 628 of file kInline.h.

629 {
630  if (bucket == NULL)
631  {
632  unsigned l = GetpLength();
633  if (use_bucket && (l > 1))
634  {
635  poly tp = GetLmTailRing();
636  assume(l == ::pLength(tp));
638  kBucketInit(bucket, pNext(tp), l-1);
639  pNext(tp) = NULL;
640  if (p != NULL) pNext(p) = NULL;
641  pLength = 0;
642  }
643  }
644 }
int l
Definition: cfEzgcd.cc:100
KINLINE int GetpLength()
Definition: kInline.h:873

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 859 of file kInline.h.

860 {
861  FDeg = this->pFDeg();
862  long d = this->pLDeg();
863  ecart = d - FDeg;
864  return d;
865 }
int ecart
Definition: kutil.h:78

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN  use_last)

Definition at line 866 of file kInline.h.

867 {
868  FDeg = this->pFDeg();
869  long d = this->pLDeg(use_last);
870  ecart = d - FDeg;
871  return d;
872 }

◆ SetLength()

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

Definition at line 880 of file kInline.h.

881 {
882  if (length_pLength)
883  {
884  length = this->GetpLength();
885  }
886  else
887  this->pLDeg();
888  return length;
889 }

◆ SetLmTail()

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

Definition at line 646 of file kInline.h.

647 {
648 
649  Set(lm, _tailRing);
650  if (use_bucket)
651  {
652  bucket = kBucketCreate(_tailRing);
653  kBucketInit(bucket, p_tail, p_Length);
654  pNext(lm) = NULL;
655  pLength = 0;
656  }
657  else
658  {
659  pNext(lm) = p_tail;
660  pLength = p_Length + 1;
661  }
662 }
p_Length
Definition: p_Procs_Impl.h:123

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 800 of file kInline.h.

801 {
802  if (t_p != NULL)
803  {
805  }
806  else
807  {
809  }
810 }
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition: p_polys.cc:4814

◆ ShallowCopyDelete()

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

Definition at line 789 of file kInline.h.

791 {
792  if (bucket != NULL)
793  kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
794  p_shallow_copy_delete);
795  sTObject::ShallowCopyDelete(new_tailRing,
796  new_tailRing->PolyBin,p_shallow_copy_delete,
797  FALSE);
798 }
#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 921 of file kInline.h.

922 {
923  if (p1 == NULL) return NULL;
924  if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
925  assume(i_r1 >= 0 && i_r1 <= s->tl);
926  TObject* T = s->R[i_r1];
927  assume(T->p == p1);
928  return T;
929 }
poly p1
Definition: kutil.h:188
const CanonicalForm int s
Definition: facAbsFact.cc:51
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:742
class sTObject TObject
Definition: kutil.h:57

◆ T_1_2()

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

Definition at line 942 of file kInline.h.

944 {
945  if (p1 == NULL)
946  {
947  T_1 = NULL;
948  T_2 = NULL;
949  return;
950  }
951  assume(p1 != NULL && p2 != NULL);
952  if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
953  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
954  assume(i_r1 >= 0 && i_r1 <= strat->tl);
955  assume(i_r2 >= 0 && i_r2 <= strat->tl);
956  T_1 = strat->R[i_r1];
957  T_2 = strat->R[i_r2];
958  assume(T_1->p == p1);
959  assume(T_2->p == p2);
960  return;
961 }
KINLINE TObject * T_2(const skStrategy *strat)
Definition: kInline.h:931
poly p2
Definition: kutil.h:188
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:921
TSet T
Definition: kutil.h:326
TObject ** R
Definition: kutil.h:340
int tl
Definition: kutil.h:350

◆ T_2()

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

Definition at line 931 of file kInline.h.

932 {
933  if (p1 == NULL) return NULL;
934  assume(p2 != NULL);
935  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
936  assume(i_r2 >= 0 && i_r2 <= strat->tl);
937  TObject* T = strat->R[i_r2];
938  assume(T->p == p2);
939  return T;
940 }

◆ Tail_Minus_mm_Mult_qq()

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

Definition at line 678 of file kInline.h.

680 {
681  if (bucket != NULL)
682  {
683  kBucket_Minus_m_Mult_p(bucket, m, q, &lq, spNoether);
684  }
685  else
686  {
687  if (lq<=0) lq= ::pLength(q);
688  poly _p = (t_p != NULL ? t_p : p);
689  assume(_p != NULL);
690 
691  int lp=pLength-1;
692  pNext(_p) = p_Minus_mm_Mult_qq( pNext(_p), m, q, lp, lq,
693  spNoether, tailRing );
694  pLength=lp+1;
695 // tailRing->p_Procs->p_Minus_mm_Mult_qq(pNext(_p), m, q, shorter,spNoether, tailRing, last);
696 // pLength += lq - shorter;
697  }
698 }
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:722
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:1042

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number  n)

Definition at line 664 of file kInline.h.

665 {
666  if (bucket != NULL)
667  {
669  }
670  else
671  {
672  poly _p = (t_p != NULL ? t_p : p);
673  assume(_p != NULL);
674  pNext(_p) = __p_Mult_nn(pNext(_p), n, tailRing);
675  }
676 }
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:943

Field Documentation

◆ bucket

kBucket_pt sLObject::bucket

Definition at line 192 of file kutil.h.

◆ checked

unsigned sLObject::checked

Definition at line 194 of file kutil.h.

◆ i_r1

int sLObject::i_r1

Definition at line 193 of file kutil.h.

◆ i_r2

int sLObject::i_r2

Definition at line 193 of file kutil.h.

◆ lcm

poly sLObject::lcm

Definition at line 191 of file kutil.h.

◆ p1

poly sLObject::p1

Definition at line 188 of file kutil.h.

◆ p2

poly sLObject::p2

Definition at line 188 of file kutil.h.

◆ prod_crit

BOOLEAN sLObject::prod_crit

Definition at line 199 of file kutil.h.

◆ sev

unsigned long sLObject::sev

Definition at line 187 of file kutil.h.


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