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

571{
572 Init(r);
573}
KINLINE void Init(ring tailRing=currRing)
Definition: kInline.h:562

◆ sLObject() [2/3]

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

Definition at line 574 of file kInline.h.

575{
576 Init(r);
577 Set(p_in, r);
578}
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 580 of file kInline.h.

581{
582 Init(t_r);
583 Set(p_in, c_r, t_r);
584}

Member Function Documentation

◆ CanonicalizeP()

KINLINE void sLObject::CanonicalizeP ( )

Definition at line 372 of file kInline.h.

373{
374 if (bucket != NULL)
376}
#define NULL
Definition: auxiliary.h:104
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...

◆ Clear()

KINLINE void sLObject::Clear ( )

Definition at line 549 of file kInline.h.

550{
552 sev = 0;
553}
unsigned long sev
Definition: kutil.h:187
KINLINE void Clear()
Definition: kInline.h:224

◆ Comp()

KINLINE long sLObject::Comp ( )

Definition at line 863 of file kInline.h.

864{
865 poly pp;
866 ring r;
867 GetLm(pp, r);
868 assume(pp != NULL);
869 return p_GetComp(pp, r);
870}
CanonicalForm 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 770 of file kInline.h.

771{
772 if (bucket != NULL)
773 {
775 kBucket_pt new_bucket = kBucketCreate(tailRing);
776 kBucketInit(new_bucket,
777 p_Copy(bucket->buckets[i], tailRing),
778 bucket->buckets_length[i]);
779 bucket = new_bucket;
780 if (t_p != NULL) pNext(t_p) = NULL;
781 if (p != NULL) pNext(p) = NULL;
782 }
784}
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:812

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 555 of file kInline.h.

556{
558 if (bucket != NULL)
560}
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 720 of file kInline.h.

721{
722 //kTest_L(this);
723 if (p == NULL)
724 {
726 ((lmBin!=NULL)?lmBin:currRing->PolyBin));
727 FDeg = pFDeg();
728 }
729 else if ((lmBin != NULL) && (lmBin != currRing->PolyBin))
730 {
732 FDeg = pFDeg();
733 }
734
735 if (bucket != NULL)
736 {
739 pLength++;
740 if (t_p != NULL) pNext(t_p) = pNext(p);
741 }
742 //kTest_L(this);
743 return p;
744}
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:936
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:1353
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 831 of file kInline.h.

832{
833 if (bucket == NULL)
834 return sTObject::GetpLength();
836 return bucket->buckets_length[i] + 1;
837}
KINLINE int GetpLength()
Definition: kInline.h:304

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 704 of file kInline.h.

705{
706 //kTest_L(this);
707 poly tp = GetLmTailRing();
708 assume(tp != NULL);
709
710 if (bucket != NULL)
711 {
714 pLength++;
715 }
716 return tp;
717}
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}
#define pSetCoeff0(p, n)
Definition: monomials.h:59
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 nNormalize(n)
Definition: numbers.h:30

◆ Init()

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

Definition at line 562 of file kInline.h.

563{
564 memset(this, 0, sizeof(sLObject));
565 i_r1 = -1;
566 i_r2 = -1;
567 i_r = -1;
568 Set(r);
569}
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 658 of file kInline.h.

659{
661 if (bucket != NULL)
662 {
663 poly _p = kBucketExtractLm(bucket);
664 if (_p == NULL)
665 {
667 p = t_p = NULL;
668 return;
669 }
670 Set(_p, tailRing);
671 }
672 else
673 {
674 pLength--;
675 }
676}
KINLINE void LmDeleteAndIter()
Definition: kInline.h:324
poly kBucketExtractLm(kBucket_pt bucket)
Definition: kbuckets.cc:511

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 678 of file kInline.h.

679{
680 poly ret = GetLmTailRing();
681 poly pn;
682
683 assume(p != NULL || t_p != NULL);
684
685 if (bucket != NULL)
686 {
688 if (pn == NULL)
690 }
691 else
692 {
693 pn = pNext(ret);
694 }
695 pLength--;
696 pNext(ret) = NULL;
697 if (p != NULL && t_p != NULL)
699
700 Set(pn, tailRing);
701 return ret;
702}
static void p_LmFree(poly p, ring)
Definition: p_polys.h:683

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 848 of file kInline.h.

849{
850 poly tp = GetLmTailRing();
851 assume(tp != NULL);
852 if (bucket != NULL)
853 {
855 pNext(tp) = bucket->buckets[i];
856 long m = p_MinComp(tp, tailRing);
857 pNext(tp) = NULL;
858 return m;
859 }
860 else
861 return p_MinComp(tp, tailRing);
862}
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 {
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 872 of file kInline.h.

873{
874 memset(this, 0, sizeof(*this));
875 memcpy(this, &t, sizeof(sTObject));
876 return *this;
877}
Definition: kutil.h:69

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 786 of file kInline.h.

787{
788 poly tp = GetLmTailRing();
789 assume(tp != NULL);
790 if (bucket != NULL)
791 {
793 pNext(tp) = bucket->buckets[i];
794 long ldeg = tailRing->pLDeg(tp, &length, tailRing);
795 pNext(tp) = NULL;
796 return ldeg;
797 }
798 else
799 return tailRing->pLDeg(tp, &length, tailRing);
800}
int length
Definition: kutil.h:79

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN  use_last)

Definition at line 801 of file kInline.h.

