My Project  UNKNOWN_GIT_VERSION
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
 
char is_normalized
 
char is_redundant
 
char is_sigsafe
 
char is_special
 

Detailed Description

Definition at line 173 of file kutil.h.

Constructor & Destructor Documentation

◆ sLObject() [1/3]

KINLINE sLObject::sLObject ( ring  tailRing = currRing)

Definition at line 515 of file kInline.h.

516 {
517  Init(r);
518 }
KINLINE void Init(ring tailRing=currRing)
Definition: kInline.h:507

◆ sLObject() [2/3]

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

Definition at line 519 of file kInline.h.

520 {
521  Init(r);
522  Set(p_in, r);
523 }
KINLINE void Set(ring r=currRing)
Definition: kInline.h:103

◆ sLObject() [3/3]

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

Definition at line 525 of file kInline.h.

526 {
527  Init(t_r);
528  Set(p_in, c_r, t_r);
529 }

Member Function Documentation

◆ CanonicalizeP()

KINLINE void sLObject::CanonicalizeP ( )

Definition at line 339 of file kInline.h.

340 {
341  if (bucket != NULL)
343 }
kBucket_pt bucket
Definition: kutil.h:182
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:10

◆ Clear()

KINLINE void sLObject::Clear ( )

Definition at line 494 of file kInline.h.

495 {
496  sTObject::Clear();
497  sev = 0;
498 }
unsigned long sev
Definition: kutil.h:177
KINLINE void Clear()
Definition: kInline.h:191

◆ Comp()

KINLINE long sLObject::Comp ( )

Definition at line 808 of file kInline.h.

809 {
810  poly pp;
811  ring r;
812  GetLm(pp, r);
813  assume(pp != NULL);
814  return p_GetComp(pp, r);
815 }
CanonicalForm pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:248
KINLINE poly GetLm(ring r)
Definition: kInline.h:240
#define assume(x)
Definition: mod2.h:390
#define p_GetComp(p, r)
Definition: monomials.h:65

◆ Copy()

KINLINE void sLObject::Copy ( )

Definition at line 715 of file kInline.h.

716 {
717  if (bucket != NULL)
718  {
720  kBucket_pt new_bucket = kBucketCreate(tailRing);
721  kBucketInit(new_bucket,
722  p_Copy(bucket->buckets[i], tailRing),
723  bucket->buckets_length[i]);
724  bucket = new_bucket;
725  if (t_p != NULL) pNext(t_p) = NULL;
726  if (p != NULL) pNext(p) = NULL;
727  }
728  TObject::Copy();
729 }
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:201
void kBucketInit(kBucket_pt bucket, poly lm, int length)
Definition: kbuckets.cc:490
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
Definition: kbuckets.cc:206
#define pNext(p)
Definition: monomials.h:37
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:813

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 500 of file kInline.h.

501 {
503  if (bucket != NULL)
505 }
KINLINE void Delete()
Definition: kInline.h:177
void kBucketDeleteAndDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:220

◆ GetP()

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

Definition at line 665 of file kInline.h.

666 {
667  //kTest_L(this);
668  if (p == NULL)
669  {
671  (lmBin!=NULL?lmBin:currRing->PolyBin));
672  FDeg = pFDeg();
673  }
674  else if (lmBin != NULL && lmBin != currRing->PolyBin)
675  {
677  FDeg = pFDeg();
678  }
679 
680  if (bucket != NULL)
681  {
684  pLength++;
685  if (t_p != NULL) pNext(t_p) = pNext(p);
686  }
687  //kTest_L(this);
688  return p;
689 }
int pLength
Definition: kutil.h:76
KINLINE long pFDeg() const
Definition: kInline.h:400
long FDeg
Definition: kutil.h:73
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
Definition: kInline.h:881
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition: kbuckets.cc:518
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:213
static poly p_LmShallowCopyDelete(poly p, const ring r)
Definition: p_polys.h:1330
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 776 of file kInline.h.

777 {
778  if (bucket == NULL)
779  return sTObject::GetpLength();
781  return bucket->buckets_length[i] + 1;
782 }
KINLINE int GetpLength()
Definition: kInline.h:271

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 649 of file kInline.h.

650 {
651  //kTest_L(this);
652  poly tp = GetLmTailRing();
653  assume(tp != NULL);
654 
655  if (bucket != NULL)
656  {
657  kBucketClear(bucket, &pNext(tp), &pLength);
659  pLength++;
660  }
661  return tp;
662 }
KINLINE poly GetLmTailRing()
Definition: kInline.h:227

◆ HeadNormalize()

KINLINE void sLObject::HeadNormalize ( )

Definition at line 345 of file kInline.h.

346 {
347  if (t_p != NULL)
348  {
350  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
351  }
352  else
353  {
355  }
356 }
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:45
#define pSetCoeff0(p, n)
Definition: monomials.h:60
#define nNormalize(n)
Definition: numbers.h:31

◆ Init()

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

Definition at line 507 of file kInline.h.

