My Project
Loading...
Searching...
No Matches
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 184 of file kutil.h.

Constructor & Destructor Documentation

◆ sLObject() [1/3]

KINLINE sLObject::sLObject ( ring tailRing = currRing)

Definition at line 600 of file kInline.h.

601{
602 Init(r);
603}
KINLINE void Init(ring tailRing=currRing)
Definition kInline.h:592

◆ sLObject() [2/3]

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

Definition at line 604 of file kInline.h.

605{
606 Init(r);
607 Set(p_in, r);
608}
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 610 of file kInline.h.

611{
612 Init(t_r);
613 Set(p_in, c_r, t_r);
614}

Member Function Documentation

◆ CanonicalizeP()

KINLINE void sLObject::CanonicalizeP ( )

Definition at line 361 of file kInline.h.

362{
363 if (bucket != NULL)
365}
kBucket_pt bucket
Definition kutil.h:193
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 578 of file kInline.h.

579{
581 sev = 0;
582}
unsigned long sev
Definition kutil.h:188
KINLINE void Clear()
Definition kInline.h:213

◆ Comp()

KINLINE long sLObject::Comp ( )

Definition at line 896 of file kInline.h.

897{
898 poly pp;
899 ring r;
900 GetLm(pp, r);
901 assume(pp != NULL);
902 return p_GetComp(pp, r);
903}
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f ).
Definition cf_gcd.cc:676
KINLINE poly GetLm(ring r)
Definition kInline.h:262
#define assume(x)
Definition mod2.h:389
#define p_GetComp(p, r)
Definition monomials.h:64

◆ Copy()

KINLINE void sLObject::Copy ( )

Definition at line 803 of file kInline.h.

804{
805 if (bucket != NULL)
806 {
808 kBucket_pt new_bucket = kBucketCreate(tailRing);
809 kBucketInit(new_bucket,
810 p_Copy(bucket->buckets[i], tailRing),
811 bucket->buckets_length[i]);
812 bucket = new_bucket;
813 if (t_p != NULL) pNext(t_p) = NULL;
814 if (p != NULL) pNext(p) = NULL;
815 }
816 TObject::Copy();
817}
int i
Definition cfEzgcd.cc:132
poly p
Definition kutil.h:74
poly t_p
Definition kutil.h:75
ring tailRing
Definition kutil.h:77
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
kBucket * kBucket_pt
Definition ring.h:26

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 585 of file kInline.h.

586{
588 if (bucket != NULL)
590}
KINLINE void Delete()
Definition kInline.h:199
void kBucketDeleteAndDestroy(kBucket_pt *bucket_pt)
Definition kbuckets.cc:223

◆ GetP()

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

Definition at line 753 of file kInline.h.

754{
755 //kTest_L(this);
756 if (p == NULL)
757 {
759 ((lmBin!=NULL)?lmBin:currRing->PolyBin));
760 FDeg = pFDeg();
761 }
762 else if ((lmBin != NULL) && (lmBin != currRing->PolyBin))
763 {
765 FDeg = pFDeg();
766 }
767
768 if (bucket != NULL)
769 {
772 pLength++;
773 if (t_p != NULL) pNext(t_p) = pNext(p);
774 }
775 //kTest_L(this);
776 return p;
777}
int pLength
Definition kutil.h:81
KINLINE long pFDeg() const
Definition kInline.h:422
long FDeg
Definition kutil.h:78
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition kbuckets.cc:521
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition kbuckets.cc:216
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
Definition kInline.h:968
static poly p_LmShallowCopyDelete(poly p, const ring r)
Definition p_polys.h:1414
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 864 of file kInline.h.

865{
866 if (bucket == NULL)
867 return sTObject::GetpLength();
869 return bucket->buckets_length[i] + 1;
870}
KINLINE int GetpLength()
Definition kInline.h:293

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 737 of file kInline.h.

738{
739 //kTest_L(this);
740 poly tp = GetLmTailRing();
741 assume(tp != NULL);
742
743 if (bucket != NULL)
744 {
747 pLength++;
748 }
749 return tp;
750}
KINLINE poly GetLmTailRing()
Definition kInline.h:249

◆ HeadNormalize()

KINLINE void sLObject::HeadNormalize ( )

Definition at line 367 of file kInline.h.

368{
369 if (t_p != NULL)
370 {
372 if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
373 }
374 else
375 {
377 }
378}
#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 592 of file kInline.h.

593{
594 memset(this, 0, sizeof(sLObject));
595 i_r1 = -1;
596 i_r2 = -1;
597 i_r = -1;
598 Set(r);
599}
int i_r1
Definition kutil.h:194
KINLINE sLObject(ring tailRing=currRing)
Definition kInline.h:600
int i_r2
Definition kutil.h:194
int i_r
Definition kutil.h:82

