- Timestamp:
- May 17, 2016, 5:26:29 PM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 6f203b6a99801e807e56ef784f79d4951204b9e5
- Parents:
- f8fb93d1bc922d1e97207d1d5b347fe1db1eedcf
- Location:
- libpolys
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
rf8fb93d re6f1e6 744 744 745 745 // Tests: 746 #ifdef HAVE_RINGS 746 747 static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r) 747 748 { assume(r != NULL); return (getCoeffType(r)==n_Z2m); } … … 758 759 static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r) 759 760 { assume(r != NULL); return (r->is_field==0); } 761 #else 762 #define nCoeff_is_Ring_2toM(A) 0 763 #define nCoeff_is_Ring_ModN(A) 0 764 #define nCoeff_is_Ring_PtoM(A) 0 765 #define nCoeff_is_Ring_Z(A) 0 766 #define nCoeff_is_Ring(A) 0 767 #endif 760 768 761 769 /// returns TRUE, if r is a field or r has no zero divisors (i.e is a domain) -
libpolys/polys/kbuckets.cc
rf8fb93d re6f1e6 588 588 if (i<coef_start) 589 589 bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r); 590 #ifdef HAVE_RINGS591 590 /* Frank Seelisch on March 11, 2010: 592 591 This looks a bit strange: The following "if" is indented … … 601 600 kBucketAdjust(bucket, i); 602 601 } 603 #endif604 602 else 605 603 if (bucket->coef[i]!=NULL) … … 613 611 #else 614 612 bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r); 615 #ifdef HAVE_RINGS616 613 if (rField_is_Ring(r) && !(rField_is_Domain(r))) 617 614 { … … 619 616 kBucketAdjust(bucket, i); 620 617 } 621 #endif622 618 #endif 623 619 } … … 719 715 i = pLogLength(l1); 720 716 721 #if defined(HAVE_ RINGS)||defined(HAVE_PLURAL)717 #if defined(HAVE_PLURAL) 722 718 if ((rField_is_Ring(r) && !(rField_is_Domain(r))) 723 719 ||(rIsPluralRing(r))) -
libpolys/polys/monomials/p_polys.cc
rf8fb93d re6f1e6 1221 1221 1222 1222 /*2 1223 *test if a monomial /head term is a pure power 1223 *test if a monomial /head term is a pure power, 1224 * i.e. depends on only one variable 1224 1225 */ 1225 1226 int p_IsPurePower(const poly p, const ring r) 1226 1227 { 1227 #ifdef HAVE_RINGS1228 if (rField_is_Ring(r))1229 {1230 if (p == NULL) return 0;1231 if (!n_IsUnit(pGetCoeff(p), r->cf)) return 0;1232 }1233 #endif1234 1228 int i,k=0; 1235 1229 … … 2184 2178 } 2185 2179 if ((pNext(rc) != NULL) 2186 #ifdef HAVE_RINGS2187 2180 || rField_is_Ring(r) 2188 #endif2189 2181 ) 2190 2182 return p_Pow(p,i,r); … … 2230 2222 2231 2223 2232 #ifdef HAVE_RINGS2233 2224 if (rField_is_Ring(r)) 2234 2225 { … … 2255 2246 return; 2256 2247 } 2257 #endif2258 2248 number h,d; 2259 2249 poly p; … … 2733 2723 number d, h; 2734 2724 2735 #ifdef HAVE_RINGS2736 2725 if (rField_is_Ring(r)) 2737 2726 { … … 2740 2729 return p; 2741 2730 } 2742 #endif2743 2731 2744 2732 if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) … … 3028 3016 poly p; 3029 3017 3030 #ifdef HAVE_RINGS3031 3018 if (rField_is_Ring(r)) 3032 3019 { … … 3036 3023 return; 3037 3024 } 3038 #endif3039 3025 3040 3026 if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) … … 3577 3563 void p_Norm(poly p1, const ring r) 3578 3564 { 3579 #ifdef HAVE_RINGS3580 3565 if (rField_is_Ring(r)) 3581 3566 { … … 3583 3568 // Werror("p_Norm not possible in the case of coefficient rings."); 3584 3569 } 3585 else 3586 #endif 3587 if (p1!=NULL) 3570 else if (p1!=NULL) 3588 3571 { 3589 3572 if (pNext(p1)==NULL) … … 4395 4378 if (pLength(p1) != pLength(p2)) 4396 4379 return FALSE; 4397 #ifdef HAVE_RINGS4398 4380 if (rField_is_Ring(r)) 4399 4381 { 4400 4382 if (!n_DivBy(p_GetCoeff(p1, r), p_GetCoeff(p2, r), r)) return FALSE; 4401 4383 } 4402 #endif4403 4384 n=n_Div(p_GetCoeff(p1,r),p_GetCoeff(p2,r),r); 4404 4385 while ((p1 != NULL) /*&& (p2 != NULL)*/) -
libpolys/polys/monomials/p_polys.h
rf8fb93d re6f1e6 1807 1807 { 1808 1808 if (p == NULL) return FALSE; 1809 #ifdef HAVE_RINGS1810 1809 if (rField_is_Ring(r)) 1811 1810 return (p_LmIsConstant(p, r) && n_IsUnit(pGetCoeff(p),r->cf)); 1812 #endif1813 1811 return p_LmIsConstant(p, r); 1814 1812 } -
libpolys/polys/monomials/ring.cc
rf8fb93d re6f1e6 3375 3375 if ( (r->cf->extRing!=NULL) 3376 3376 || rField_is_Q(r) 3377 #ifdef HAVE_RINGS3378 3377 || rField_is_Ring(r) 3379 #endif3380 3378 ) 3381 3379 r->options |= Sy_bit(OPT_INTSTRATEGY); … … 5118 5116 if (rField_is_Q_a(r)) return getCoeffType(r->cf); 5119 5117 if (rField_is_long_C(r)) return n_long_C; 5120 #ifdef HAVE_RINGS 5121 if (rField_is_Ring_Z(r)) return n_Z; 5122 if (rField_is_Ring_ModN(r)) return n_Zn; 5123 if (rField_is_Ring_PtoM(r)) return n_Znm; 5124 if (rField_is_Ring_2toM(r)) return n_Z2m; 5125 #endif 5118 if (rField_is_Ring_Z(r)) return n_Z; 5119 if (rField_is_Ring_ModN(r)) return n_Zn; 5120 if (rField_is_Ring_PtoM(r)) return n_Znm; 5121 if (rField_is_Ring_2toM(r)) return n_Z2m; 5126 5122 5127 5123 return n_unknown; -
libpolys/polys/operations/p_Mult_q.cc
rf8fb93d re6f1e6 70 70 assume(p != NULL && pNext(p) != NULL && q != NULL && pNext(q) != NULL); 71 71 pAssume1(! pHaveCommonMonoms(p, q)); 72 #ifdef HAVE_RINGS73 72 assume(!rField_is_Ring(r) || rField_is_Domain(r)); 74 #endif75 73 assume(lp >= 1 && lq >= 1); 76 74 p_Test(p, r); -
libpolys/polys/simpleideals.cc
rf8fb93d re6f1e6 267 267 if (id->m[j]!=NULL) 268 268 { 269 #ifdef HAVE_RINGS270 269 if (rField_is_Ring(r)) 271 270 { … … 281 280 if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r); 282 281 } 283 #else284 if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r);285 #endif286 282 } 287 283 } … … 357 353 if (id->m[j]!=NULL) 358 354 { 359 #ifdef HAVE_RINGS360 355 if (rField_is_Ring(r)) 361 356 { … … 372 367 else 373 368 { 374 #endif 375 /* the case of a ground field: */ 376 if (p_DivisibleBy(id->m[i], id->m[j],r)) 377 { 378 p_Delete(&id->m[j],r); 369 /* the case of a ground field: */ 370 if (p_DivisibleBy(id->m[i], id->m[j],r)) 371 { 372 p_Delete(&id->m[j],r); 373 } 374 else if (p_DivisibleBy(id->m[j], id->m[i],r)) 375 { 376 p_Delete(&id->m[i],r); 377 break; 378 } 379 379 } 380 else if (p_DivisibleBy(id->m[j], id->m[i],r))381 {382 p_Delete(&id->m[i],r);383 break;384 }385 #ifdef HAVE_RINGS386 }387 #endif388 380 } 389 381 } … … 1433 1425 if (componentIsUsed[j]==0) 1434 1426 { 1435 #ifdef HAVE_RINGS1436 1427 if (p_LmIsConstantComp(p,r) && 1437 1428 (!rField_is_Ring(r) || n_IsUnit(pGetCoeff(p),r->cf))) 1438 1429 { 1439 #else1440 if (p_LmIsConstantComp(p,r))1441 {1442 #endif1443 1430 generator = i; 1444 1431 componentIsUsed[j] = 1;
Note: See TracChangeset
for help on using the changeset viewer.