508 {
509  memset(this, 0, sizeof(sLObject));
510  i_r1 = -1;
511  i_r2 = -1;
512  i_r = -1;
513  Set(r);
514 }
int i_r1
Definition: kutil.h:183
int i_r2
Definition: kutil.h:183
int i_r
Definition: kutil.h:77

◆ LmDeleteAndIter()

KINLINE void sLObject::LmDeleteAndIter ( )

Definition at line 603 of file kInline.h.

604 {
606  if (bucket != NULL)
607  {
608  poly _p = kBucketExtractLm(bucket);
609  if (_p == NULL)
610  {
612  p = t_p = NULL;
613  return;
614  }
615  Set(_p, tailRing);
616  }
617  else
618  {
619  pLength--;
620  }
621 }
KINLINE void LmDeleteAndIter()
Definition: kInline.h:291
poly kBucketExtractLm(kBucket_pt bucket)
Definition: kbuckets.cc:508

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 623 of file kInline.h.

624 {
625  poly ret = GetLmTailRing();
626  poly pn;
627 
628  assume(p != NULL || t_p != NULL);
629 
630  if (bucket != NULL)
631  {
632  pn = kBucketExtractLm(bucket);
633  if (pn == NULL)
635  }
636  else
637  {
638  pn = pNext(ret);
639  }
640  pLength--;
641  pNext(ret) = NULL;
642  if (p != NULL && t_p != NULL)
643  p_LmFree(p, currRing);
644 
645  Set(pn, tailRing);
646  return ret;
647 }
static void p_LmFree(poly p, ring)
Definition: p_polys.h:684

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 793 of file kInline.h.

794 {
795  poly tp = GetLmTailRing();
796  assume(tp != NULL);
797  if (bucket != NULL)
798  {
800  pNext(tp) = bucket->buckets[i];
801  long m = p_MinComp(tp, tailRing);
802  pNext(tp) = NULL;
803  return m;
804  }
805  else
806  return p_MinComp(tp, tailRing);
807 }
int m
Definition: cfEzgcd.cc:121
static long p_MinComp(poly p, ring lmRing, ring tailRing)
Definition: p_polys.h:314

◆ Normalize()

KINLINE void sLObject::Normalize ( )

Definition at line 325 of file kInline.h.

326 {
327  if (t_p != NULL)
328  {
329  pNormalize(t_p);
330  if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
331  }
332  else
333  {
334  pNormalize(p);
335  }
337 }
void kBucketNormalize(kBucket_pt bucket)
apply n_Normalize to all coefficients
#define pNormalize(p)
Definition: polys.h:311

◆ operator=()

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

Definition at line 817 of file kInline.h.

818 {
819  memset(this, 0, sizeof(*this));
820  memcpy(this, &t, sizeof(sTObject));
821  return *this;
822 }
Definition: kutil.h:65

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 731 of file kInline.h.

732 {
733  poly tp = GetLmTailRing();
734  assume(tp != NULL);
735  if (bucket != NULL)
736  {
738  pNext(tp) = bucket->buckets[i];
739  long ldeg = tailRing->pLDeg(tp, &length, tailRing);
740  pNext(tp) = NULL;
741  return ldeg;
742  }
743  else
744  return tailRing->pLDeg(tp, &length, tailRing);
745 }
int length
Definition: kutil.h:75

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN  use_last)

Definition at line 746 of file kInline.h.

747 {
748  if (! deg_last || bucket != NULL) return sLObject::pLDeg();
749 
750  long ldeg;
751  ldeg = tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
752 #ifndef SING_NDEBUG
753  if ( pLength == 0)
756 #else
757  pLength=length;
758 #endif
759  return ldeg;
760 }
KINLINE long pLDeg()
Definition: kInline.h:731
poly p_Last(const poly p, int &l, const ring r)
Definition: p_polys.cc:4519
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition: ring.h:710

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN  use_bucket)

Definition at line 531 of file kInline.h.

532 {
533  if (bucket == NULL)
534  {
535  unsigned l = GetpLength();
536  if (use_bucket && (l > 1))
537  {
538  poly tp = GetLmTailRing();
539  assume(l == ::pLength(tp));
541  kBucketInit(bucket, pNext(tp), l-1);
542  pNext(tp) = NULL;
543  if (p != NULL) pNext(p) = NULL;
544  pLength = 0;
545  }
546  }
547 }
int l
Definition: cfEzgcd.cc:93
KINLINE int GetpLength()
Definition: kInline.h:776

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 762 of file kInline.h.

763 {
764  FDeg = this->pFDeg();
765  long d = this->pLDeg();
766  ecart = d - FDeg;
767  return d;
768 }
int ecart
Definition: kutil.h:74

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN  use_last)

Definition at line 769 of file kInline.h.

770 {
771  FDeg = this->pFDeg();
772  long d = this->pLDeg(use_last);
773  ecart = d - FDeg;
774  return d;
775 }

◆ SetLength()

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

Definition at line 783 of file kInline.h.

784 {
785  if (length_pLength)
786  {
787  length = this->GetpLength();
788  }
789  else
790  this->pLDeg();
791  return length;
792 }

◆ SetLmTail()

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

Definition at line 549 of file kInline.h.

