Ignore:
Timestamp:
Sep 24, 2012, 12:41:08 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
f224d8590b63be01aff8b548ab4f2f5dea43b095
Parents:
1592b986a21bcaba5633414189a7b08c5cce6213
Message:
chg: removed parameter last from p_*templates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    r1592b9 rabe5c8  
    950950  else
    951951  {
    952     poly last;
    953     return r->p_Procs->pp_Mult_mm(p, m, r, last);
     952    return r->p_Procs->pp_Mult_mm(p, m, r);
    954953  }
    955954}
     
    964963}
    965964
    966 // like p_Minus_mm_Mult_qq, except that if lp == pLength(lp) lq == pLength(lq)
    967 // then result = p-m*q, lp == pLength(result), last == pLast(result)
    968 static inline poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq,
    969                                  const poly spNoether, poly& last, const ring r)
    970 {
    971   int l;
    972 #ifdef HAVE_PLURAL
    973   if (rIsPluralRing(r))
    974   {
    975     p = nc_p_Minus_mm_Mult_qq(p, m, q, lp, lq, spNoether, r);
    976     last = p_Last(p, l, r);
    977     assume( lp == l );
    978     assume( lp == pLength(p) );
    979     return p;
    980   }
    981 #endif
    982 
    983   int shorter;
    984   const poly res = r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, spNoether, r, last);
    985   lp = (lp + lq) - shorter;
    986   assume( last == p_Last(res, l, r) );
    987   assume( lp == l );
    988   assume( lp == pLength(res) );
    989   return res;
    990 }
    991 
    992 
    993 // like p_Minus_mm_Mult_qq (above) but without last
    994965static inline poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq,
    995966                                      const poly spNoether, const ring r)
     
    1004975#endif
    1005976
    1006   int shorter; poly last;
    1007   const poly res = r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, spNoether, r, last);
     977  int shorter;
     978  const poly res = r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, spNoether, r);
    1008979  lp += lq - shorter;
    1009980  assume( lp == pLength(res) );
     
    1023994
    1024995  int shorter;
    1025   poly last;
    1026 
    1027   return r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, NULL, r, last); // !!!
     996
     997  return r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, NULL, r);
    1028998}
    1029999
     
    11061076static inline poly pp_Mult_qq(poly p, poly q, const ring r)
    11071077{
    1108   poly last;
    11091078  if (p == NULL || q == NULL) return NULL;
    11101079
     
    11151084      return nc_mm_Mult_pp(p, q, r);
    11161085#endif
    1117     return r->p_Procs->pp_Mult_mm(q, p, r, last);
     1086    return r->p_Procs->pp_Mult_mm(q, p, r);
    11181087  }
    11191088
    11201089  if (pNext(q) == NULL)
    11211090  {
    1122     return r->p_Procs->pp_Mult_mm(p, q, r, last);
     1091    return r->p_Procs->pp_Mult_mm(p, q, r);
    11231092  }
    11241093
     
    11501119
    11511120// this should be implemented more efficiently
    1152   poly res, last;
     1121  poly res;
    11531122  int shorter;
    11541123  number n_old = pGetCoeff(m);
     
    11561125  n_neg = n_Neg(n_neg, r->cf);
    11571126  pSetCoeff0(m, n_neg);
    1158   res = r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, NULL, r, last);
     1127  res = r->p_Procs->p_Minus_mm_Mult_qq(p, m, q, shorter, NULL, r);
    11591128  lp = (lp + lq) - shorter;
    11601129  pSetCoeff0(m, n_old);
Note: See TracChangeset for help on using the changeset viewer.