Changeset b1a5c1 in git
- Timestamp:
- Jun 20, 2008, 6:54:45 PM (15 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- f1b9c57f647835474f1c1a7163a27646f2de70b7
- Parents:
- 8049adb6c137bedd3c5725cd5d503326db71e40c
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gring.cc
r8049ad rb1a5c1 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: gring.cc,v 1.5 5 2008-06-10 14:35:40 motsakExp $9 * Version: $Id: gring.cc,v 1.56 2008-06-20 16:54:45 Singular Exp $ 10 10 *******************************************************************/ 11 11 … … 29 29 #include "prCopy.h" 30 30 #include "p_Mult_q.h" 31 32 31 #include "pInline1.h" 33 32 34 33 #include "gring.h" 35 34 #include "sca.h" 36 37 35 38 36 #define MYTEST 0 … … 106 104 { 107 105 poly m = // p_ISet(1, r); 108 p_Init(r); 106 p_Init(r); 109 107 110 108 const int pVariables = r->N; 111 109 112 for (int i = pVariables; i ; i--)110 for (int i = pVariables; i!=0; i--) 113 111 { 114 112 const int lExpA = p_GetExp (a, i, r); … … 126 124 #endif 127 125 128 n_New(&(p_GetCoeff(m, r)), r); 126 n_New(&(p_GetCoeff(m, r)), r); 129 127 130 128 return(m); … … 142 140 143 141 const poly m = p_Lcm(a, b, si_max(lCompP1, lCompP2), r); 144 142 145 143 #ifdef PDEBUG 146 144 // p_Test(m,r); … … 315 313 expOut=expP; 316 314 #ifdef PDEBUG 317 if (side)315 if (side) 318 316 { 319 Print("gnc_p_Mult_mm: Multiplication in the left module from the right");320 }317 Print("gnc_p_Mult_mm: Multiplication in the left module from the right"); 318 } 321 319 #endif 322 320 } … … 325 323 /* REPORT_ERROR */ 326 324 #ifdef PDEBUG 327 const char* s;328 if (side==1) s="gnc_p_Mult_mm";329 else s="gnc_mm_Mult_p";330 Print("%s: exponent mismatch %d and %d\n",s,expP,expM);325 const char* s; 326 if (side==1) s="gnc_p_Mult_mm"; 327 else s="gnc_mm_Mult_p"; 328 Print("%s: exponent mismatch %d and %d\n",s,expP,expM); 331 329 #endif 332 330 expOut=0; … … 479 477 nPower(cff,cpower,&tmp_num); 480 478 cff = nMult(totcff,tmp_num); 481 nDelete(&totcff);479 nDelete(&totcff); 482 480 nDelete(&tmp_num); 483 481 totcff = n_Copy(cff,r); … … 1231 1229 assume(p_LmDivisibleBy(p1, p2, r)); 1232 1230 1231 #ifdef PDEBUG 1233 1232 if (p_GetComp(p1,r)!=p_GetComp(p2,r) 1234 1233 && (p_GetComp(p1,r)!=0) 1235 1234 && (p_GetComp(p2,r)!=0)) 1236 1235 { 1237 #ifdef PDEBUG 1238 Print("nc_ReduceSpolyOld: different components"); 1239 #endif 1236 dReportError("nc_ReduceSpolyOld: different components"); 1240 1237 return(NULL); 1241 1238 } 1239 #endif 1242 1240 poly m = pOne(); 1243 1241 p_ExpVectorDiff(m,p2,p1,r); … … 1348 1346 poly gnc_CreateSpolyOld(poly p1, poly p2/*,poly spNoether*/, const ring r) 1349 1347 { 1348 #ifdef PDEBUG 1350 1349 if ((p_GetComp(p1,r)!=p_GetComp(p2,r)) 1351 1350 && (p_GetComp(p1,r)!=0) 1352 1351 && (p_GetComp(p2,r)!=0)) 1353 1352 { 1354 #ifdef PDEBUG 1355 Print("gnc_CreateSpolyOld : different components!"); 1356 #endif 1353 dReportError("gnc_CreateSpolyOld : different components!"); 1357 1354 return(NULL); 1358 1355 } 1356 #endif 1359 1357 if ((ncRingType(r)==nc_lie) && pHasNotCF(p1,p2)) /* prod crit */ 1360 1358 { … … 1442 1440 #endif 1443 1441 #endif 1444 1442 1445 1443 const long lCompP1 = p_GetComp(p1,r); 1446 1444 const long lCompP2 = p_GetComp(p2,r); … … 1460 1458 } 1461 1459 #endif 1462 1463 1460 1461 1464 1462 // if ((r->GetNC()->type==nc_lie) && pHasNotCF(p1,p2)) /* prod crit */ 1465 1463 // { … … 1503 1501 #endif 1504 1502 1505 1503 1506 1504 // assume(p_GetComp(m2,r) == 0); 1507 1505 1508 1506 #ifdef PDEBUG 1509 #if 0 1507 #if 0 1510 1508 if( (p_GetComp(m2,r) != 0) || (p_GetComp(m1,r) != 0) ) 1511 1509 { 1512 1510 WarnS("gnc_CreateSpolyNew: wrong monomials!"); 1513 1514 1511 1512 1515 1513 #ifdef RDEBUG 1516 1514 PrintS("m1 = "); p_Write(m1, r); 1517 1515 pDebugPrintR(m1, r); 1518 1516 1519 1517 PrintS("m2 = "); p_Write(m2, r); 1520 1518 pDebugPrintR(m2, r); … … 1529 1527 pDebugPrintR(pL, r); 1530 1528 #endif 1531 1532 } 1533 1534 #endif 1535 #endif 1536 1529 1530 } 1531 1532 #endif 1533 #endif 1534 1537 1535 p_Delete(&pL,r); 1538 1536 … … 1550 1548 #endif 1551 1549 #endif 1552 1550 1553 1551 if(M1 == NULL || M2 == NULL) 1554 1552 { … … 1603 1601 1604 1602 1605 1603 1606 1604 #ifdef PDEBUG 1607 1605 p_Test(M2,r); … … 1643 1641 // p_Test(tmp,r); 1644 1642 //#endif 1645 1643 1646 1644 M1 = nc_mm_Mult_pp(m1, pNext(p1), r); // M1 = m1 * tail(p1), delete tmp // ??? 1647 1645 … … 1654 1652 1655 1653 #endif 1656 1654 1657 1655 M2=p_Add_q(M2,M1,r); // M2 = spoly(lt(p1), lt(p2)) + m1 * tail(p1), delete M1 1658 1656 #ifdef PDEBUG … … 1673 1671 1674 1672 M1 = nc_mm_Mult_pp(m2, pNext(p2), r); // M1 = m2 * tail(p2), detele tmp 1675 1673 1676 1674 #ifdef PDEBUG 1677 1675 p_Test(M1,r); … … 1691 1689 Print("M2: "); pWrite(M2); 1692 1690 #endif 1693 1691 1694 1692 #endif 1695 1693 // delete M1 … … 1773 1771 return(NULL); 1774 1772 } 1775 1773 1776 1774 poly m = p_Lcm(p1, p2, si_max(lCompP1, lCompP2), r); 1777 1775 … … 1782 1780 // p_Test(m,r); 1783 1781 #endif 1784 1782 1785 1783 return(m); 1786 1784 } … … 1842 1840 1843 1841 assume( pLmB != NULL ); 1844 1842 1845 1843 #ifdef PDEBUG 1846 1844 pTest(pLmB); … … 2100 2098 /* returns [p,q], destroys p */ 2101 2099 { 2102 2100 2103 2101 if (!rIsPluralRing(currRing)) return(NULL); 2104 2102 if (pComparePolys(p,q)) return(NULL); … … 2276 2274 { 2277 2275 poly varj = p_ISet(1, currRing); 2278 p_SetExp(varj, j, 1, currRing); 2276 p_SetExp(varj, j, 1, currRing); 2279 2277 p_Setm(varj, currRing); 2280 2278 … … 2297 2295 if (q != NULL) 2298 2296 { 2299 #ifdef PDEBUG 2297 #ifdef PDEBUG 2300 2298 #if 0 2301 2299 Print("Reducing q[j = %d]: ", j); // ! … … 2322 2320 #endif 2323 2321 #endif 2324 2322 2325 2323 // if( q != NULL) 2326 2324 q = kNF(J, currQuotient, q, 0, KSTD_NF_NONORM); // in currRing!!! … … 2372 2370 2373 2371 } 2374 2372 2375 2373 if (K == NULL) // nothing new: i.e. all elements are two-sided 2376 2374 return(J); … … 2400 2398 int iSize = idElem(J); // ring independent 2401 2399 2402 // J += K: 2400 // J += K: 2403 2401 ideal id_tmp = idSimpleAdd(J,K); // in currRing 2404 2402 id_Delete(&K, currRing); id_Delete(&J, currRing); … … 2494 2492 } 2495 2493 2496 void ncKill(ring r) 2494 void ncKill(ring r) 2497 2495 // kills the nc extension of ring r 2498 2496 { … … 2554 2552 } 2555 2553 2556 // inline 2554 // inline 2557 2555 void nc_rCopy0(ring res, const ring r) 2558 2556 { … … 2562 2560 res->GetNC() = r->GetNC(); 2563 2561 res->GetNC()->ref++; 2564 nc_p_ProcsSet(res, res->p_Procs); 2562 nc_p_ProcsSet(res, res->p_Procs); 2565 2563 } 2566 2564 … … 2720 2718 matrix CCC, matrix DDD, 2721 2719 poly CCN, poly DDN, 2722 ring r, 2720 ring r, 2723 2721 bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, 2724 2722 ring curr) … … 2740 2738 ( (CCN == NULL) ) 2741 2739 ); 2742 2740 2743 2741 assume( 2744 2742 ( (DDD != NULL) && (MATCOLS(DDD) == 1) && (MATROWS(DDD) == 1) && (MATELEM(DDD,1,1) == NULL) ) || 2745 2743 ( (DDN == NULL) ) 2746 2744 ); 2747 2748 2749 } 2750 2751 2745 2746 2747 } 2748 2749 2752 2750 // there must be: 2753 2751 assume( (CCC != NULL) != (CCN != NULL) ); // exactly one data about coeffs (C). 2754 2752 assume( !((DDD != NULL) && (DDN != NULL)) ); // at most one data about tails (D). 2755 2753 2756 2754 ring save = currRing; 2757 2755 … … 2762 2760 if( CCC != NULL ) 2763 2761 { 2764 PrintS("nc_CallPlural(), Input data, CCC: \n"); 2762 PrintS("nc_CallPlural(), Input data, CCC: \n"); 2765 2763 iiWriteMatrix(CCC, "C", 2, 4); 2766 2764 } 2767 2765 if( DDD != NULL ) 2768 2766 { 2769 PrintS("nc_CallPlural(), Input data, DDD: \n"); 2767 PrintS("nc_CallPlural(), Input data, DDD: \n"); 2770 2768 iiWriteMatrix(DDD, "D", 2, 4); 2771 2769 } 2772 2770 #endif 2773 2771 2774 2772 2775 2773 #ifndef NDEBUG 2776 2774 idTest((ideal)CCC); … … 2782 2780 if( (!bBeQuiet) && (r->GetNC() != NULL) ) 2783 2781 WarnS("going to redefine the algebra structure"); 2784 2782 2785 2783 if( currRing != r ) 2786 2784 rChangeCurrRing(r); … … 2807 2805 2808 2806 nc_type nctype = nc_undef; 2809 2807 2810 2808 ////////////////////////////////////////////////////////////////// 2811 2809 // check the correctness of arguments, without any real chagnes!!! 2812 2810 2813 2811 2814 2812 2815 2813 // check C … … 2949 2947 { 2950 2948 bool b = true; // DD == null ? 2951 2949 2952 2950 for(int i = 1; (i < r->N) && b; i++) 2953 2951 for(int j = i+1; (j <= r->N) && b; j++) … … 2965 2963 nctype = nc_skew; 2966 2964 } 2967 2965 2968 2966 if( bCopyInput ) 2969 2967 { … … 2978 2976 assume( C != NULL ); 2979 2977 assume( D != NULL ); 2980 2978 2981 2979 #if OUTPUT 2982 2980 PrintS("nc_CallPlural(), Computed data, C: \n"); … … 2991 2989 2992 2990 2993 2991 2994 2992 // check the ordering condition for D (both matrix and poly cases): 2995 2993 if ( gnc_CheckOrdCondition(D, r) ) … … 3122 3120 if(bSetupQuotient) // Test me!!! 3123 3121 { 3124 nc_SetupQuotient(r); 3122 nc_SetupQuotient(r); 3125 3123 } 3126 3124 … … 3161 3159 // A bit cleaned up and somewhat rewritten functions... 3162 3160 rGR->GetNC()->p_Procs.SPoly = gnc_CreateSpolyNew; 3163 rGR->GetNC()->p_Procs.ReduceSPoly = gnc_ReduceSpolyNew; 3161 rGR->GetNC()->p_Procs.ReduceSPoly = gnc_ReduceSpolyNew; 3164 3162 3165 3163 rGR->GetNC()->p_Procs.BucketPolyRed = gnc_kBucketPolyRedNew; … … 3381 3379 if (orig_ring != syz_ring) 3382 3380 { 3383 s_h2=idrCopyR_NoSort(h2,orig_ring);3384 // s_trickyQuotient=idrCopyR_NoSort(trickyQuotient,orig_ring);3385 // rDebugPrint(syz_ring);3386 s_I=idrCopyR_NoSort(I,orig_ring);3381 s_h2=idrCopyR_NoSort(h2,orig_ring); 3382 // s_trickyQuotient=idrCopyR_NoSort(trickyQuotient,orig_ring); 3383 // rDebugPrint(syz_ring); 3384 s_I=idrCopyR_NoSort(I,orig_ring); 3387 3385 } 3388 3386 else 3389 3387 { 3390 s_h2 = h2;3391 s_I = I;3392 // s_trickyQuotient=trickyQuotient;3388 s_h2 = h2; 3389 s_I = I; 3390 // s_trickyQuotient=trickyQuotient; 3393 3391 } 3394 3392 idTest(s_h2); … … 3408 3406 if (orig_ring != syz_ring) 3409 3407 { 3410 idDelete(&s_h2);3411 for (j=0; j<IDELEMS(s_h3); j++)3412 {3413 if (s_h3->m[j] != NULL)3414 {3415 if (p_MinComp(s_h3->m[j],syz_ring) > syzcomp) /* i.e. it is a syzygy */3416 pShift(&s_h3->m[j], -syzcomp);3417 else3418 pDelete(&s_h3->m[j]);3419 }3420 }3421 idSkipZeroes(s_h3);3422 s_h3->rank -= syzcomp;3423 rChangeCurrRing(orig_ring);3424 // s_h3 = idrMoveR_NoSort(s_h3, syz_ring);3425 s_h3 = idrMoveR_NoSort(s_h3, syz_ring);3426 rKill(syz_ring);3408 idDelete(&s_h2); 3409 for (j=0; j<IDELEMS(s_h3); j++) 3410 { 3411 if (s_h3->m[j] != NULL) 3412 { 3413 if (p_MinComp(s_h3->m[j],syz_ring) > syzcomp) /* i.e. it is a syzygy */ 3414 pShift(&s_h3->m[j], -syzcomp); 3415 else 3416 pDelete(&s_h3->m[j]); 3417 } 3418 } 3419 idSkipZeroes(s_h3); 3420 s_h3->rank -= syzcomp; 3421 rChangeCurrRing(orig_ring); 3422 // s_h3 = idrMoveR_NoSort(s_h3, syz_ring); 3423 s_h3 = idrMoveR_NoSort(s_h3, syz_ring); 3424 rKill(syz_ring); 3427 3425 } 3428 3426 idTest(s_h3); … … 3456 3454 for (j=0; j< idElem(I); j++) 3457 3455 { 3458 q = pCopy(MATELEM(MI,j+1,i));3459 if (q!=NULL)3460 {3461 q = pMult(q,pCopy(I->m[j]));3462 p = pAdd(p,q);3463 }3456 q = pCopy(MATELEM(MI,j+1,i)); 3457 if (q!=NULL) 3458 { 3459 q = pMult(q,pCopy(I->m[j])); 3460 p = pAdd(p,q); 3461 } 3464 3462 } 3465 3463 res->m[i-1]=p; … … 3492 3490 if (nc_CallPlural(C, D, NULL, NULL, r)) // TODO: what about quotient ideal? 3493 3491 WarnS("Error initializing multiplication!"); // No reaction!??? 3494 3492 3495 3493 return r; 3496 3494 } … … 3617 3615 { 3618 3616 // currently only super-commutative extension deals with factors. 3619 if( bUseExtensions ) 3617 if( bUseExtensions ) 3620 3618 return sca_SetupQuotient(rGR, rG); 3621 3622 return false; 3619 3620 return false; 3623 3621 } 3624 3622 -
kernel/sca.cc
r8049ad rb1a5c1 7 7 * Author: motsak (Oleksandr Motsak) 8 8 * Created: 2006/12/18 9 * Version: $Id: sca.cc,v 1.1 8 2008-06-20 12:28:17Singular Exp $9 * Version: $Id: sca.cc,v 1.19 2008-06-20 16:54:45 Singular Exp $ 10 10 *******************************************************************/ 11 11 … … 388 388 if(iComponentMonomM==0 ) 389 389 { 390 WarnS("sca_p_Mult_mm: Multiplication in the left module from the right");390 dReportError("sca_p_Mult_mm: Multiplication in the left module from the right"); 391 391 } 392 392 #endif … … 470 470 if(iComponentMonomM==0 ) 471 471 { 472 WarnS("sca_pp_Mult_mm: Multiplication in the left module from the right");472 dReportError("sca_pp_Mult_mm: Multiplication in the left module from the right"); 473 473 } 474 474 #endif … … 580 580 if(iComponent==0 ) 581 581 { 582 WarnS("sca_mm_Mult_pp: Multiplication in the left module from the right!");582 dReportError("sca_mm_Mult_pp: Multiplication in the left module from the right!"); 583 583 // PrintS("mm = "); p_Write(pMonom, rRing); 584 584 // PrintS("pp = "); p_Write(pPoly, rRing); 585 // assume(iComponent!=0); 585 // assume(iComponent!=0); 586 586 } 587 587 #endif … … 644 644 if( iComponentMonomM!=0 ) 645 645 { 646 if( iComponent!=0 ) 646 if( iComponent!=0 ) 647 647 { 648 648 // REPORT_ERROR … … 656 656 if(iComponent==0) 657 657 { 658 WarnS("sca_mm_Mult_p: Multiplication in the left module from the right!");658 dReportError("sca_mm_Mult_p: Multiplication in the left module from the right!"); 659 659 // PrintS("mm = "); p_Write(pMonom, rRing); 660 660 // PrintS("p = "); p_Write(pPoly, rRing); 661 // assume(iComponent!=0); 661 // assume(iComponent!=0); 662 662 } 663 663 #endif … … 725 725 { 726 726 #ifdef PDEBUG 727 Print("sca_SPoly: different non-zero components!\n");727 dReportError("sca_SPoly: different non-zero components!\n"); 728 728 #endif 729 729 return(NULL); … … 815 815 { 816 816 #ifdef PDEBUG 817 Print("sca_ReduceSpoly: different non-zero components!");817 dReportError("sca_ReduceSpoly: different non-zero components!"); 818 818 #endif 819 819 return(NULL); … … 921 921 } 922 922 923 #ifdef KDEBUG 923 924 if (TEST_OPT_DEBUG) 924 925 { … … 927 928 PrintLn(); 928 929 } 930 #endif 929 931 930 932 enterpairs(h.p, strat->sl, h.ecart, 0, strat); … … 978 980 979 981 PrintS("F: \n"); 980 idPrint(F); 981 PrintS("Q: \n"); 982 idPrint(F); 983 PrintS("Q: \n"); 982 984 idPrint(Q); 983 985 #endif 984 986 #endif 985 987 986 988 987 989 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing); 988 990 const unsigned int m_iLastAltVar = scaLastAltVar(currRing); … … 1044 1046 if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/ 1045 1047 1048 #ifdef KDEBUG 1046 1049 if (TEST_OPT_DEBUG) messageSets(strat); 1050 #endif 1047 1051 1048 1052 if (strat->Ll== 0) strat->interpt=TRUE; … … 1071 1075 if(strat->P.IsNull()) continue; 1072 1076 1073 1077 1074 1078 if( pNext(strat->P.p) == strat->tail ) 1075 1079 { … … 1180 1184 1181 1185 1186 #ifdef KDEBUG 1182 1187 if (TEST_OPT_DEBUG) messageSets(strat); 1188 #endif 1183 1189 1184 1190 /* release temp data-------------------------------- */ … … 1239 1245 // checks... 1240 1246 ////////////////////////////////////////////////////////////////////////// 1241 if( rG == NULL ) 1247 if( rG == NULL ) 1242 1248 rG = rGR; 1243 1249 … … 1245 1251 assume(rG != NULL); 1246 1252 assume(rIsPluralRing(rG)); 1247 1253 1248 1254 1249 1255 #if MYTEST … … 1256 1262 return false; 1257 1263 1258 1264 1259 1265 // if( (ncRingType(rG) != nc_skew) || (ncRingType(rG) != nc_comm) ) 1260 1266 // return false; … … 1270 1276 PrintS("sca_SetupQuotient: qideal!!!\n"); 1271 1277 #endif 1272 1278 1273 1279 if((rG->qideal != NULL) && (rG != rGR) ) // we cannot change from factor to factor at the time, sorry! 1274 1280 return false; … … 1284 1290 PrintS("sca_SetupQuotient: AltVars?!\n"); 1285 1291 #endif 1286 1292 1287 1293 for(int i = 1; i < N; i++) 1288 1294 { … … 1319 1325 #endif 1320 1326 1321 1327 1322 1328 if( (iAltVarEnd == -1) || (iAltVarStart == (N+1)) ) 1323 1329 return false; // either no alternating varables, or a single one => we are in commutative case! 1324 1330 1325 1331 1326 1332 for(int i = 1; i < N; i++) 1327 1333 { … … 1384 1390 } 1385 1391 1386 1392 1387 1393 assume(rGR->qideal != NULL); 1388 1394 // assume(rG->qideal == NULL); // ? … … 1396 1402 #endif 1397 1403 1398 1404 1399 1405 // check for 1400 1406 // y_{iAltVarStart}^2, y_{iAltVarStart+1}^2, \ldots, y_{iAltVarEnd}^2 (iAltVarEnd > iAltVarStart) … … 1435 1441 #endif 1436 1442 #endif 1437 1443 1438 1444 1439 1445 ////////////////////////////////////////////////////////////////////////// … … 1466 1472 assume(rIsPluralRing(rGR)); 1467 1473 assume(!rIsSCA(rGR)); 1468 1474 1469 1475 const int N = rGR->N; 1470 1476 … … 1476 1482 const ideal idQuotient = rGR->qideal; 1477 1483 1478 1484 1479 1485 ideal tempQ = idQuotient; 1480 1486 1481 1487 if( b <= N && e >= 1 ) 1482 tempQ = id_KillSquares(idQuotient, b, e, rGR); 1488 tempQ = id_KillSquares(idQuotient, b, e, rGR); 1483 1489 1484 1490 idSkipZeroes( tempQ ); … … 1488 1494 else 1489 1495 rGR->GetNC()->SCAQuotient() = tempQ; 1490 1496 1491 1497 ncRingType( rGR, nc_exterior ); 1492 1498 … … 1499 1505 if(rSaveRing != rGR) 1500 1506 rChangeCurrRing(rSaveRing); 1501 1507 1502 1508 return true; 1503 1509 1504 1510 } 1505 1511 … … 1658 1664 1659 1665 strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing); 1666 if (strat->P.p!=NULL) strat->initEcart(&strat->P); 1660 1667 }// else 1661 1668 1662 1669 1663 1670 if(strat->P.IsNull()) continue; 1664 1671 1665 1672 if (strat->P.p1 == NULL) 1666 1673 { … … 1764 1771 { 1765 1772 assume(p_GetExp(pSave, i, currRing) == 1); 1766 1767 const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing); 1768 1769 #ifdef PDEBUG 1770 p_Test(pNew, currRing); 1771 #endif 1772 1773 if( pNew == NULL) continue; 1774 1775 LObject h(pNew); // h = x_i * strat->P 1776 1777 if (TEST_OPT_INTSTRATEGY) 1773 if (pNext!=NULL) 1778 1774 { 1779 // h.pCleardenom(); // also does a pContent 1780 pContent(h.p); 1775 const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing); 1776 1777 #ifdef PDEBUG 1778 p_Test(pNew, currRing); 1779 #endif 1780 1781 if( pNew == NULL) continue; 1782 1783 LObject h(pNew); // h = x_i * strat->P 1784 1785 if (TEST_OPT_INTSTRATEGY) 1786 { 1787 // h.pCleardenom(); // also does a pContent 1788 pContent(h.p); 1789 } 1790 else 1791 { 1792 h.pNorm(); 1793 } 1794 1795 strat->initEcart(&h); 1796 h.sev = pGetShortExpVector(h.p); 1797 1798 int pos; 1799 if (strat->Ll==-1) 1800 pos =0; 1801 else 1802 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 1803 1804 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos); 1805 /* 1806 h.sev = pGetShortExpVector(h.p); 1807 strat->initEcart(&h); 1808 1809 h.PrepareRed(strat->use_buckets); 1810 1811 // reduction of the element choosen from L(?) 1812 red_result = strat->red(&h,strat); 1813 1814 // reduction to non-zero new poly 1815 if (red_result != 1) continue; 1816 1817 1818 int pos = posInS(strat,strat->sl,h.p,h.ecart); 1819 1820 // reduce the tail and normalize poly 1821 if (TEST_OPT_INTSTRATEGY) 1822 { 1823 h.pCleardenom(); 1824 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 1825 { 1826 h.p = redtailBba(&(h),pos-1,strat, withT); // !!! 1827 h.pCleardenom(); 1828 } 1829 } 1830 else 1831 { 1832 h.pNorm(); 1833 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 1834 h.p = redtailBba(&(h),pos-1,strat, withT); 1835 } 1836 1837 #ifdef KDEBUG 1838 if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();} 1839 #endif 1840 1841 // h.PrepareRed(strat->use_buckets); // ??? 1842 1843 h.sev = pGetShortExpVector(h.p); 1844 strat->initEcart(&h); 1845 1846 if (strat->Ll==-1) 1847 pos = 0; 1848 else 1849 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 1850 1851 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/ 1852 1781 1853 } 1782 else1783 {1784 h.pNorm();1785 }1786 1787 strat->initEcart(&h);1788 h.sev = pGetShortExpVector(h.p);1789 1790 int pos;1791 1792 if (strat->Ll==-1)1793 pos =0;1794 else1795 pos = strat->posInL(strat->L,strat->Ll,&h,strat);1796 1797 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);1798 1799 1800 /*1801 h.sev = pGetShortExpVector(h.p);1802 strat->initEcart(&h);1803 1804 h.PrepareRed(strat->use_buckets);1805 1806 // reduction of the element choosen from L(?)1807 red_result = strat->red(&h,strat);1808 1809 // reduction to non-zero new poly1810 if (red_result != 1) continue;1811 1812 1813 int pos = posInS(strat,strat->sl,h.p,h.ecart);1814 1815 // reduce the tail and normalize poly1816 if (TEST_OPT_INTSTRATEGY)1817 {1818 h.pCleardenom();1819 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))1820 {1821 h.p = redtailBba(&(h),pos-1,strat, withT); // !!!1822 h.pCleardenom();1823 }1824 }1825 else1826 {1827 1828 h.pNorm();1829 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))1830 h.p = redtailBba(&(h),pos-1,strat, withT);1831 }1832 1833 1834 #ifdef KDEBUG1835 if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();}1836 #endif1837 1838 // h.PrepareRed(strat->use_buckets); // ???1839 1840 h.sev = pGetShortExpVector(h.p);1841 strat->initEcart(&h);1842 1843 if (strat->Ll==-1)1844 pos = 0;1845 else1846 pos = strat->posInL(strat->L,strat->Ll,&h,strat);1847 1848 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/1849 1850 1854 } // for all x_i \in Ann(lm(P)) 1851 1852 1853 1854 1855 1856 1855 } // if red(P) != NULL 1857 1856 … … 1896 1895 1897 1896 // if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1898 1899 1897 // PrintS("</sca>\n"); 1900 1898 … … 2031 2029 if (lrmax< strat->Ll) lrmax=strat->Ll; /*stat*/ 2032 2030 //test_int_std(strat->kIdeal); 2031 #ifdef KDEBUG 2033 2032 if (TEST_OPT_DEBUG) messageSets(strat); 2033 #endif 2034 2034 if (TEST_OPT_DEGBOUND 2035 2035 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)) … … 2070 2070 strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing); 2071 2071 } 2072 2073 2072 2073 2074 2074 2075 2075 if (strat->P.p1 == NULL) … … 2550 2550 2551 2551 assume( (iFirstAltVar >= 1) && (iLastAltVar <= r->N) && (iFirstAltVar <= iLastAltVar) ); 2552 2552 2553 2553 const int iSize = id->idelems(); 2554 2554
Note: See TracChangeset
for help on using the changeset viewer.