◆ LmDeleteAndIter()

KINLINE void sLObject::LmDeleteAndIter ( )

Definition at line 691 of file kInline.h.

692{
694 if (bucket != NULL)
695 {
696 poly _p = kBucketExtractLm(bucket);
697 if (_p == NULL)
698 {
700 p = t_p = NULL;
701 return;
702 }
703 Set(_p, tailRing);
704 }
705 else
706 {
707 pLength--;
708 }
709}
KINLINE void LmDeleteAndIter()
Definition kInline.h:313
poly kBucketExtractLm(kBucket_pt bucket)
Definition kbuckets.cc:511

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 711 of file kInline.h.

712{
713 poly ret = GetLmTailRing();
714 poly pn;
715
716 assume(p != NULL || t_p != NULL);
717
718 if (bucket != NULL)
719 {
721 if (pn == NULL)
723 }
724 else
725 {
726 pn = pNext(ret);
727 }
728 pLength--;
729 pNext(ret) = NULL;
730 if (p != NULL && t_p != NULL)
732
733 Set(pn, tailRing);
734 return ret;
735}
static void p_LmFree(poly p, ring)
Definition p_polys.h:685

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 881 of file kInline.h.

882{
883 poly tp = GetLmTailRing();
884 assume(tp != NULL);
885 if (bucket != NULL)
886 {
888 pNext(tp) = bucket->buckets[i];
889 long m = p_MinComp(tp, tailRing);
890 pNext(tp) = NULL;
891 return m;
892 }
893 else
894 return p_MinComp(tp, tailRing);
895}
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 347 of file kInline.h.

348{
349 if (t_p != NULL)
350 {
352 if (p != NULL) pSetCoeff0(p, pGetCoeff(t_p));
353 }
354 else
355 {
356 pNormalize(p);
357 }
359}
void kBucketNormalize(kBucket_pt bucket)
apply n_Normalize to all coefficients
#define pNormalize(p)
Definition polys.h:318

◆ operator=()

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

Definition at line 905 of file kInline.h.

906{
907 memcpy(this, &t, sizeof(sTObject));
908 return *this;
909}
KINLINE sTObject(ring tailRing=currRing)
Definition kInline.h:116

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 819 of file kInline.h.

820{
821 poly tp = GetLmTailRing();
822 assume(tp != NULL);
823 if (bucket != NULL)
824 {
826 pNext(tp) = bucket->buckets[i];
827 long ldeg = tailRing->pLDeg(tp, &length, tailRing);
828 pNext(tp) = NULL;
829 return ldeg;
830 }
831 else
832 return tailRing->pLDeg(tp, &length, tailRing);
833}
int length
Definition kutil.h:80

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN use_last)

Definition at line 834 of file kInline.h.

835{
836 if (! deg_last || bucket != NULL) return sLObject::pLDeg();
837
838 long ldeg;
839 ldeg = tailRing->pLDeg(GetLmTailRing(), &length, tailRing);
840#ifndef SING_NDEBUG
841 if ( pLength == 0)
844#else
846#endif
847 return ldeg;
848}
KINLINE long pLDeg()
Definition kInline.h:819
poly p_Last(const poly p, int &l, const ring r)
Definition p_polys.cc:4788
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition ring.h:731

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN use_bucket)

Definition at line 616 of file kInline.h.

617{
618 if (bucket == NULL)
619 {
620 unsigned l = GetpLength();
621 if (use_bucket)
622 {
624 if (l>1)
625 {
626 poly tp = GetLmTailRing();
627 assume((int)l == ::pLength(tp));
628 kBucketInit(bucket, pNext(tp), l-1);
629 pNext(tp) = NULL;
630 if (p!=NULL) pNext(p) = NULL;
631 pLength = 0;
632 }
633 }
634 }
635}
int l
Definition cfEzgcd.cc:100
KINLINE int GetpLength()
Definition kInline.h:864

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 850 of file kInline.h.

851{
852 FDeg = this->pFDeg();
853 long d = this->pLDeg();
854 ecart = d - FDeg;
855 return d;
856}
int ecart
Definition kutil.h:79

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN use_last)

Definition at line 857 of file kInline.h.

858{
859 FDeg = this->pFDeg();
860 long d = this->pLDeg(use_last);
861 ecart = d - FDeg;
862 return d;
863}

◆ SetLength()

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

Definition at line 871 of file kInline.h.

872{
873 if (length_pLength)
874 {
875 length = this->GetpLength();
876 }
877 else
878 this->pLDeg();
879 return length;
880}

◆ SetLmTail()

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

