Changeset c25b56c in git
- Timestamp:
- Aug 6, 2013, 4:02:20 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 3ed6cb7c0359a1466ef15624e7b5eafdc2eb1a8e
- Parents:
- 537733fc1137fef8870804ba8fd5021dbcafa68d
- git-author:
- Adrian Popescu <adi_popescum@yahoo.de>2013-08-06 16:02:20+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-08-06 17:24:42+02:00
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r537733f rc25b56c 2487 2487 rComplete(R); 2488 2488 2489 #ifdef HAVE_RINGS2489 /*#ifdef HAVE_RINGS 2490 2490 // currently, coefficients which are ring elements require a global ordering: 2491 2491 if (rField_is_Ring(R) && (R->OrdSgn==-1)) … … 2494 2494 goto rCompose_err; 2495 2495 } 2496 #endif 2496 #endif*/ 2497 2497 2498 2498 … … 5329 5329 goto rInitError; 5330 5330 5331 #ifdef HAVE_RINGS5331 /*#ifdef HAVE_RINGS 5332 5332 // currently, coefficients which are ring elements require a global ordering: 5333 5333 if (rField_is_Ring(R) && (R->OrdSgn==-1)) … … 5336 5336 goto rInitError; 5337 5337 } 5338 #endif 5338 #endif*/ 5339 5339 5340 5340 rTest(R); -
Tst/New.lst
r537733f rc25b56c 35 35 New/std_prot.tst 36 36 New/interred_prot.tst 37 New/ringlocal.tst 38 New/hilblocinhom.tst -
kernel/hdegree.cc
r537733f rc25b56c 985 985 int i; 986 986 int k = ak; 987 988 #if HAVE_RINGS 989 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 990 { 991 //consider just monic generators (over rings with zero-divisors) 992 ideal SS=id_Copy(S,tailRing); 993 for(i=0;i<=idElem(SS);i++) 994 { 995 if(pIsPurePower(SS->m[i])==0) 996 p_Delete(&SS->m[i],tailRing); 997 } 998 S=id_Copy(SS,tailRing); 999 } 1000 #endif 1001 987 1002 hNvar = (currRing->N); 988 1003 hexist = hInit(S, Q, &hNexist, tailRing); -
kernel/kInline.h
r537733f rc25b56c 1004 1004 // get m1 = LCM(LM(p1), LM(p2))/LM(p1) 1005 1005 // m2 = LCM(LM(p1), LM(p2))/LM(p2) in tailRing 1006 // lcm = LCM(LM(p1), LM(p2) 1006 // lcm = LCM(LM(p1), LM(p2)) in leadRing 1007 1007 KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, 1008 1008 poly &m1, poly &m2, poly &lcm, const ring tailRing) -
kernel/kstd1.cc
r537733f rc25b56c 19 19 # define MYTEST 0 20 20 #endif /* ifndef NDEBUG */ 21 22 #define ADIDEBUG 0 23 #define ADIDEBUG_NF 0 21 24 22 25 … … 355 358 } 356 359 360 int redRiloc (LObject* h,kStrategy strat) 361 { 362 int i,at,ei,li,ii; 363 int j = 0; 364 int pass = 0; 365 long d,reddeg; 366 367 368 #if ADIDEBUG_NF 369 int iii; 370 PrintLn(); 371 PrintS("---------------------------- NEW REDRILOC COMPUTATION ----------------------------"); 372 PrintLn(); 373 PrintS(" The pair h : "); PrintLn(); PrintLn(); 374 PrintS(" p1 = "); p_Write(h->p1,strat->tailRing); PrintLn(); 375 PrintS(" p2 = "); p_Write(h->p2,strat->tailRing); PrintLn(); 376 PrintS(" p = "); p_Write(h->p,strat->tailRing); PrintLn(); 377 PrintLn(); 378 PrintS(" The actual reducer T is: "); 379 if(strat->tl<0) 380 {PrintS(" Empty.");PrintLn();} 381 else 382 for (iii=0;iii<=strat->tl;iii++) 383 { 384 PrintLn(); 385 PrintS(" T[");printf("%i",iii);PrintS("] = ");p_Write(strat->T[iii].p,strat->tailRing); 386 PrintLn(); 387 } 388 #endif /* ADIDEBUG_NF */ 389 390 d = h->GetpFDeg()+ h->ecart; 391 reddeg = strat->LazyDegree+d; 392 h->SetShortExpVector(); 393 #if ADIDEBUG_NF 394 PrintLn(); 395 PrintS(" Searching for a poly in T that divides h (of ecart "); 396 printf("%i",h->ecart);PrintS(") ..."); 397 PrintLn(); 398 #endif 399 loop 400 { 401 j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h); 402 #if ADIDEBUG_NF 403 if(j != -1) 404 { 405 ei = strat->T[j].ecart; 406 PrintLn(); 407 PrintS(" Found one: T[");printf("%i",j); 408 PrintS("] of ecart ");printf("%i",ei); 409 PrintS(": ");p_Write(strat->T[j].p,strat->tailRing); 410 PrintLn(); 411 PrintS(" Try to find another with smaller ecart:"); 412 PrintLn(); 413 } 414 else 415 { 416 PrintLn(); 417 PrintS(" No poly in T divides h."); 418 PrintLn(); 419 } 420 #endif 421 if (j < 0) 422 { 423 if (strat->honey) h->SetLength(strat->length_pLength); 424 return 1; 425 } 426 427 ei = strat->T[j].ecart; 428 ii = j; 429 #if ADIDEBUG_NF 430 iii=ii; 431 #endif 432 if (ei > h->ecart && ii < strat->tl) 433 { 434 li = strat->T[j].length; 435 // the polynomial to reduce with (up to the moment) is; 436 // pi with ecart ei and length li 437 // look for one with smaller ecart 438 i = j; 439 loop 440 { 441 /*- takes the first possible with respect to ecart -*/ 442 i++; 443 #if 1 444 if (i > strat->tl) break; 445 if ((strat->T[i].ecart < ei || (strat->T[i].ecart == ei && 446 strat->T[i].length < li)) 447 && 448 p_LmShortDivisibleBy(strat->T[i].GetLmTailRing(), strat->sevT[i], h->GetLmTailRing(), ~h->sev, strat->tailRing)) 449 #else 450 j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h, i); 451 if (j < 0) break; 452 i = j; 453 if (strat->T[i].ecart < ei || (strat->T[i].ecart == ei && 454 strat->T[i].length < li)) 455 #endif 456 { 457 // the polynomial to reduce with is now 458 ii = i; 459 ei = strat->T[i].ecart; 460 if (ei <= h->ecart) break; 461 li = strat->T[i].length; 462 } 463 } 464 465 466 #if ADIDEBUG_NF 467 if(iii == ii) 468 { 469 PrintLn(); 470 PrintS(" None was found."); 471 PrintLn(); 472 } 473 else 474 { 475 PrintLn(); 476 PrintS(" A better one (ecart = ");printf("%i",ei);PrintS("): T["); 477 printf("%i] = ",ii);p_Write(strat->T[ii].p,strat->tailRing); 478 PrintLn(); 479 } 480 #endif 481 482 } 483 484 // end of search: have to reduce with pi 485 if (ei > h->ecart) 486 { 487 // It is not possible to reduce h with smaller ecart; 488 // if possible h goes to the lazy-set L,i.e 489 // if its position in L would be not the last one 490 strat->fromT = TRUE; 491 if (!TEST_OPT_REDTHROUGH && strat->Ll >= 0) /*- L is not empty -*/ 492 { 493 h->SetLmCurrRing(); 494 if (strat->honey && strat->posInLDependsOnLength) 495 h->SetLength(strat->length_pLength); 496 assume(h->FDeg == h->pFDeg()); 497 at = strat->posInL(strat->L,strat->Ll,h,strat); 498 if (at <= strat->Ll) 499 { 500 /*- h will not become the next element to reduce -*/ 501 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 502 #ifdef KDEBUG 503 if (TEST_OPT_DEBUG) Print(" ecart too big; -> L%d\n",at); 504 #endif 505 h->Clear(); 506 strat->fromT = FALSE; 507 return -1; 508 } 509 } 510 } 511 512 // now we finally can reduce 513 doRed(h,&(strat->T[ii]),strat->fromT,strat); 514 #if ADIDEBUG_NF 515 PrintLn(); 516 PrintS(" Partial Reduced h = ");p_Write(h->p,strat->tailRing); 517 PrintLn(); 518 #endif 519 strat->fromT=FALSE; 520 521 // are we done ??? 522 if (h->IsNull()) 523 { 524 if (h->lcm!=NULL) pLmFree(h->lcm); 525 h->Clear(); 526 return 0; 527 } 528 529 // NO! 530 h->SetShortExpVector(); 531 h->SetpFDeg(); 532 if (strat->honey) 533 { 534 if (ei <= h->ecart) 535 h->ecart = d-h->GetpFDeg(); 536 else 537 h->ecart = d-h->GetpFDeg()+ei-h->ecart; 538 } 539 else 540 // this has the side effect of setting h->length 541 h->ecart = h->pLDeg(strat->LDegLast) - h->GetpFDeg(); 542 543 /*- try to reduce the s-polynomial -*/ 544 pass++; 545 d = h->GetpFDeg()+h->ecart; 546 /* 547 *test whether the polynomial should go to the lazyset L 548 *-if the degree jumps 549 *-if the number of pre-defined reductions jumps 550 */ 551 if (!TEST_OPT_REDTHROUGH && (strat->Ll >= 0) 552 && ((d >= reddeg) || (pass > strat->LazyPass))) 553 { 554 h->SetLmCurrRing(); 555 if (strat->honey && strat->posInLDependsOnLength) 556 h->SetLength(strat->length_pLength); 557 assume(h->FDeg == h->pFDeg()); 558 at = strat->posInL(strat->L,strat->Ll,h,strat); 559 if (at <= strat->Ll) 560 { 561 int dummy=strat->sl; 562 if (kFindDivisibleByInS(strat, &dummy, h) < 0) 563 { 564 if (strat->honey && !strat->posInLDependsOnLength) 565 h->SetLength(strat->length_pLength); 566 return 1; 567 } 568 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 569 #ifdef KDEBUG 570 if (TEST_OPT_DEBUG) Print(" degree jumped; ->L%d\n",at); 571 #endif 572 h->Clear(); 573 return -1; 574 } 575 } 576 else if ((TEST_OPT_PROT) && (strat->Ll < 0) && (d >= reddeg)) 577 { 578 Print(".%ld",d);mflush(); 579 reddeg = d+1; 580 if (h->pTotalDeg()+h->ecart >= strat->tailRing->bitmask) 581 { 582 strat->overflow=TRUE; 583 //Print("OVERFLOW in redEcart d=%ld, max=%ld",d,strat->tailRing->bitmask); 584 h->GetP(); 585 at = strat->posInL(strat->L,strat->Ll,h,strat); 586 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 587 h->Clear(); 588 return -1; 589 } 590 } 591 } 592 } 593 357 594 /*2 358 595 *reduces h with elements from T choosing the first possible … … 840 1077 void updateLHC(kStrategy strat) 841 1078 { 1079 842 1080 int i = 0; 843 1081 assume(kTest_TS(strat)); … … 904 1142 while (i <= strat->tl) 905 1143 { 906 1144 p = strat->T[i]; 907 1145 deleteHC(&p,strat, TRUE); 908 1146 /*- tries to cancel a unit: -*/ … … 957 1195 if (TEST_OPT_FINDET) 958 1196 return; 1197 1198 #ifndef HAVE_RINGS 959 1199 strat->red = redFirst; 960 1200 strat->use_buckets = kMoraUseBucket(strat); 1201 #else 1202 if ( (!rField_is_Ring(currRing)) || (currRing->OrdSgn != -1)) 1203 { 1204 strat->red = redFirst; 1205 strat->use_buckets = kMoraUseBucket(strat); 1206 } 1207 #endif 1208 961 1209 updateT(strat); 1210 1211 #ifndef HAVE_RINGS 962 1212 strat->posInT = posInT2; 963 1213 reorderT(strat); 1214 #else 1215 if ( (!rField_is_Ring(currRing)) || (currRing->OrdSgn != -1)) 1216 { 1217 strat->posInT = posInT2; 1218 reorderT(strat); 1219 } 1220 #endif 964 1221 } 965 1222 assume(kTest_TS(strat)); … … 999 1256 if (TEST_OPT_FINDET) 1000 1257 return; 1258 1001 1259 /*- cuts elements in L above noether and reorders L -*/ 1002 1260 updateLHC(strat); … … 1115 1373 strat->red2 = redHomog; 1116 1374 } 1117 #ifdef HAVE_RINGS //TODO Oliver1375 #ifdef HAVE_RINGS || HAVE_RINGS_LOC //TODO Oliver 1118 1376 if (rField_is_Ring(currRing)) 1119 1377 { 1120 strat->red2 = redRing; 1378 if(currRing->OrdSgn == -1) 1379 {strat->red = redRiloc;} 1380 else 1381 {strat->red2 = redRing;} 1121 1382 } 1122 1383 #endif … … 1192 1453 strat->HCord = 32000;/*- very large -*/ 1193 1454 } 1455 1456 #ifdef HAVE_RINGS 1457 if (rField_is_Ring(currRing)) 1458 strat->red = redRiloc; 1459 #endif 1460 1461 /*reads the ecartWeights used for Graebes method from the 1194 1462 /*reads the ecartWeights used for Graebes method from the 1195 1463 *intvec ecart and set ecartWeights … … 1225 1493 ideal mora (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat) 1226 1494 { 1495 #ifdef HAVE_RINGS 1496 #if ADIDEBUG 1497 int loop_count; 1498 loop_count = 1; 1499 #endif 1500 #endif 1227 1501 #ifdef HAVE_ASSUME 1228 1502 mora_count++; … … 1277 1551 kStratInitChangeTailRing(strat); 1278 1552 #endif 1553 1279 1554 if (BVERBOSE(23)) 1280 1555 { … … 1312 1587 else strat->noClearS=TRUE; 1313 1588 } 1589 1590 #if ADIDEBUG 1591 #ifdef KDEBUG 1592 1593 PrintLn(); 1594 PrintS("-------------------------------- LOOP ");printf("%d",loop_count); 1595 PrintS(" ---------------------------------------"); 1596 PrintLn(); 1597 //print the list L: (p1,p2,p) 1598 PrintLn(); 1599 PrintS(" The pair list L -- in loop "); 1600 printf("%d",loop_count);PrintS(" -- is: "); PrintLn(); 1601 for(int iii=0;iii<=strat->Ll;iii++) 1602 { 1603 PrintLn(); 1604 PrintS(" L[");printf("%d",iii);Print("]: "); 1605 PrintLn(); 1606 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 1607 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 1608 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 1609 } 1610 PrintLn(); 1611 #endif 1612 #endif 1613 1614 1314 1615 strat->P = strat->L[strat->Ll];/*- picks the last element from the lazyset L -*/ 1315 1616 if (strat->Ll==0) strat->interpt=TRUE; 1316 1617 strat->Ll--; 1618 1619 #if ADIDEBUG 1620 #ifdef KDEBUG 1621 PrintS(" My new pair P = (p1,p2,p) is: "); PrintLn(); 1622 PrintS(" p1 = "); p_Write(strat->P.p1,strat->tailRing);PrintLn(); 1623 PrintS(" p2 = "); p_Write(strat->P.p2,strat->tailRing);PrintLn(); 1624 PrintS(" p = "); p_Write(strat->P.p,strat->tailRing); PrintLn(); 1625 PrintLn(); 1626 PrintS(" The old reducer list T -- at the beg of loop "); 1627 printf("%d",loop_count);PrintS(" -- is :"); 1628 if(strat->tl<0) 1629 {PrintS(" Empty.");PrintLn();} 1630 else 1631 for(int iii=0;iii<=strat->tl;iii++) 1632 { 1633 PrintLn(); 1634 PrintS(" T[");printf("%d",iii);PrintS("]:"); 1635 p_Write(strat->T[iii].p,strat->T->tailRing); 1636 } 1637 PrintLn(); 1638 1639 #endif /* ADIDEBUG */ 1640 #endif 1317 1641 1318 1642 // create the real Spoly … … 1380 1704 enterT(strat->P,strat); 1381 1705 // build new pairs 1382 #ifdef HAVE_RINGS _LOC1706 #ifdef HAVE_RINGS 1383 1707 if (rField_is_Ring(currRing)) 1384 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1708 { 1709 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1710 1711 #if ADIDEBUG 1712 PrintLn(); 1713 PrintS(" The new pair list L -- after superenterpairs in loop "); 1714 printf("%d",loop_count);PrintS(" -- is: "); PrintLn(); 1715 for(int iii=0;iii<=strat->Ll;iii++) 1716 { 1717 PrintLn(); 1718 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 1719 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 1720 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 1721 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 1722 } 1723 #endif 1724 } 1725 1385 1726 else 1386 1727 #endif … … 1396 1737 // clear strat->P 1397 1738 if (strat->P.lcm!=NULL) 1398 #ifdef HAVE_RINGS _LOC1739 #ifdef HAVE_RINGS || HAVE_RINGS_LOC 1399 1740 pLmDelete(strat->P.lcm); 1400 1741 #else … … 1425 1766 } 1426 1767 assume(kTest_TS(strat)); 1768 1769 #if ADIDEBUG 1770 PrintLn(); 1771 PrintS(" The new reducer list T -- at the end of loop "); 1772 printf("%d",loop_count);PrintS(" -- is "); PrintLn(); 1773 for(int iii=0;iii<=strat->tl;iii++) 1774 { 1775 PrintLn(); 1776 PrintS(" T[");printf("%d",iii);PrintS("]:"); 1777 p_Write(strat->T[iii].p,strat->tailRing); 1778 } 1779 PrintLn(); 1780 1781 loop_count++; 1782 #endif /* ADIDEBUG */ 1427 1783 } 1428 1784 /*- complete reduction of the standard basis------------------------ -*/ … … 1544 1900 enterT(h,strat); 1545 1901 } 1902 #ifdef KDEBUG 1903 // kDebugPrint(strat); 1904 #endif 1546 1905 /*- compute------------------------------------------- -*/ 1547 1906 p = pCopy(q); … … 1849 2208 #ifdef HAVE_RINGS 1850 2209 if (rField_is_Ring(currRing)) 1851 r=bba(F,Q,NULL,hilb,strat); 2210 { 2211 if(currRing->OrdSgn == -1) 2212 r=mora(F,Q,NULL,hilb,strat); 2213 else 2214 r=bba(F,Q,NULL,hilb,strat); 2215 } 1852 2216 else 1853 2217 #endif … … 2805 3169 else 2806 3170 { 2807 assume(strat->red == redEcart );3171 assume(strat->red == redEcart || strat->red == redRiloc); 2808 3172 if (strat->honey && (strat->syzComp==0)) 2809 3173 return TRUE; -
kernel/kutil.cc
r537733f rc25b56c 84 84 #endif 85 85 86 #define ADIDEBUG 0 87 86 88 denominator_list DENOMINATOR_LIST=NULL; 87 89 … … 266 268 while (pNext(p1)!=NULL) 267 269 { 268 270 if (p_LmCmp(pNext(p1), strat->kNoetherTail(), L->tailRing) == -1) 269 271 { 270 272 p_Delete(&pNext(p1), L->tailRing); … … 331 333 int i; 332 334 poly h; 335 number lc; 333 336 334 337 if(rHasGlobalOrdering (currRing)) return; … … 337 340 ring r = L->tailRing; 338 341 poly p = L->GetLmTailRing(); 342 343 #ifdef HAVE_RINGS 344 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 345 lc = p_GetCoeff(p,r); 346 #endif 339 347 340 348 #ifdef HAVE_RINGS_LOC … … 350 358 // } 351 359 h = pNext(p); 360 352 361 loop 353 362 { … … 357 366 if (!inNF) 358 367 { 359 number eins=nInit(1); 360 if (L->p != NULL) pSetCoeff(L->p,eins); 368 number eins; 369 #ifdef HAVE_RINGS 370 if (rField_is_Ring(currRing) && (currRing->OrdSgn == -1)) 371 eins = nCopy(lc); 372 else 373 #endif 374 eins=nInit(1); 375 if (L->p != NULL) pSetCoeff(L->p,eins); 361 376 else if (L->t_p != NULL) nDelete(&pGetCoeff(L->t_p)); 362 377 if (L->t_p != NULL) pSetCoeff0(L->t_p,eins); … … 372 387 if (L->p != NULL && pNext(L->p) != NULL) 373 388 pNext(L->p) = NULL; 389 374 390 return; 375 391 } … … 379 395 i++; 380 396 if (p_GetExp(p,i,r) > p_GetExp(h,i,r)) return ; // does not divide 397 #ifdef HAVE_RINGS 398 ///should check also if the lc is a zero divisor, if it divides all the others 399 if (rField_is_Ring(currRing) && currRing->OrdSgn == -1) 400 if(n_DivBy(p_GetCoeff(h,r->cf),lc,r->cf) == 0) 401 return; 402 #endif 381 403 if (i == r->N) break; // does divide, try next monom 382 404 } … … 1145 1167 Lp.lcm = pInit(); 1146 1168 pSetCoeff0(Lp.lcm, n_Lcm(pGetCoeff(p), pGetCoeff(strat->S[i]), currRing->cf)); 1169 1170 #if ADIDEBUG 1171 PrintS("\nLp.lcm (lc) = ");pWrite(Lp.lcm); 1172 #endif 1173 1147 1174 // Lp.lcm == 0 1148 1175 if (nIsZero(pGetCoeff(Lp.lcm))) … … 1165 1192 // basic product criterion 1166 1193 pLcm(p,strat->S[i],Lp.lcm); 1194 1195 #if ADIDEBUG 1196 PrintS("\nLp.lcm (lcm) = ");pWrite(Lp.lcm); 1197 #endif 1198 1167 1199 pSetm(Lp.lcm); 1168 1200 assume(!strat->sugarCrit); … … 2724 2756 for (j=0; j<=k; j++) 2725 2757 { 2758 #if ADIDEBUG 2759 PrintS("\n initenterpairs: \n"); 2760 PrintS(" ");p_Write(h, strat->tailRing); 2761 PrintS(" ");p_Write(strat->S[j],strat->tailRing); 2762 #endif 2726 2763 strat->enterOnePair(j,h,ecart,isFromQ,strat, atR); 2727 2764 //Print("j:%d, Ll:%d\n",j,strat->Ll); … … 3537 3574 void superenterpairs (poly h,int k,int ecart,int pos,kStrategy strat, int atR) 3538 3575 { 3576 #if ADIDEBUG 3577 PrintLn(); 3578 PrintS("Enter superenterpairs"); 3579 PrintLn(); 3580 int iii = strat->Ll; 3581 #endif 3539 3582 assume (rField_is_Ring(currRing)); 3540 3583 // enter also zero divisor * poly, if this is non zero and of smaller degree 3541 3584 if (!(rField_is_Domain(currRing))) enterExtendedSpoly(h, strat); 3585 #if ADIDEBUG 3586 if(iii==strat->Ll) 3587 { 3588 PrintLn(); 3589 PrintS(" enterExtendedSpoly has not changed the list L."); 3590 PrintLn(); 3591 } 3592 else 3593 { 3594 PrintLn(); 3595 PrintS(" enterExtendedSpoly changed the list L: "); 3596 PrintLn(); 3597 for(iii=0;iii<=strat->Ll;iii++) 3598 { 3599 PrintLn(); 3600 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 3601 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 3602 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 3603 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 3604 } 3605 } 3606 iii = strat->Ll; 3607 #endif 3542 3608 initenterpairs(h, k, ecart, 0, strat, atR); 3609 #if ADIDEBUG 3610 if(iii==strat->Ll) 3611 { 3612 PrintLn(); 3613 PrintS(" initenterpairs has not changed the list L."); 3614 PrintLn(); 3615 } 3616 else 3617 { 3618 PrintLn(); 3619 PrintS(" initenterpairs changed the list L: "); 3620 PrintLn(); 3621 for(iii=0;iii<=strat->Ll;iii++) 3622 { 3623 PrintLn(); 3624 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 3625 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 3626 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 3627 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 3628 } 3629 } 3630 iii = strat->Ll; 3631 #endif 3543 3632 initenterstrongPairs(h, k, ecart, 0, strat, atR); 3544 clearSbatch(h, k, pos, strat); 3633 #if ADIDEBUG 3634 if(iii==strat->Ll) 3635 { 3636 PrintLn(); 3637 PrintS(" initenterstrongPairs has not changed the list L."); 3638 PrintLn(); 3639 } 3640 else 3641 { 3642 PrintLn(); 3643 PrintS(" initenterstrongPairs changed the list L: "); 3644 PrintLn(); 3645 for(iii=0;iii<=strat->Ll;iii++) 3646 { 3647 PrintLn(); 3648 PrintS(" L[");printf("%d",iii);PrintS("]:");PrintLn(); 3649 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing); 3650 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing); 3651 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing); 3652 } 3653 } 3654 PrintLn(); 3655 PrintS("End of superenterpairs"); 3656 PrintLn(); 3657 #endif 3658 clearSbatch(h, k, pos, strat); 3545 3659 } 3546 3660 #endif … … 5652 5766 if (currRing->OrdSgn==-1) 5653 5767 { 5768 /*#ifdef HAVE_RINGS 5769 if (rField_is_Ring(currRing)) 5770 { 5771 h.pCleardenom(); 5772 } 5773 else 5774 #endif*/ 5654 5775 cancelunit(&h); /*- tries to cancel a unit -*/ 5655 5776 deleteHC(&h, strat); … … 7874 7995 newNoether = pLmInit(strat->kHEdge); 7875 7996 j = p_FDeg(newNoether,currRing); 7997 /* #ifdef HAVE_RINGS 7998 if (!rField_is_Ring(currRing)) 7999 #endif */ 7876 8000 for (i=1; i<=(currRing->N); i++) 7877 8001 { … … 7983 8107 #ifdef HAVE_RINGS 7984 8108 (strat->homog && currRing->pFDeg == p_Deg && !(rField_is_Ring(currRing))), // TODO Oliver 8109 8110 7985 8111 #else 7986 8112 (strat->homog && currRing->pFDeg == p_Deg), // omit_degree … … 7989 8115 expbound); // exp_limit 7990 8116 7991 8117 if (new_tailRing == currRing) return TRUE; 7992 8118 7993 8119 strat->pOrigFDeg_TailRing = new_tailRing->pFDeg; -
kernel/kutil.h
r537733f rc25b56c 473 473 #ifdef HAVE_RINGS 474 474 int redRing (LObject* h,kStrategy strat); 475 int redRiloc (LObject* h,kStrategy strat); 475 476 void enterExtendedSpoly(poly h,kStrategy strat); 476 477 void superenterpairs (poly h,int k,int ecart,int pos,kStrategy strat, int atR = -1); … … 626 627 /*************************************************************** 627 628 * 628 * From k Spolys.cc629 * From kspoly.cc 629 630 * 630 631 ***************************************************************/ -
libpolys/polys/monomials/p_polys.cc
r537733f rc25b56c 60 60 #include "clapsing.h" 61 61 #endif 62 63 #define ADIDEBUG 0 62 64 63 65 /* … … 1233 1235 int p_IsPurePower(const poly p, const ring r) 1234 1236 { 1237 #ifdef HAVE_RINGS 1238 if (rField_is_Ring(r)) 1239 { 1240 if (p == NULL) return 0; 1241 if (!n_IsUnit(pGetCoeff(p), r->cf)) return 0; 1242 } 1243 #endif 1235 1244 int i,k=0; 1236 1245 … … 2822 2831 { 2823 2832 p_Content(ph,r); 2824 assume( n_GreaterZero(pGetCoeff(ph),C) );2825 2833 if(!n_GreaterZero(pGetCoeff(ph),C)) ph = p_Neg(ph,r); 2834 assume( n_GreaterZero(pGetCoeff(ph),C) ); 2826 2835 return; 2827 2836 } -
libpolys/polys/templates/pp_Mult_mm_Noether__T.cc
r537733f rc25b56c 29 29 spolyrec rp; 30 30 poly q = &rp, r; 31 number n; 31 32 const unsigned long *spNoether_exp = spNoether->exp; 32 33 number ln = pGetCoeff(m); … … 52 53 53 54 Continue: 54 l++; 55 q = pNext(q) = r; 56 pSetCoeff0(q, n_Mult__T(ln, pGetCoeff(p), ri)); 57 pIter(p); 55 56 n = n_Mult__T(ln, pGetCoeff(p), ri); 57 58 #ifdef HAVE_RINGS 59 if(n_IsZero__T(n, ri)) 60 { 61 n_Delete__T(&n, ri); 62 p_FreeBinAddr(r, ri); 63 } else 64 #endif 65 { 66 l++; 67 q = pNext(q) = r; 68 pSetCoeff0(q, n); 69 } 70 71 pIter(p); 72 58 73 } while (p != NULL); 59 74
Note: See TracChangeset
for help on using the changeset viewer.