550 {
551 
552  Set(lm, _tailRing);
553  if (use_bucket)
554  {
555  bucket = kBucketCreate(_tailRing);
556  kBucketInit(bucket, p_tail, p_Length);
557  pNext(lm) = NULL;
558  pLength = 0;
559  }
560  else
561  {
562  pNext(lm) = p_tail;
563  pLength = p_Length + 1;
564  }
565 }
p_Length
Definition: p_Procs_Impl.h:123

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 703 of file kInline.h.

704 {
705  if (t_p != NULL)
706  {
708  }
709  else
710  {
712  }
713 }
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition: p_polys.cc:4679

◆ ShallowCopyDelete()

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

Definition at line 692 of file kInline.h.

694 {
695  if (bucket != NULL)
696  kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
697  p_shallow_copy_delete);
698  sTObject::ShallowCopyDelete(new_tailRing,
699  new_tailRing->PolyBin,p_shallow_copy_delete,
700  FALSE);
701 }
#define FALSE
Definition: auxiliary.h:94
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
Definition: kInline.h:359
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:532

◆ T_1()

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

Definition at line 824 of file kInline.h.

825 {
826  if (p1 == NULL) return NULL;
827  if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
828  assume(i_r1 >= 0 && i_r1 <= s->tl);
829  TObject* T = s->R[i_r1];
830  assume(T->p == p1);
831  return T;
832 }
poly p1
Definition: kutil.h:178
const CanonicalForm int s
Definition: facAbsFact.cc:55
static jList * T
Definition: janet.cc:31
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
Definition: kutil.cc:704
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 845 of file kInline.h.

847 {
848  if (p1 == NULL)
849  {
850  T_1 = NULL;
851  T_2 = NULL;
852  return;
853  }
854  assume(p1 != NULL && p2 != NULL);
855  if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
856  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
857  assume(i_r1 >= 0 && i_r1 <= strat->tl);
858  assume(i_r2 >= 0 && i_r2 <= strat->tl);
859  T_1 = strat->R[i_r1];
860  T_2 = strat->R[i_r2];
861  assume(T_1->p == p1);
862  assume(T_2->p == p2);
863  return;
864 }
KINLINE TObject * T_2(const skStrategy *strat)
Definition: kInline.h:834
poly p2
Definition: kutil.h:178
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:824
TSet T
Definition: kutil.h:317
TObject ** R
Definition: kutil.h:333
int tl
Definition: kutil.h:343

◆ T_2()

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

Definition at line 834 of file kInline.h.

835 {
836  if (p1 == NULL) return NULL;
837  assume(p2 != NULL);
838  if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
839  assume(i_r2 >= 0 && i_r2 <= strat->tl);
840  TObject* T = strat->R[i_r2];
841  assume(T->p == p2);
842  return T;
843 }

◆ Tail_Minus_mm_Mult_qq()

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

Definition at line 581 of file kInline.h.

583 {
584  if (bucket != NULL)
585  {
586  kBucket_Minus_m_Mult_p(bucket, m, q, &lq, spNoether);
587  }
588  else
589  {
590  if (lq<=0) lq= ::pLength(q);
591  poly _p = (t_p != NULL ? t_p : p);
592  assume(_p != NULL);
593 
594  int lp=pLength-1;
595  pNext(_p) = p_Minus_mm_Mult_qq( pNext(_p), m, q, lp, lq,
596  spNoether, tailRing );
597  pLength=lp+1;
598 // tailRing->p_Procs->p_Minus_mm_Mult_qq(pNext(_p), m, q, shorter,spNoether, tailRing, last);
599 // pLength += lq - shorter;
600  }
601 }
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:713
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:1007

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number  n)

Definition at line 567 of file kInline.h.

568 {
569  if (bucket != NULL)
570  {
572  }
573  else
574  {
575  poly _p = (t_p != NULL ? t_p : p);
576  assume(_p != NULL);
577  pNext(_p) = __p_Mult_nn(pNext(_p), n, tailRing);
578  }
579 }
void kBucket_Mult_n(kBucket_pt bucket, number n)
Multiply Bucket by number ,i.e. Bpoly == n*Bpoly.
Definition: kbuckets.cc:595
#define __p_Mult_nn(p, n, r)
Definition: p_polys.h:928

Field Documentation

◆ bucket

kBucket_pt sLObject::bucket

Definition at line 182 of file kutil.h.

◆ checked

unsigned sLObject::checked

Definition at line 184 of file kutil.h.

◆ i_r1

int sLObject::i_r1

Definition at line 183 of file kutil.h.

◆ i_r2

int sLObject::i_r2

Definition at line 183 of file kutil.h.

◆ lcm

poly sLObject::lcm

Definition at line 181 of file kutil.h.

◆ p1

poly sLObject::p1

Definition at line 178 of file kutil.h.

◆ p2

poly sLObject::p2

Definition at line 178 of file kutil.h.

◆ prod_crit

BOOLEAN sLObject::prod_crit

Definition at line 189 of file kutil.h.

◆ sev

unsigned long sLObject::sev

Definition at line 177 of file kutil.h.


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