2 * computes the new strat->kNoether and the new pNoether, * returns TRUE, if pNoether has changed */
| 10402 | * returns TRUE, if pNoether has changed |
| 10403 | */ |
| 10404 | BOOLEAN newHEdge(kStrategy strat) |
| 10405 | { |
| 10406 | if (currRing->pLexOrder || rHasMixedOrdering(currRing)) |
| 10407 | return FALSE; |
| 10408 | int i,j; |
| 10409 | poly newNoether; |
| 10410 | |
| 10411 | #if 0 |
| 10412 | if (currRing->weight_all_1) |
| 10413 | scComputeHC(strat->Shdl,NULL,strat->ak,strat->kNoether); |
| 10414 | else |
| 10415 | scComputeHCw(strat->Shdl,NULL,strat->ak,strat->kNoether); |
| 10416 | #else |
| 10417 | scComputeHC(strat->Shdl,NULL,strat->ak,strat->kNoether); |
| 10418 | #endif |
| 10419 | if (strat->kNoether==NULL) return FALSE; |
| 10420 | if (strat->t_kNoether != NULL) |
| 10421 | { |
| 10422 | p_LmFree(strat->t_kNoether, strat->tailRing); |
| 10423 | strat->t_kNoether=NULL; |
| 10424 | } |
| 10425 | if (strat->tailRing != currRing) |
| 10426 | strat->t_kNoether = k_LmInit_currRing_2_tailRing(strat->kNoether, strat->tailRing); |
| 10427 | /* compare old and new noether*/ |
| 10428 | newNoether = pLmInit(strat->kNoether); |
| 10429 | pSetCoeff0(newNoether,nInit(1)); |
| 10430 | j = p_FDeg(newNoether,currRing); |
| 10431 | for (i=1; i<=(currRing->N); i++) |
| 10432 | { |
| 10433 | if (pGetExp(newNoether, i) > 0) pDecrExp(newNoether,i); |
| 10434 | } |
| 10435 | pSetm(newNoether); |
| 10436 | if (j < HCord) /*- statistics -*/ |
| 10437 | { |
| 10438 | if (TEST_OPT_PROT) |
| 10439 | { |
| 10440 | Print("H(%d)",j); |
| 10441 | mflush(); |
| 10442 | } |
| 10443 | HCord=j; |
| 10444 | #ifdef KDEBUG |
| 10445 | if (TEST_OPT_DEBUG) |
| 10446 | { |
| 10447 | Print("H(%d):",j); |
| 10448 | wrp(strat->kNoether); |
| 10449 | PrintLn(); |
| 10450 | } |
| 10451 | #endif |
| 10452 | } |
| 10453 | if (pCmp(strat->kNoether,newNoether)!=1) |
| 10454 | { |
| 10455 | if (strat->kNoether!=NULL) p_LmDelete0(strat->kNoether,currRing); |
| 10456 | strat->kNoether=newNoether; |
| 10457 | if (strat->t_kNoether != NULL) |
| 10458 | { |
| 10459 | p_LmFree(strat->t_kNoether, strat->tailRing); |
| 10460 | strat->t_kNoether=NULL; |
| 10461 | } |
no test coverage detected