Definition at line 637 of file kInline.h.

638{
639
640 Set(lm, _tailRing);
641 if (use_bucket)
642 {
643 bucket = kBucketCreate(_tailRing);
644 kBucketInit(bucket, p_tail, p_Length);
645 pNext(lm) = NULL;
646 pLength = 0;
647 }
648 else
649 {
650 pNext(lm) = p_tail;
651 pLength = p_Length + 1;
652 }
653}
p_Length

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 791 of file kInline.h.

792{
793 if (t_p != NULL)
794 {
796 }
797 else
798 {
800 }
801}
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition p_polys.cc:4947

◆ ShallowCopyDelete()

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

Definition at line 780 of file kInline.h.

782{
783 if (bucket != NULL)
784 kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
785 p_shallow_copy_delete);
786 sTObject::ShallowCopyDelete(new_tailRing,
787 new_tailRing->PolyBin,p_shallow_copy_delete,
788 FALSE);
789}
#define FALSE
Definition auxiliary.h:97
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
Definition kInline.h:381
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 911 of file kInline.h.

912{
913 if (p1 == NULL) return NULL;
914 if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
915 assume(i_r1 >= 0 && i_r1 <= s->tl);
916 TObject* T = s->R[i_r1];
917 assume(T->p == p1);
918 return T;
919}
poly p1
Definition kutil.h:189
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:703
class sTObject TObject
Definition kutil.h:58

◆ T_1_2()

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

Definition at line 932 of file kInline.h.

934{
935 if (p1 == NULL)
936 {
937 T_1 = NULL;
938 T_2 = NULL;
939 return;
940 }
941 assume(p1 != NULL && p2 != NULL);
942 if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
943 if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
944 assume(i_r1 >= 0 && i_r1 <= strat->tl);
945 assume(i_r2 >= 0 && i_r2 <= strat->tl);
946 T_1 = strat->R[i_r1];
947 T_2 = strat->R[i_r2];
948 assume(T_1->p == p1);
949 assume(T_2->p == p2);
950 return;
951}
KINLINE TObject * T_2(const skStrategy *strat)
Definition kInline.h:921
poly p2
Definition kutil.h:189
KINLINE TObject * T_1(const skStrategy *strat)
Definition kInline.h:911
TSet T
Definition kutil.h:325
TObject ** R
Definition kutil.h:339
int tl
Definition kutil.h:349

◆ T_2()

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

Definition at line 921 of file kInline.h.

922{
923 if (p1 == NULL) return NULL;
924 assume(p2 != NULL);
925 if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
926 assume(i_r2 >= 0 && i_r2 <= strat->tl);
927 TObject* T = strat->R[i_r2];
928 assume(T->p == p2);
929 return T;
930}

◆ Tail_Minus_mm_Mult_qq()

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

Definition at line 669 of file kInline.h.

671{
672 if (bucket != NULL)
673 {
674 kBucket_Minus_m_Mult_p(bucket, m, q, &lq, spNoether);
675 }
676 else
677 {
678 if (lq<=0) lq= ::pLength(q);
679 poly _p = (t_p != NULL ? t_p : p);
680 assume(_p != NULL);
681
682 int lp=pLength-1;
683 pNext(_p) = p_Minus_mm_Mult_qq( pNext(_p), m, q, lp, lq,
684 spNoether, tailRing );
685 pLength=lp+1;
686// tailRing->p_Procs->p_Minus_mm_Mult_qq(pNext(_p), m, q, shorter,spNoether, tailRing, last);
687// pLength += lq - shorter;
688 }
689}
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
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:1077

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number n)

Definition at line 655 of file kInline.h.

656{
657 if (bucket != NULL)
658 {
660 }
661 else
662 {
663 poly _p = (t_p != NULL ? t_p : p);
664 assume(_p != NULL);
665 pNext(_p) = __p_Mult_nn(pNext(_p), n, tailRing);
666 }
667}
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 193 of file kutil.h.

◆ checked

unsigned sLObject::checked

Definition at line 195 of file kutil.h.

◆ i_r1

int sLObject::i_r1

Definition at line 194 of file kutil.h.

◆ i_r2

int sLObject::i_r2

Definition at line 194 of file kutil.h.

◆ lcm

poly sLObject::lcm

Definition at line 192 of file kutil.h.

◆ p1

poly sLObject::p1

Definition at line 189 of file kutil.h.

◆ p2

poly sLObject::p2

Definition at line 189 of file kutil.h.

◆ prod_crit

BOOLEAN sLObject::prod_crit

Definition at line 200 of file kutil.h.

◆ sev

unsigned long sLObject::sev

Definition at line 188 of file kutil.h.


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