802{
803 if (! deg_last || bucket != NULL) return sLObject::pLDeg();
804
805 long ldeg;
806 ldeg = tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
807#ifndef SING_NDEBUG
808 if ( pLength == 0)
811#else
813#endif
814 return ldeg;
815}
KINLINE long pLDeg()
Definition: kInline.h:786
poly p_Last(const poly p, int &l, const ring r)
Definition: p_polys.cc:4649
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition: ring.h:722

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN  use_bucket)

Definition at line 586 of file kInline.h.

587{
588 if (bucket == NULL)
589 {
590 unsigned l = GetpLength();
591 if (use_bucket && (l > 1))
592 {
593 poly tp = GetLmTailRing();
594 assume(l == ::pLength(tp));
596 kBucketInit(bucket, pNext(tp), l-1);
597 pNext(tp) = NULL;
598 if (p != NULL) pNext(p) = NULL;
599 pLength = 0;
600 }
601 }
602}
int l
Definition: cfEzgcd.cc:100
KINLINE int GetpLength()
Definition: kInline.h:831

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 817 of file kInline.h.

818{
819 FDeg = this->pFDeg();
820 long d = this->pLDeg();
821 ecart = d - FDeg;
822 return d;
823}
int ecart
Definition: kutil.h:78

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN  use_last)

Definition at line 824 of file kInline.h.

825{
826 FDeg = this->pFDeg();
827 long d = this->pLDeg(use_last);
828 ecart = d - FDeg;
829 return d;
830}

◆ SetLength()

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

Definition at line 838 of file kInline.h.

839{
840 if (length_pLength)
841 {
842 length = this->GetpLength();
843 }
844 else
845 this->pLDeg();
846 return length;
847}

◆ SetLmTail()

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

Definition at line 604 of file kInline.h.

605{
606
607 Set(lm, _tailRing);
608 if (use_bucket)
609 {
610 bucket = kBucketCreate(_tailRing);
611 kBucketInit(bucket, p_tail, p_Length);
612 pNext(lm) = NULL;
613 pLength = 0;
614 }
615 else
616 {
617 pNext(lm) = p_tail;
618 pLength = p_Length + 1;
619 }
620}
p_Length
Definition: p_Procs_Impl.h:123

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 758 of file kInline.h.

759{
760 if (t_p != NULL)
761 {
763 }
764 else
765 {
767 }
768}
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition: p_polys.cc:4809

◆ ShallowCopyDelete()

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

Definition at line 747 of file kInline.h.

749{
750 if (bucket != NULL)
751 kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
752 p_shallow_copy_delete);
753 sTObject::ShallowCopyDelete(new_tailRing,
754 new_tailRing->PolyBin,p_shallow_copy_delete,
755 FALSE);
756}
#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 879 of file kInline.h.

880{
881 if (p1 == NULL) return NULL;
882 if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
883 assume(i_r1 >= 0 && i_r1 <= s->tl);
884 TObject* T = s->R[i_r1];
885 assume(T->p == p1);
886 return T;
887}
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:718
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 900 of file kInline.h.

902{
903 if (p1 == NULL)
904 {
905 T_1 = NULL;
906 T_2 = NULL;
907 return;
908 }
909 assume(p1 != NULL && p2 != NULL);
910 if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
911 if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
912 assume(i_r1 >= 0 && i_r1 <= strat->tl);
913 assume(i_r2 >= 0 && i_r2 <= strat->tl);
914 T_1 = strat->R[i_r1];
915 T_2 = strat->R[i_r2];
916 assume(T_1->p == p1);
917 assume(T_2->p == p2);
918 return;
919}
KINLINE TObject * T_2(const skStrategy *strat)
Definition: kInline.h:889
poly p2
Definition: kutil.h:188
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:879
TSet T
Definition: kutil.h:327
TObject ** R
Definition: kutil.h:343
int tl
Definition: kutil.h:353

◆ T_2()

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

Definition at line 889 of file kInline.h.

890{
891 if (p1 == NULL) return NULL;
892 assume(p2 != NULL);
893 if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
894 assume(i_r2 >= 0 && i_r2 <= strat->tl);
895 TObject* T = strat->R[i_r2];
896 assume(T->p == p2);
897 return T;
898}

◆ Tail_Minus_mm_Mult_qq()

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

Definition at line 636 of file kInline.h.

638{
639 if (bucket != NULL)
640 {
641 kBucket_Minus_m_Mult_p(bucket, m, q, &lq, spNoether);
642 }
643 else
644 {
645 if (lq<=0) lq= ::pLength(q);
646 poly _p = (t_p != NULL ? t_p : p);
647 assume(_p != NULL);
648
649 int lp=pLength-1;
650 pNext(_p) = p_Minus_mm_Mult_qq( pNext(_p), m, q, lp, lq,
651 spNoether, tailRing );
652 pLength=lp+1;
653// tailRing->p_Procs->p_Minus_mm_Mult_qq(pNext(_p), m, q, shorter,spNoether, tailRing, last);
654// pLength += lq - shorter;
655 }
656}
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:1030

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number  n)

Definition at line 622 of file kInline.h.

623{
624 if (bucket != NULL)
625 {
627 }
628 else
629 {
630 poly _p = (t_p != NULL ? t_p : p);
631 assume(_p != NULL);
632 pNext(_p) = __p_Mult_nn(pNext(_p), n, tailRing);
633 }
634}
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:931

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: