Changeset abe5c8 in git for libpolys/polys/monomials/p_polys.h
- Timestamp:
- Sep 24, 2012, 12:41:08 PM (12 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- f224d8590b63be01aff8b548ab4f2f5dea43b095
- Parents:
- 1592b986a21bcaba5633414189a7b08c5cce6213
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.h
r1592b9 rabe5c8 950 950 else 951 951 { 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); 954 953 } 955 954 } … … 964 963 } 965 964 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_PLURAL973 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 #endif982 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 last994 965 static inline poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq, 995 966 const poly spNoether, const ring r) … … 1004 975 #endif 1005 976 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); 1008 979 lp += lq - shorter; 1009 980 assume( lp == pLength(res) ); … … 1023 994 1024 995 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); 1028 998 } 1029 999 … … 1106 1076 static inline poly pp_Mult_qq(poly p, poly q, const ring r) 1107 1077 { 1108 poly last;1109 1078 if (p == NULL || q == NULL) return NULL; 1110 1079 … … 1115 1084 return nc_mm_Mult_pp(p, q, r); 1116 1085 #endif 1117 return r->p_Procs->pp_Mult_mm(q, p, r , last);1086 return r->p_Procs->pp_Mult_mm(q, p, r); 1118 1087 } 1119 1088 1120 1089 if (pNext(q) == NULL) 1121 1090 { 1122 return r->p_Procs->pp_Mult_mm(p, q, r , last);1091 return r->p_Procs->pp_Mult_mm(p, q, r); 1123 1092 } 1124 1093 … … 1150 1119 1151 1120 // this should be implemented more efficiently 1152 poly res , last;1121 poly res; 1153 1122 int shorter; 1154 1123 number n_old = pGetCoeff(m); … … 1156 1125 n_neg = n_Neg(n_neg, r->cf); 1157 1126 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); 1159 1128 lp = (lp + lq) - shorter; 1160 1129 pSetCoeff0(m, n_old);
Note: See TracChangeset
for help on using the changeset viewer.