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

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

801{
802 if (bucket != NULL)
803 {
805 kBucket_pt new_bucket = kBucketCreate(tailRing);
806 kBucketInit(new_bucket,
807 p_Copy(bucket->buckets[i], tailRing),
808 bucket->buckets_length[i]);
809 bucket = new_bucket;
810 if (t_p != NULL) pNext(t_p) = NULL;
811 if (p != NULL) pNext(p) = NULL;
812 }
813 TObject::Copy();
814}
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 750 of file kInline.h.

751{
752 //kTest_L(this);
753 if (p == NULL)
754 {
756 ((lmBin!=NULL)?lmBin:currRing->PolyBin));
757 FDeg = pFDeg();
758 }
759 else if ((lmBin != NULL) && (lmBin != currRing->PolyBin))
760 {
762 FDeg = pFDeg();
763 }
764
765 if (bucket != NULL)
766 {
769 pLength++;
770 if (t_p != NULL) pNext(t_p) = pNext(p);
771 }
772 //kTest_L(this);
773 return p;
774}
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:965
static poly p_LmShallowCopyDelete(poly p, const ring r)
Definition p_polys.h:1409
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 861 of file kInline.h.

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

◆ GetTP()

KINLINE poly sLObject::GetTP ( )

Definition at line 734 of file kInline.h.

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

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

◆ LmExtractAndIter()

KINLINE poly sLObject::LmExtractAndIter ( )

Definition at line 708 of file kInline.h.

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

◆ MinComp()

KINLINE long sLObject::MinComp ( )

Definition at line 878 of file kInline.h.

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

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

◆ pLDeg() [1/2]

KINLINE long sLObject::pLDeg ( )

Definition at line 816 of file kInline.h.

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

◆ pLDeg() [2/2]

KINLINE long sLObject::pLDeg ( BOOLEAN use_last)

Definition at line 831 of file kInline.h.

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

◆ 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 && (l > 1))
622 {
623 poly tp = GetLmTailRing();
624 assume((int)l == ::pLength(tp));
626 kBucketInit(bucket, pNext(tp), l-1);
627 pNext(tp) = NULL;
628 if (p != NULL) pNext(p) = NULL;
629 pLength = 0;
630 }
631 }
632}
int l
Definition cfEzgcd.cc:100
KINLINE int GetpLength()
Definition kInline.h:861

◆ SetDegStuffReturnLDeg() [1/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( )

Definition at line 847 of file kInline.h.

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

◆ SetDegStuffReturnLDeg() [2/2]

KINLINE long sLObject::SetDegStuffReturnLDeg ( BOOLEAN use_last)

Definition at line 854 of file kInline.h.

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

◆ SetLength()

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

Definition at line 868 of file kInline.h.

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

◆ SetLmTail()

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

Definition at line 634 of file kInline.h.

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

◆ SetShortExpVector()

KINLINE void sLObject::SetShortExpVector ( )

Definition at line 788 of file kInline.h.

789{
790 if (t_p != NULL)
791 {
793 }
794 else
795 {
797 }
798}
unsigned long p_GetShortExpVector(const poly p, const ring r)
Definition p_polys.cc:4889

◆ ShallowCopyDelete()

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

Definition at line 777 of file kInline.h.

779{
780 if (bucket != NULL)
781 kBucketShallowCopyDelete(bucket, new_tailRing, new_tailRing->PolyBin,
782 p_shallow_copy_delete);
783 sTObject::ShallowCopyDelete(new_tailRing,
784 new_tailRing->PolyBin,p_shallow_copy_delete,
785 FALSE);
786}
#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 908 of file kInline.h.

909{
910 if (p1 == NULL) return NULL;
911 if (i_r1 == -1) i_r1 = kFindInT(p1, s->T, s->tl);
912 assume(i_r1 >= 0 && i_r1 <= s->tl);
913 TObject* T = s->R[i_r1];
914 assume(T->p == p1);
915 return T;
916}
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:710
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 929 of file kInline.h.

931{
932 if (p1 == NULL)
933 {
934 T_1 = NULL;
935 T_2 = NULL;
936 return;
937 }
938 assume(p1 != NULL && p2 != NULL);
939 if (i_r1 == -1) i_r1 = kFindInT(p1, strat->T, strat->tl);
940 if (i_r2 == -1) i_r2 = kFindInT(p2, strat->T, strat->tl);
941 assume(i_r1 >= 0 && i_r1 <= strat->tl);
942 assume(i_r2 >= 0 && i_r2 <= strat->tl);
943 T_1 = strat->R[i_r1];
944 T_2 = strat->R[i_r2];
945 assume(T_1->p == p1);
946 assume(T_2->p == p2);
947 return;
948}
KINLINE TObject * T_2(const skStrategy *strat)
Definition kInline.h:918
poly p2
Definition kutil.h:189
KINLINE TObject * T_1(const skStrategy *strat)
Definition kInline.h:908
TSet T
Definition kutil.h:327
TObject ** R
Definition kutil.h:341
int tl
Definition kutil.h:351

◆ T_2()

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

Definition at line 918 of file kInline.h.

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

◆ Tail_Minus_mm_Mult_qq()

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

Definition at line 666 of file kInline.h.

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

◆ Tail_Mult_nn()

KINLINE void sLObject::Tail_Mult_nn ( number n)

Definition at line 652 of file kInline.h.

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