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

603{
604 Init(r);
605}
KINLINE void Init(ring tailRing=currRing)
Definition: kInline.h:594

◆ sLObject() [2/3]

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

Definition at line 606 of file kInline.h.

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

613{
614 Init(t_r);
615 Set(p_in, c_r, t_r);
616}

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

581{
583 sev = 0;
584}
unsigned long sev
Definition: kutil.h:187
KINLINE void Clear()
Definition: kInline.h:213

◆ Comp()

KINLINE long sLObject::Comp ( )

Definition at line 895 of file kInline.h.

896{
897 poly pp;
898 ring r;
899 GetLm(pp, r);
900 assume(pp != NULL);
901 return p_GetComp(pp, r);
902}
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 802 of file kInline.h.

803{
804 if (bucket != NULL)
805 {
807 kBucket_pt new_bucket = kBucketCreate(tailRing);
808 kBucketInit(new_bucket,
809 p_Copy(bucket->buckets[i], tailRing),
810 bucket->buckets_length[i]);
811 bucket = new_bucket;
812 if (t_p != NULL) pNext(t_p) = NULL;
813 if (p != NULL) pNext(p) = NULL;
814 }
815 TObject::Copy();
816}
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
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:844

◆ Delete()

KINLINE void sLObject::Delete ( )

Definition at line 587 of file kInline.h.

588{
590 if (bucket != NULL)
592}
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 752 of file kInline.h.

753{
754 //kTest_L(this);
755 if (p == NULL)
756 {
758 ((lmBin!=NULL)?lmBin:currRing->PolyBin));
759 FDeg = pFDeg();
760 }
761 else if ((lmBin != NULL) && (lmBin != currRing->PolyBin))
762 {
764 FDeg = pFDeg();
765 }
766
767 if (bucket != NULL)
768 {
771 pLength++;
772 if (t_p != NULL) pNext(t_p) = pNext(p);
773 }
774 //kTest_L(this);
775 return p;
776}
int pLength
Definition: kutil.h:80
KINLINE long pFDeg() const
Definition: kInline.h:422
long FDeg
Definition: kutil.h:77
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:1391
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 863 of file kInline.h.

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

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 736 of file kInline.h.

737{
738 //kTest_L(this);
739 poly tp = GetLmTailRing();
740 assume(tp != NULL);
741
742 if (bucket != NULL)
743 {
746 pLength++;
747 }
748 return tp;
749}
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 594 of file kInline.h.

595{
596 memset(this, 0, sizeof(sLObject));
597 i_r1 = -1;
598 i_r2 = -1;
599 i_r = -1;
600 Set(r);
601}
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 690 of file kInline.h.

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

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 710 of file kInline.h.

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

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 880 of file kInline.h.

881{
882 poly tp = GetLmTailRing();
883 assume(tp != NULL);
884 if (bucket != NULL)
885 {
887 pNext(tp) = bucket->buckets[i];
888 long m = p_MinComp(tp, tailRing);
889 pNext(tp) = NULL;
890 return m;
891 }
892 else
893 return p_MinComp(tp, tailRing);
894}
int m
Definition: cfEzgcd.cc:128
static long p_MinComp(poly p, ring lmRing, ring tailRing)
Definition: p_polys.h:311

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

◆ operator=()

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

Definition at line 904 of file kInline.h.

905{
906 memset(this, 0, sizeof(*this));
907 memcpy(this, &t, sizeof(sTObject));
908 return *this;
909}
Definition: kutil.h:69

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 818 of file kInline.h.

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

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN  use_last)

Definition at line 833 of file kInline.h.

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

◆ PrepareRed()

KINLINE void sLObject::PrepareRed ( BOOLEAN  use_bucket)

Definition at line 618 of file kInline.h.

619{
620 if (bucket == NULL)
621 {
622 unsigned l = GetpLength();
623 if (use_bucket && (l > 1))
624 {
625 poly tp = GetLmTailRing();
626 assume(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}
int l
Definition: cfEzgcd.cc:100
KINLINE int GetpLength()
Definition: kInline.h:863

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 849 of file kInline.h.

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

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN  use_last)

Definition at line 856 of file kInline.h.

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

◆ SetLength()

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

Definition at line 870 of file kInline.h.

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

◆ SetLmTail()

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

Definition at line 636 of file kInline.h.

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

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 790 of file kInline.h.

791{
792 if (t_p != NULL)
793 {
795 }
796 else
797 {
799 }
800}
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition: p_polys.cc:4780

◆ ShallowCopyDelete()

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

Definition at line 779 of file kInline.h.

781{
782 if (bucket != NULL)
783 kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
784 p_shallow_copy_delete);
785 sTObject::ShallowCopyDelete(new_tailRing,
786 new_tailRing->PolyBin,p_shallow_copy_delete,
787 FALSE);
788}
#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: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: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 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:188
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:911
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 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 668 of file kInline.h.

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

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number  n)

Definition at line 654 of file kInline.h.

655{
656 if (bucket != NULL)
657 {
659 }
660 else
661 {
662 poly _p = (t_p != NULL ? t_p : p);
663 assume(_p != NULL);
664 pNext(_p) = __p_Mult_nn(pNext(_p), n, tailRing);
665 }
666}
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:969

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: