Changeset 0d1a36 in git


Ignore:
Timestamp:
Mar 24, 2017, 6:38:29 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
94d691b55047cb8f22bc2c71361f61736cce019f
Parents:
a5db0e98aec0db35009110daba5e79981bcc3fbc
Message:
Revert "chg: unsigned for buckets and consequences"

This reverts commit a5db0e98aec0db35009110daba5e79981bcc3fbc.
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/janet.h

    ra5db0e r0d1a36  
    1616  poly root; //poly for parent, NULL for prol
    1717  kBucket_pt root_b;
    18   unsigned root_l;
     18  int root_l;
    1919  poly history; //parent
    2020  poly lead; //leading monomial for prolongation
  • kernel/GBEngine/kInline.h

    ra5db0e r0d1a36  
    568568}
    569569
    570 KINLINE void sLObject::Tail_Minus_mm_Mult_qq(poly m, poly q, unsigned lq,
     570KINLINE void sLObject::Tail_Minus_mm_Mult_qq(poly m, poly q, int lq,
    571571                                             poly spNoether)
    572572{
     
    581581    assume(_p != NULL);
    582582
    583     unsigned lp=pLength-1;
     583    int lp=pLength-1;
    584584    pNext(_p) = p_Minus_mm_Mult_qq( pNext(_p), m, q, lp, lq,
    585585                                    spNoether, tailRing );
  • kernel/GBEngine/kspoly.cc

    ra5db0e r0d1a36  
    793793  (void) ksCheckCoeff(&lc1, &lc2, currRing->cf);
    794794
    795   unsigned l1=0;
    796   unsigned l2=0;
     795  int l1=0, l2=0;
    797796
    798797  if (p_GetComp(p1, currRing)!=p_GetComp(p2, currRing))
     
    841840  if (spNoether != NULL)
    842841  {
    843     l2 = 0;
     842    l2 = -1;
    844843    a2 = tailRing->p_Procs->pp_Mult_mm_Noether(a2, m2, spNoether, l2, tailRing);
    845844    assume(l2 == pLength(a2));
  • kernel/GBEngine/kutil.h

    ra5db0e r0d1a36  
    7979  long FDeg;    // pFDeg(p)
    8080  int ecart,
    81     length;     // as of pLDeg
    82   unsigned  pLength;    // either == 0, or == pLength(p)
    83   int  i_r;        // index of TObject in R set, or -1 if not in T
     81    length,     // as of pLDeg
     82    pLength,    // either == 0, or == pLength(p)
     83    i_r;        // index of TObject in R set, or -1 if not in T
    8484  BOOLEAN is_normalized; // true, if pNorm was called on p, false otherwise
    8585  // used in incremental sba() with F5C:
     
    217217  KINLINE void SetLmTail(poly lm, poly new_p, int length,
    218218                         int use_bucket, ring r);
    219   KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, unsigned lq, poly spNoether);
     219  KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether);
    220220  KINLINE void Tail_Mult_nn(number n);
    221221  // deletes bucket, makes sure that p and t_p exists
  • kernel/GBEngine/syz.cc

    ra5db0e r0d1a36  
    223223void syGaussForOne(ideal syz, int elnum, int ModComp,int from,int till)
    224224{
    225   unsigned lu;
     225  int /*k,j,i,*/lu;
    226226  poly unit1,unit2;
    227227  poly actWith=syz->m[elnum];
  • kernel/GBEngine/syz.h

    ra5db0e r0d1a36  
    2626                 int   syzind;
    2727                 int   order;
    28                  unsigned length;
     28                 int  length;
    2929                 int   reference;
    3030               };
  • kernel/GBEngine/syz0.cc

    ra5db0e r0d1a36  
    511511  ideal result=idInit(16,Fl);
    512512  int i,j,l,k,kkk,/*rkF,*/Sl=0,syComponentOrder=currRing->ComponentOrder;
    513   int wend,lini,gencQ=0;
    514   unsigned ltR;
     513  int /*fstart,*/wend,lini,ltR,gencQ=0;
    515514  intvec *newmodcomp;
    516515  int *Flength;
  • kernel/GBEngine/syz1.cc

    ra5db0e r0d1a36  
    855855          }
    856856        }
    857         unsigned lb;
     857        int lb;
    858858        kBucketClear(syzstr->bucket,&tso.p,&lb);
    859859      }
     
    21602160                        intvec * toStrip)
    21612161{
    2162   int ii=0,i,tc;
    2163   unsigned ltS=0;
    2164   unsigned lp;
     2162  int ii=0,i,tc,lp,ltS=-1;
    21652163  poly p,mp=NULL,pp;
    21662164  SSet sPairs=syzstr->resPairs[index];
     
    21832181      tc = pGetComp(sPairs[i].isNotMinimal);
    21842182      //p = pTakeOutComp1(&tempStripped,tc);
    2185       unsigned lu;
     2183      int lu;
    21862184      pTakeOutComp(&tempStripped,tc,&p,&lu);
    21872185      kBucketTakeOutComp(syzstr->bucket,tc,&mp,&lp);
     
    21912189        p = pNext(mp);
    21922190        pNext(mp) = NULL;
    2193         ltS = 0;
     2191        ltS = -1;
    21942192        kBucket_Minus_m_Mult_p(syzstr->bucket,mp,tempStripped,&ltS);
    21952193        pDelete(&mp);
  • kernel/GBEngine/syz2.cc

    ra5db0e r0d1a36  
    400400  poly p=pDivide(q,redWith.p);
    401401  pSetCoeff(p,nDiv(pGetCoeff(q),pGetCoeff(redWith.p)));
    402   unsigned il=0;
     402  int il=-1;
    403403  kBucket_Minus_m_Mult_p(syzstr->syz_bucket,p,redWith.syz,&il,NULL);
    404404  pLmDelete(&p);
     
    409409  ideal redWith=syzstr->res[index];
    410410  if (redWith==NULL) return toRed;
    411   unsigned j=IDELEMS(redWith);
    412   unsigned i;
     411  int j=IDELEMS(redWith),i;
    413412  poly q,result=NULL,resultp;
    414413
     
    505504  int kres=(*syzstr->Tl)[index];
    506505  int toGo=0;
    507   unsigned il;
     506  int il;
    508507  SSet redset=syzstr->resPairs[index];
    509508  poly q;
  • kernel/GBEngine/syz3.cc

    ra5db0e r0d1a36  
    472472* performs the modification of a single reduction on the syzygy-level
    473473*/
    474 static inline void sySPRedSyz_Kosz(syStrategy syzstr,poly redWith,poly syz,poly q=NULL,unsigned l_syz=0)
     474inline void sySPRedSyz_Kosz(syStrategy syzstr,poly redWith,poly syz,poly q=NULL,int l_syz=-1)
    475475{
    476476  poly p=pDivide(q,redWith);
     
    514514*/
    515515static poly syRedTailSyz(poly tored,ideal red,ideal sec_red,int crit_comp,syStrategy syzstr,
    516             int * gen_length,int * secgen_length,unsigned * tored_length)
    517 {
    518   int i=IDELEMS(red)-1,num_mon;
    519   unsigned num_tail;
     516            int * gen_length,int * secgen_length,int * tored_length)
     517{
     518  int i=IDELEMS(red)-1,num_mon,num_tail;
    520519  poly h,hn;
    521520  // BOOLEAN dummy;
     
    660659  int og_idel=IDELEMS(old_generators),ng_place=IDELEMS(new_generators);
    661660  int toReplace=0;
    662   int i;
    663   unsigned syz_l, j;
     661  int i,j,syz_l;
    664662  number /*coefgcd,*/n;
    665663  polyset ogm=old_generators->m;
     
    708706      p = pNeg(p);
    709707      pp = pCopy(old_repr->m[tso.ind2]);
    710       unsigned il=0;
     708      int il=-1;
    711709      while (p!=NULL)
    712710      {
     
    718716      p_Shift(&p,-1,currRing);
    719717      pp = pCopy(old_repr->m[tso.ind1]);
    720       il=0;
     718      il=-1;
    721719      while (p!=NULL)
    722720      {
     
    10281026*/
    10291027static poly normalize(poly next_p,ideal add_generators, syStrategy syzstr,
    1030                       int * g_l,unsigned * p_l,int crit_comp)
     1028                      int * g_l,int * p_l,int crit_comp)
    10311029{
    10321030  int j=0,i=IDELEMS(add_generators);
     
    11941192  assume (tso.lcm!=NULL);
    11951193  int ng_place=IDELEMS(new_generators);
    1196   unsigned i,j;
     1194  int i,j;
    11971195  number n;
    11981196  poly p;
     
    14221420  int idel_temp=IDELEMS(temp_generators);
    14231421  int next_place_add;
    1424   int red_deg,l_pairs=IDELEMS(add_generators);
    1425   unsigned p_length;
     1422  int p_length,red_deg,l_pairs=IDELEMS(add_generators);
    14261423  poly next_p;
    14271424  int * gen_length=(int*)omAlloc0(IDELEMS(add_generators)*sizeof(int));
     
    15511548  ideal old_generators= syzstr->res[index];
    15521549  ideal old_repr= syzstr->orderedRes[index];
    1553   int i,j=0,ii=IDELEMS(old_generators)-1;
    1554   unsigned dummy;
     1550  int i,j=0,ii=IDELEMS(old_generators)-1,dummy;
    15551551  poly p;
    15561552  number n;
  • kernel/GBEngine/tgb.cc

    ra5db0e r0d1a36  
    5353static BOOLEAN has_t_rep(const int & arg_i, const int & arg_j, slimgb_alg* state);
    5454static void shorten_tails(slimgb_alg* c, poly monom);
    55 static poly redNF2 (poly h,slimgb_alg* c , unsigned &len, number&  m,int n=0);
     55static poly redNF2 (poly h,slimgb_alg* c , int &len, number&  m,int n=0);
    5656static poly redNFTail (poly h,const int sl,kStrategy strat, int len);
    5757static int bucket_guess(kBucket* bucket);
     
    18351835}
    18361836
    1837 static poly redNF2 (poly h, slimgb_alg * c, unsigned &len, number & m, int n)
     1837static poly redNF2 (poly h, slimgb_alg * c, int &len, number & m, int n)
    18381838{
    18391839  m = nInit (1);
     
    27912791//       now_t_rep(s->j,s->i,c);
    27922792    number coef;
    2793     unsigned mlen = pLength (h);
     2793    int mlen = pLength (h);
    27942794    p_Test (h, c->r);
    27952795    if((!c->nc) & (!(use_noro)))
     
    29322932  for(j = 0; j < i; j++)
    29332933  {
    2934     unsigned len;
     2934    int len;
    29352935    poly p;
    29362936    buf[j].flatten ();
     
    47034703      for(i = 0; i < pn_noro; i++)
    47044704      {
    4705         unsigned dummy_len;
     4705        int dummy_len;
    47064706        poly p;
    47074707        los[i].p = NULL;
     
    48664866{
    48674867  flatten ();
    4868   unsigned l;
     4868  int l;
    48694869  kBucketClear (bucket, &p, &l);
    48704870  return l;
     
    49344934  int rn = erg.reduce_by;
    49354935  poly red;
    4936   unsigned red_len;
     4936  int red_len;
    49374937  simple_reducer *pointer;
    49384938  BOOLEAN work_on_copy = FALSE;
  • kernel/GBEngine/tgb_internal.h

    ra5db0e r0d1a36  
    384384{
    385385  poly expand;
    386   unsigned expand_length;
     386  int expand_length;
    387387  int to_reduce_u;
    388388  int to_reduce_l;
  • kernel/digitech.cc

    ra5db0e r0d1a36  
    3838  }
    3939
    40   unsigned len;
     40  int len=0;
    4141  poly erg;
    4242  kBucketClear(erg_bucket,&erg, &len);
     
    8080  }
    8181  omfree(potences);
    82   unsigned len=0;
     82  int len=0;
    8383  poly erg;
    8484  kBucketClear(erg_bucket,&erg, &len);
  • kernel/fast_mult.cc

    ra5db0e r0d1a36  
    665665  omfree(facult);
    666666  omfree(f_terms);
    667   unsigned len=0;
     667  int len=0;
    668668  poly erg;
    669669  kBucketClear(erg_bucket,&erg, &len);
  • kernel/linear_algebra/MinorProcessor.cc

    ra5db0e r0d1a36  
    13201320   or at least an integral domain. */
    13211321void elimOperationBucket(poly &p1, poly &p2, poly &p3, poly &p4, poly &p5,
    1322                          number &c5, unsigned p5Len)
     1322                         number &c5, int p5Len)
    13231323{
    13241324#ifdef COUNT_AND_PRINT_OPERATIONS
  • kernel/polys.h

    ra5db0e r0d1a36  
    319319/// component == comp and *p of all other monoms *lq == pLength(*q)
    320320/// On return all components pf *q == 0
    321 static inline void pTakeOutComp(poly *p, long comp, poly *q, unsigned *lq, const ring R = currRing)
     321inline void pTakeOutComp(poly *p, long comp, poly *q, int *lq, const ring R = currRing)
    322322{
    323323  return p_TakeOutComp(p, comp, q, lq, R);
     
    326326
    327327/// This is something weird -- Don't use it, unless you know what you are doing
    328 static inline poly pTakeOutComp(poly * p, int k, const ring R = currRing)
     328inline poly      pTakeOutComp(poly * p, int k, const ring R = currRing)
    329329{
    330330  return p_TakeOutComp(p, k, R);
     
    343343#define   pDeleteComp(p,k) p_DeleteComp(p,k,currRing)
    344344
    345 static inline void pNorm(poly p, const ring R = currRing){ p_Norm(p, R); }
     345inline void pNorm(poly p, const ring R = currRing){ p_Norm(p, R); }
     346
    346347
    347348#define   pSubst(p,n,e) p_Subst(p,n,e,currRing)
     
    385386/// returns the length of a polynomial (numbers of monomials)
    386387/// respect syzComp
    387 static inline poly pLast(poly a, unsigned &length) { return p_Last (a, length, currRing); }
    388 static inline poly pLast(poly a) { unsigned l; return pLast(a, l); }
     388static inline poly pLast(poly a, int &length) { return p_Last (a, length, currRing); }
     389static inline poly pLast(poly a) { int l; return pLast(a, l); }
    389390
    390391/***************************************************************
  • libpolys/polys/kbuckets.cc

    ra5db0e r0d1a36  
    366366  poly p = bucket->buckets[1];
    367367  poly lm;
    368   unsigned pl = bucket->buckets_length[1];
     368  int pl = bucket->buckets_length[1];//, i;
    369369  int i;
    370370  bucket->buckets[1] = NULL;
     
    432432}
    433433
    434 void kBucketClear(kBucket_pt bucket, poly *p, unsigned *length)
     434void kBucketClear(kBucket_pt bucket, poly *p, int *length)
    435435{
    436436  int i = kBucketCanonicalize(bucket);
     
    537537/// Bucket number i from bucket is out of length sync, resync
    538538///
    539 void kBucketAdjust(kBucket_pt bucket, int i)
    540 {
     539void kBucketAdjust(kBucket_pt bucket, int i) {
     540
    541541  MULTIPLY_BUCKET(bucket,i);
    542542
    543   unsigned l1 = bucket->buckets_length[i];
     543  int l1 = bucket->buckets_length[i];
    544544  poly p1 = bucket->buckets[i];
    545545  bucket->buckets[i] = NULL;
     
    631631  assume(*l <= 0 || pLength(q) == *l);
    632632
    633   unsigned i, l1;
     633  int i, l1;
    634634  ring r = bucket->bucket_ring;
    635635
     
    688688/// Does not destroy p and m
    689689/// assume (*l <= 0 || pLength(p) == *l)
    690 void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, unsigned *l,
     690void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l,
    691691                            poly spNoether)
    692692{
    693   assume(*l == 0 || pLength(p) == *l);
    694   unsigned i, l1;
     693  assume(*l <= 0 || pLength(p) == *l);
     694  int i, l1;
    695695  poly p1 = p;
    696696  ring r = bucket->bucket_ring;
    697697
    698   if (*l == 0)
     698  if (*l <= 0)
    699699  {
    700700    l1 = pLength(p1);
     
    797797    assume((!rIsPluralRing(bucket->bucket_ring))||p_IsConstant(m, bucket->bucket_ring));
    798798  assume(l <= 0 || pLength(p) == l);
    799   unsigned i, l1;
     799  int i, l1;
    800800  poly p1 = p;
    801801  ring r = bucket->bucket_ring;
     
    10121012void kBucketTakeOutComp(kBucket_pt bucket,
    10131013                        long comp,
    1014                         poly *r_p, unsigned *l)
     1014                        poly *r_p, int *l)
    10151015{
    10161016  poly p = NULL, q;
    1017   unsigned i, lp = 0, lq;
     1017  int i, lp = 0, lq;
    10181018
    10191019#ifndef HAVE_PSEUDO_BUCKETS
     
    10521052
    10531053number kBucketPolyRed(kBucket_pt bucket,
    1054                       poly p1, unsigned l1,
     1054                      poly p1, int l1,
    10551055                      poly spNoether)
    10561056{
     
    10591059  assume(p1 != NULL &&
    10601060         p_DivisibleBy(p1,  kBucketGetLm(bucket), r));
    1061   assume(pLength(p1) == l1);
     1061  assume(pLength(p1) == (int) l1);
    10621062
    10631063  poly a1 = pNext(p1), lm = kBucketExtractLm(bucket);
  • libpolys/polys/kbuckets.h

    ra5db0e r0d1a36  
    4040// Converts Bpoly into a poly and clears bucket
    4141// i.e., afterwards Bpoly == 0
    42 void kBucketClear(kBucket_pt bucket, poly *p, unsigned *length);
     42void kBucketClear(kBucket_pt bucket, poly *p, int *length);
    4343
    4444inline poly kBucketClear(kBucket_pt bucket)
    4545{
    46   unsigned dummy;
     46  int dummy;
    4747  poly p;
    4848  kBucketClear(bucket, &p, &dummy);
     
    8181// Returns: Lc(p) / gcd(Lc(p), Lc(q))
    8282number kBucketPolyRed(kBucket_pt bucket,
    83                       poly p, unsigned l,
     83                      poly p, int l,
    8484                      poly spNoether);
    8585
     
    9595void kBucketTakeOutComp(kBucket_pt bucket,
    9696                        long comp,
    97                         poly *p, unsigned *l);
     97                        poly *p, int *l);
    9898
    9999//////////////////////////////////////////////////////////////////////////
     
    131131/// Does not destroy p and m (TODO: rename into kBucket_Minus_mm_Mult_pp!?)
    132132/// assume (*l <= 0 || pLength(p) == *l)
    133 void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, unsigned *l,
     133void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l,
    134134                            poly spNother = NULL);
    135135
     
    186186  poly coef[MAX_BUCKET + 1];        // coeff of polys in bucket or NULL : 2..max
    187187#endif
    188   unsigned buckets_length[MAX_BUCKET + 1]; // length if i-th poly
    189   unsigned buckets_used;                    // max number of used bucket
     188  int buckets_length[MAX_BUCKET + 1]; // length if i-th poly
     189  int buckets_used;                    // max number of used bucket
    190190#endif
    191191  ring bucket_ring;
  • libpolys/polys/monomials/p_polys.cc

    ra5db0e r0d1a36  
    34353435// Splits *p into two polys: *q which consists of all monoms with
    34363436// component == comp and *p of all other monoms *lq == pLength(*q)
    3437 void p_TakeOutComp(poly *r_p, long comp, poly *r_q, unsigned *lq, const ring r)
     3437void p_TakeOutComp(poly *r_p, long comp, poly *r_q, int *lq, const ring r)
    34383438{
    34393439  spolyrec pp, qq;
     
    44714471* respect syzComp
    44724472*/
    4473 poly p_Last(const poly p, unsigned &l, const ring r)
     4473poly p_Last(const poly p, int &l, const ring r)
    44744474{
    44754475  if (p == NULL)
  • libpolys/polys/monomials/p_polys.h

    ra5db0e r0d1a36  
    200200// returns the length of a polynomial (numbers of monomials) and the last mon.
    201201// respect syzComp
    202 poly p_Last(const poly a, unsigned &l, const ring r);
     202poly p_Last(const poly a, int &l, const ring r);
    203203
    204204/*----------------------------------------------------*/
     
    883883
    884884/// like p_Add_q, except that if lp == pLength(lp) lq == pLength(lq) then lp == pLength(p+q)
    885 static inline poly p_Add_q(poly p, poly q, unsigned &lp, unsigned lq, const ring r)
     885static inline poly p_Add_q(poly p, poly q, int &lp, int lq, const ring r)
    886886{
    887887  assume( (p != q) || (p == NULL && q == NULL) );
     
    974974}
    975975
    976 static inline poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q,
    977            unsigned &lp, unsigned lq, const poly spNoether, const ring r)
     976static inline poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq,
     977                                     const poly spNoether, const ring r)
    978978{
    979979  int shorter;
     
    11041104
    11051105// returns p + m*q destroys p, const: q, m
    1106 static inline poly p_Plus_mm_Mult_qq(poly p, poly m, poly q, unsigned &lp, unsigned lq,
     1106static inline poly p_Plus_mm_Mult_qq(poly p, poly m, poly q, int &lp, int lq,
    11071107                                const ring r)
    11081108{
     
    11281128static inline poly p_Plus_mm_Mult_qq(poly p, poly m, poly q, const ring r)
    11291129{
    1130   unsigned lp = 0, lq = 0;
     1130  int lp = 0, lq = 0;
    11311131  return p_Plus_mm_Mult_qq(p, m, q, lp, lq, r);
    11321132}
     
    19751975// component == comp and *p of all other monoms *lq == pLength(*q)
    19761976// On return all components pf *q == 0
    1977 void p_TakeOutComp(poly *p, long comp, poly *q, unsigned *lq, const ring r);
     1977void p_TakeOutComp(poly *p, long comp, poly *q, int *lq, const ring r);
    19781978
    19791979// This is something weird -- Don't use it, unless you know what you are doing
  • libpolys/polys/nc/nc.h

    ra5db0e r0d1a36  
    231231// // for p_Plus_mm_Mult_qq in pInline2.h
    232232// returns p + m*q destroys p, const: q, m
    233 poly nc_p_Plus_mm_Mult_qq(poly p, const poly m, const poly q, unsigned &lp,
    234                               const unsigned, const ring r);
     233poly nc_p_Plus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp,
     234                              const int, const ring r);
    235235
    236236
  • libpolys/polys/nc/old.gring.cc

    ra5db0e r0d1a36  
    171171
    172172// returns p + m*q destroys p, const: q, m
    173 poly nc_p_Plus_mm_Mult_qq(poly p, const poly m, const poly q, unsigned &lp,
    174                               const unsigned, const ring r)
     173poly nc_p_Plus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp,
     174                              const int, const ring r)
    175175{
    176176  p = p_Add_q(p, nc_mm_Mult_pp( m, q, r ), r);
  • libpolys/polys/sbuckets.cc

    ra5db0e r0d1a36  
    174174}
    175175
    176 void sBucket_Merge_p(sBucket_pt bucket, poly p, unsigned length)
     176void sBucket_Merge_p(sBucket_pt bucket, poly p, int length)
    177177{
    178178  assume(bucket != NULL);
    179   assume(length == 0 || length == pLength(p));
     179  assume(length <= 0 || length == pLength(p));
    180180
    181181  if (p == NULL) return;
    182   if (length == 0) length = pLength(p);
     182  if (length <= 0) length = pLength(p);
    183183
    184184  int i = LOG2(length);
     
    199199}
    200200
    201 void sBucket_Add_p(sBucket_pt bucket, poly p, unsigned length)
     201void sBucket_Add_p(sBucket_pt bucket, poly p, int length)
    202202{
    203203  assume(bucket != NULL);
     
    271271{
    272272  poly pr = NULL;
    273   unsigned  lr = 0;
    274   unsigned i = 0;
     273  int  lr = 0;
     274  int i = 0;
    275275
    276276  while (bucket->buckets[i].p == NULL)
  • libpolys/polys/sbuckets.h

    ra5db0e r0d1a36  
    8282/// Merges p into Spoly: assumes Bpoly and p have no common monoms
    8383/// destroys p!
    84 void sBucket_Merge_p(sBucket_pt bucket, poly p, unsigned lp);
     84void sBucket_Merge_p(sBucket_pt bucket, poly p, int lp);
    8585
    8686/// adds poly p to bucket
    8787/// destroys p!
    88 void sBucket_Add_p(sBucket_pt bucket, poly p, unsigned lp);
     88void sBucket_Add_p(sBucket_pt bucket, poly p, int lp);
    8989
    9090
  • libpolys/polys/templates/p_Minus_mm_Mult_qq__T.cc

    ra5db0e r0d1a36  
    140140    if (spNoether != NULL)
    141141    {
    142       unsigned ll = 0;
     142      int ll = 0;
    143143      pNext(a) = r->p_Procs->pp_Mult_mm_Noether(q, m, spNoether, ll, r);
    144144      shorter += ll;
  • libpolys/polys/templates/p_Procs.h

    ra5db0e r0d1a36  
    2828typedef poly (*pp_Mult_mm_Proc_Ptr)(poly p, const poly m, const ring r);
    2929typedef poly (*pp_Mult_mm_Noether_Proc_Ptr)(poly p, const poly m,
    30                                             const poly spNoether, unsigned &ll,
     30                                            const poly spNoether, int &ll,
    3131                                            const ring r);
    3232typedef poly (*p_Add_q_Proc_Ptr)(poly p, poly q, int & shorter, const ring r);
  • libpolys/polys/templates/p_kBucketSetLm__T.cc

    ra5db0e r0d1a36  
    3838  {
    3939    j = 0;
    40     for (unsigned i = 1; i<=bucket->buckets_used; i++)
     40    for (int i = 1; i<=bucket->buckets_used; i++)
    4141    {
    4242      if (bucket->buckets[i] != NULL)
  • libpolys/polys/templates/pp_Mult_mm_Noether__T.cc

    ra5db0e r0d1a36  
    1717 *
    1818 ***************************************************************/
    19 LINKAGE poly pp_Mult_mm_Noether__T(poly p, const poly m, const poly spNoether, unsigned &ll, const ring ri)
     19LINKAGE poly pp_Mult_mm_Noether__T(poly p, const poly m, const poly spNoether, int &ll, const ring ri)
    2020{
    2121  p_Test(p, ri);
     
    3838  pAssume(!n_IsZero__T(ln,ri->cf));
    3939  pAssume1(p_GetComp(m, ri) == 0 || p_MaxComp(p, ri) == 0);
     40  int l = 0;
    4041
    4142  do
     
    6364    #endif
    6465    {
     66      l++;
    6567      q = pNext(q) = r;
    6668      pSetCoeff0(q, n);
     
    7173  } while (p != NULL);
    7274
    73   ll = pLength(p);
     75  if (ll < 0)
     76    ll = l;
     77  else
     78    ll = pLength(p);
    7479
    7580  pNext(q) = NULL;
Note: See TracChangeset for help on using the changeset viewer.