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

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

◆ sLObject() [2/3]

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

Definition at line 617 of file kInline.h.

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

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

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

907 {
908  poly pp;
909  ring r;
910  GetLm(pp, r);
911  assume(pp != NULL);
912  return p_GetComp(pp, r);
913 }
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:389
#define p_GetComp(p, r)
Definition: monomials.h:64

◆ Copy()

KINLINE void sLObject::Copy ( )

Definition at line 813 of file kInline.h.

814 {
815  if (bucket != NULL)
816  {
818  kBucket_pt new_bucket = kBucketCreate(tailRing);
819  kBucketInit(new_bucket,
820  p_Copy(bucket->buckets[i], tailRing),
821  bucket->buckets_length[i]);
822  bucket = new_bucket;
823  if (t_p != NULL) pNext(t_p) = NULL;
824  if (p != NULL) pNext(p) = NULL;
825  }
826  TObject::Copy();
827 }
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:848

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 598 of file kInline.h.

599 {
601  if (bucket != NULL)
603 }
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 763 of file kInline.h.

764 {
765  //kTest_L(this);
766  if (p == NULL)
767  {
769  ((lmBin!=NULL)?lmBin:currRing->PolyBin));
770  FDeg = pFDeg();
771  }
772  else if ((lmBin != NULL) && (lmBin != currRing->PolyBin))
773  {
775  FDeg = pFDeg();
776  }
777 
778  if (bucket != NULL)
779  {
782  pLength++;
783  if (t_p != NULL) pNext(t_p) = pNext(p);
784  }
785  //kTest_L(this);
786  return p;
787 }
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:979
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:1395
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 874 of file kInline.h.

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

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 747 of file kInline.h.

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

606 {
607  memset(this, 0, sizeof(sLObject));
608  i_r1 = -1;
609  i_r2 = -1;
610  i_r = -1;
611  Set(r);
612 }
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 701 of file kInline.h.

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

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 721 of file kInline.h.

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

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 891 of file kInline.h.

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

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

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

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 829 of file kInline.h.

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

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN  use_last)

Definition at line 844 of file kInline.h.

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

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN  use_bucket)

Definition at line 629 of file kInline.h.

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

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 860 of file kInline.h.

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

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN  use_last)

Definition at line 867 of file kInline.h.

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

◆ SetLength()

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

Definition at line 881 of file kInline.h.

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

◆ SetLmTail()

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

Definition at line 647 of file kInline.h.

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

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 801 of file kInline.h.

802 {
803  if (t_p != NULL)
804  {
806  }
807  else
808  {
810  }
811 }
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition: p_polys.cc:4897

◆ ShallowCopyDelete()

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

Definition at line 790 of file kInline.h.

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

923 {
924  if (p1 == NULL) return NULL;
925  if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
926  assume(i_r1 >= 0 && i_r1 <= s->tl);
927  TObject* T = s->R[i_r1];
928  assume(T->p == p1);
929  return T;
930 }
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 943 of file kInline.h.

945 {
946  if (p1 == NULL)
947  {
948  T_1 = NULL;
949  T_2 = NULL;
950  return;
951  }
952  assume(p1 != NULL && p2 != NULL);
953  if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
954  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
955  assume(i_r1 >= 0 && i_r1 <= strat->tl);
956  assume(i_r2 >= 0 && i_r2 <= strat->tl);
957  T_1 = strat->R[i_r1];
958  T_2 = strat->R[i_r2];
959  assume(T_1->p == p1);
960  assume(T_2->p == p2);
961  return;
962 }
KINLINE TObject * T_2(const skStrategy *strat)
Definition: kInline.h:932
poly p2
Definition: kutil.h:188
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:922
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 932 of file kInline.h.

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

◆ Tail_Minus_mm_Mult_qq()

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

Definition at line 679 of file kInline.h.

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

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number  n)

Definition at line 665 of file kInline.h.

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

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: