Changeset 18ff4c in git
- Timestamp:
- Jul 25, 2007, 12:53:15 PM (16 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 1da0b56138c1e89904888f80b4e46d2b5370e1e2
- Parents:
- 19408ce627be07e5f06ea3acb902cb1deccb10af
- Location:
- kernel
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gring.cc
r19408c r18ff4c 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: gring.cc,v 1.4 7 2007-07-24 16:22:36 motsakExp $9 * Version: $Id: gring.cc,v 1.48 2007-07-25 10:53:14 Singular Exp $ 10 10 *******************************************************************/ 11 11 #include "mod2.h" … … 1727 1727 poly pp=nc_mm_Mult_pp(m,p,currRing); 1728 1728 assume(pp!=NULL); 1729 1729 1730 1730 pDelete(&m); 1731 1731 number n=nCopy(pGetCoeff(pp)); … … 1762 1762 PrintS(", "); 1763 1763 pWrite0(p); 1764 PrintS(", *c): "); 1765 #endif 1766 1764 PrintS(", *c): "); 1765 #endif 1766 1767 1767 // b will not by multiplied by any constant in this impl. 1768 1768 // ==> *c=1 … … 1777 1777 1778 1778 // poly pLmB = pHead(b); 1779 poly m = pOne(); 1779 poly m = pOne(); 1780 1780 pExpVectorDiff(m, b, p); 1781 1781 // pDelete(&pLmB); 1782 1782 //pSetm(m); 1783 1783 1784 1784 #ifdef PDEBUG 1785 1785 pTest(m); … … 1787 1787 #endif 1788 1788 1789 pp = nc_mm_Mult_pp(m, p, currRing); 1789 pp = nc_mm_Mult_pp(m, p, currRing); 1790 1790 1791 1791 #if MYTEST 1792 PrintS("\n{b': "); 1792 PrintS("\n{b': "); 1793 1793 pWrite0(b); 1794 PrintS(", m: "); 1794 PrintS(", m: "); 1795 1795 pWrite0(m); 1796 PrintS(", pp: "); 1797 pWrite0(pp); 1796 PrintS(", pp: "); 1797 pWrite0(pp); 1798 1798 PrintS(" }\n"); 1799 #endif 1799 #endif 1800 1800 1801 1801 pDelete(&m); // one m for all tries! 1802 1802 1803 1803 // assume( pp != NULL ); 1804 1804 1805 1805 if( pp == NULL ) 1806 1806 { … … 1808 1808 1809 1809 if( !p_DivisibleBy(p, b, currRing) ) 1810 return; 1811 1810 return; 1811 1812 1812 } 1813 1813 } 1814 1814 1815 1815 #if MYTEST 1816 PrintS("{b': "); 1816 PrintS("{b': "); 1817 1817 pWrite0(b); 1818 PrintS(", pp: "); 1819 pWrite0(pp); 1818 PrintS(", pp: "); 1819 pWrite0(pp); 1820 1820 PrintS(" }\n"); 1821 #endif 1821 #endif 1822 1822 1823 1823 … … 2077 2077 #endif 2078 2078 2079 q = kNF(J,currQuotient,q,0, 4);2079 q = kNF(J,currQuotient,q,0,KSTD_NF_NONORM); 2080 2080 2081 2081 #ifdef PDEBUG … … 2467 2467 pTest(DDN); 2468 2468 #endif 2469 2469 2470 2470 matrix CC = NULL; 2471 2471 matrix DD = NULL; … … 2493 2493 ring save = currRing; 2494 2494 bool WeChangeRing = false; 2495 2495 2496 2496 if (currRing!=r) 2497 2497 { … … 2500 2500 WeChangeRing = true; 2501 2501 } 2502 2502 2503 2503 r->nc = (nc_struct *)omAlloc0(sizeof(nc_struct)); 2504 2504 r->nc->ref = 1; … … 2517 2517 assume( (CCC != NULL) != (CCN != NULL) ); // exactly one data about coeffs (C). 2518 2518 assume( !((DDD != NULL) && (DDN != NULL)) ); // at most one data about tails (D). 2519 2519 2520 2520 /* initialition of the matrix C */ 2521 2521 /* check the correctness of arguments */ … … 2610 2610 else 2611 2611 qN = p_GetCoeff(MATELEM(C,i,j),r); 2612 2612 2613 2613 if ( qN == NULL ) /* check the consistency: Cij!=0 */ 2614 2614 // find also illegal pN … … 2676 2676 return TRUE; 2677 2677 } 2678 r->nc->C = C; // if C and D were given by matrices at the beginning they are in r 2678 r->nc->C = C; // if C and D were given by matrices at the beginning they are in r 2679 2679 r->nc->D = D; // otherwise they should be in r->nc->basering(polynomial * Id_{N}) 2680 2680 2681 2681 if (WeChangeRing) 2682 2682 rChangeCurrRing(save); 2683 2683 2684 2684 return nc_InitMultiplication(r); 2685 2685 } -
kernel/kstd1.cc
r19408c r18ff4c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd1.cc,v 1.2 5 2007-07-24 16:19:09 motsakExp $ */4 /* $Id: kstd1.cc,v 1.26 2007-07-25 10:53:14 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 1402 1402 } 1403 1403 } 1404 if ((lazyReduce & 1)==0)1404 if ((lazyReduce & KSTD_NF_LAZY)==0) 1405 1405 { 1406 1406 for (i=strat->sl; i>=0; i--) … … 1423 1423 deleteHC(&p,&o,&j,strat); 1424 1424 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 1425 if (p!=NULL) p = redMoraNF(p,strat, lazyReduce & 2);1426 if ((p!=NULL)&&((lazyReduce & 1)==0))1425 if (p!=NULL) p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART); 1426 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0)) 1427 1427 { 1428 1428 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } … … 1520 1520 } 1521 1521 } 1522 if (TEST_OPT_INTSTRATEGY && ((lazyReduce & 1)==0))1522 if (TEST_OPT_INTSTRATEGY && ((lazyReduce & KSTD_NF_LAZY)==0)) 1523 1523 { 1524 1524 for (i=strat->sl; i>=0; i--) … … 1548 1548 } 1549 1549 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 1550 p = redMoraNF(p,strat, lazyReduce & 2);1551 if ((p!=NULL)&&((lazyReduce & 1)==0))1550 p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART); 1551 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0)) 1552 1552 { 1553 1553 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } … … 2136 2136 if(rIsSCA(currRing)) 2137 2137 { 2138 2139 2138 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing); 2140 2139 const unsigned int m_iLastAltVar = scaLastAltVar(currRing); … … 2148 2147 } 2149 2148 #endif 2150 2151 // assume(!rIsSCA(currRing)); 2152 2149 2153 2150 // if (TEST_OPT_PROT) 2154 2151 // { … … 2217 2214 id_Delete( &tempF, currRing); 2218 2215 #endif 2219 2216 2220 2217 return shdl; 2221 2218 } -
kernel/kstd1.h
r19408c r18ff4c 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: kstd1.h,v 1. 1.1.1 2003-10-06 12:15:53Singular Exp $ */6 /* $Id: kstd1.h,v 1.2 2007-07-25 10:53:15 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 16 16 */ 17 17 ideal mora (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat); 18 19 // lazy_reduce flags: can be combined by | 20 #define KSTD_NF_LAZY 1 21 // do only a reduction of the leading term 22 #define KSTD_NF_ECART 2 23 // only local: recude even with bad ecart 24 #define KSTD_NF_NONORM 4 25 // only global: avoid normamlization, return a multiply of NF 18 26 19 27 poly kNF1(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce); -
kernel/kstd2.cc
r19408c r18ff4c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd2.cc,v 1.5 2 2007-07-25 10:03:20Singular Exp $ */4 /* $Id: kstd2.cc,v 1.53 2007-07-25 10:53:15 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: alg. of Buchberger … … 1416 1416 int max_ind; 1417 1417 p = redNF(pCopy(q),max_ind,strat); 1418 if ((p!=NULL)&&((lazyReduce & 1)==0))1418 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0)) 1419 1419 { 1420 1420 BITSET save=test; 1421 1421 test &= ~Sy_bit(OPT_INTSTRATEGY); 1422 1422 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 1423 p = redtailBba(p,max_ind,strat,(lazyReduce & 4)==0);1423 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); 1424 1424 test=save; 1425 1425 } … … 1470 1470 if (TEST_OPT_PROT) { PrintS("r");mflush(); } 1471 1471 p = redNF(pCopy(q->m[i]),max_ind,strat); 1472 if ((p!=NULL)&&((lazyReduce & 1)==0))1472 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0)) 1473 1473 { 1474 1474 BITSET save=test; 1475 1475 test &= ~Sy_bit(OPT_INTSTRATEGY); 1476 1476 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 1477 p = redtailBba(p,max_ind,strat,(lazyReduce & 4)==0);1477 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); 1478 1478 test=save; 1479 1479 } -
kernel/kstdfac.cc
r19408c r18ff4c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstdfac.cc,v 1.1 0 2007-07-13 14:19:26Singular Exp $ */4 /* $Id: kstdfac.cc,v 1.11 2007-07-25 10:53:15 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: factorizing alg. of Buchberger … … 433 433 if (n->D->m[j]!=NULL) 434 434 { 435 poly r=kNF(n->Shdl,NULL,n->D->m[j],0, TRUE);435 poly r=kNF(n->Shdl,NULL,n->D->m[j],0,KSTD_NF_LAZY | KSTD_NF_NONORM); 436 436 if (r==NULL) 437 437 { … … 487 487 if ((n->sl>=0)&&(n->S[0]!=NULL)) 488 488 { 489 ideal r=kNF(n->Shdl,NULL,Lj->d,0, TRUE);489 ideal r=kNF(n->Shdl,NULL,Lj->d,0,KSTD_NF_LAZY | KSTD_NF_NONORM); 490 490 #ifndef NDEBUG 491 491 if(strat_fac_debug) … … 749 749 if (n->D->m[j]!=NULL) 750 750 { 751 poly r=kNF(n->Shdl,NULL,n->D->m[j],0, TRUE);751 poly r=kNF(n->Shdl,NULL,n->D->m[j],0,KSTD_NF_LAZY | KSTD_NF_NONORM); 752 752 if (r==NULL) 753 753 { … … 805 805 if ((n->sl>=0)&&(n->S[0]!=NULL)) 806 806 { 807 ideal r=kNF(n->Shdl,NULL,Lj->d,0, TRUE);807 ideal r=kNF(n->Shdl,NULL,Lj->d,0,KSTD_NF_LAZY | KSTD_NF_NONORM); 808 808 if (idIs0(r)) 809 809 { … … 976 976 while(Li!=Lj) 977 977 { 978 ideal r=kNF(Lj->d,NULL,Li->d,0, TRUE);978 ideal r=kNF(Lj->d,NULL,Li->d,0,KSTD_NF_LAZY | KSTD_NF_NONORM); 979 979 if (idIs0(r)) 980 980 { -
kernel/sca.cc
r19408c r18ff4c 7 7 * Author: motsak (Oleksandr Motsak) 8 8 * Created: 2006/12/18 9 * Version: $Id: sca.cc,v 1.1 2 2007-07-24 16:34:00 motsakExp $9 * Version: $Id: sca.cc,v 1.13 2007-07-25 10:53:15 Singular Exp $ 10 10 *******************************************************************/ 11 11 … … 976 976 #if MYTEST 977 977 PrintS("<sca_gr_bba>\n"); 978 #endif 978 #endif 979 979 980 980 assume(rIsSCA(currRing)); … … 982 982 #ifndef NDEBUG 983 983 idTest(F); 984 idTest(Q); 984 idTest(Q); 985 985 #endif 986 986 987 987 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing); 988 988 const unsigned int m_iLastAltVar = scaLastAltVar(currRing); 989 989 990 990 ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing); 991 991 ideal tempQ = Q; … … 1112 1112 #endif 1113 1113 assume( save != NULL ); 1114 1114 1115 1115 // SCA Specials: 1116 1116 1117 1117 { 1118 1118 const poly pNext = pNext(save); 1119 1119 1120 1120 if( pNext != NULL ) 1121 1121 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ ) … … 1123 1123 { 1124 1124 assume(p_GetExp(save, i, currRing) == 1); 1125 1125 1126 1126 const poly tt = sca_pp_Mult_xi_pp(i, pNext, currRing); 1127 1127 … … 1205 1205 1206 1206 if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat); 1207 1207 1208 1208 id_Delete(&tempF, currRing); 1209 1209 … … 1233 1233 // 1. rG is a commutative polynomial ring \otimes anticommutative algebra 1234 1234 // 2. factor ideal rGR->qideal contains squares of all alternating variables. 1235 // 1235 // 1236 1236 // if yes, make rGR a super-commutative algebra! 1237 1237 // NOTE: Factors of SuperCommutative Algebras are supported this way! … … 1275 1275 assume(MATELEM(C,i,j) != NULL); // after CallPlural! 1276 1276 number c = p_GetCoeff(MATELEM(C,i,j), rBase); 1277 1277 1278 1278 if( n_IsMOne(c, rBase) ) 1279 { 1280 if( i < iAltVarStart) 1279 { 1280 if( i < iAltVarStart) 1281 1281 iAltVarStart = i; 1282 1282 1283 1283 if( j > iAltVarEnd) 1284 1284 iAltVarEnd = j; … … 1298 1298 if( (iAltVarEnd == -1) || (iAltVarStart == (N+1)) ) 1299 1299 return false; // either no alternating varables, or a single one => we are in commutative case! 1300 1300 1301 1301 for(int i = 1; i < N; i++) 1302 1302 { … … 1304 1304 { 1305 1305 assume(MATELEM(C,i,j) != NULL); // after CallPlural! 1306 number c = p_GetCoeff(MATELEM(C,i,j), rBase); 1306 number c = p_GetCoeff(MATELEM(C,i,j), rBase); 1307 1307 1308 1308 if( (iAltVarStart <= i) && (j <= iAltVarEnd) ) // S <= i < j <= E … … 1344 1344 assume(rGR->qideal != NULL); 1345 1345 assume(rG->qideal == NULL); 1346 1346 1347 1347 const ideal idQuotient = rGR->qideal; 1348 1348 1349 // check for 1350 // y_{iAltVarStart}^2, y_{iAltVarStart+1}^2, \ldots, y_{iAltVarEnd}^2 (iAltVarEnd > iAltVarStart) 1349 // check for 1350 // y_{iAltVarStart}^2, y_{iAltVarStart+1}^2, \ldots, y_{iAltVarEnd}^2 (iAltVarEnd > iAltVarStart) 1351 1351 // to be within quotient ideal. 1352 1352 … … 1360 1360 1361 1361 // square = NF( var(i)^2 | Q ) 1362 // NOTE: rSaveRing == currRing now! 1362 // NOTE: rSaveRing == currRing now! 1363 1363 // NOTE: there is no better way to check this in general! 1364 square = kNF(idQuotient, NULL, square, 0, 0); 1365 1364 square = kNF(idQuotient, NULL, square, 0, 0); 1365 1366 1366 if( square != NULL ) // var(i)^2 is not in Q? 1367 1367 { 1368 1368 p_Delete(&square, rSaveRing); 1369 bSCA = false; 1370 } 1371 } 1372 1369 bSCA = false; 1370 } 1371 } 1372 1373 1373 1374 1374 if (bWeChangeRing) … … 1378 1378 1379 1379 if(!bSCA) return false; 1380 1380 1381 1381 1382 1382 … … 1392 1392 1393 1393 idSkipZeroes( tempQ ); 1394 1394 1395 1395 if( idIs0(tempQ) ) 1396 1396 rGR->nc->SCAQuotient() = NULL; … … 1407 1407 sca_p_ProcsSet(rGR, rGR->p_Procs); 1408 1408 1409 1409 1410 1410 return true; 1411 1411 } … … 1454 1454 tempQ = currRing->nc->SCAQuotient(); 1455 1455 1456 // Q or tempQ will not be used below :((( 1456 // Q or tempQ will not be used below :((( 1457 1457 1458 1458 bool bIdHomog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL! … … 1685 1685 { 1686 1686 assume(p_GetExp(pSave, i, currRing) == 1); 1687 1687 1688 1688 const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing); 1689 1689 … … 1866 1866 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing); 1867 1867 const unsigned int m_iLastAltVar = scaLastAltVar(currRing); 1868 1868 1869 1869 ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing); 1870 1870 1871 1871 ideal tempQ = Q; 1872 1872 … … 2133 2133 if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat); 2134 2134 idTest(strat->Shdl); 2135 2135 2136 2136 id_Delete( &tempF, currRing); 2137 2137 2138 2138 return (strat->Shdl); 2139 2139 } … … 2211 2211 // x-es and y-s are weighted by wx and wy resp. 2212 2212 // [optional] components have weights by wCx and wCy. 2213 inline void m_GetBiDegree(const poly m, 2214 const intvec *wx, const intvec *wy, 2215 const intvec *wCx, const intvec *wCy, 2213 inline void m_GetBiDegree(const poly m, 2214 const intvec *wx, const intvec *wy, 2215 const intvec *wCx, const intvec *wCy, 2216 2216 int& dx, int& dy, const ring r) 2217 2217 { 2218 2218 const unsigned int N = r->N; 2219 2219 2220 2220 p_Test(m, r); 2221 2221 2222 2222 assume( wx != NULL ); 2223 2223 assume( wy != NULL ); 2224 2224 2225 2225 assume( wx->cols() == 1 ); 2226 2226 assume( wy->cols() == 1 ); … … 2231 2231 int x = 0; 2232 2232 int y = 0; 2233 2233 2234 2234 for(int i = N; i > 0; i--) 2235 2235 { … … 2238 2238 y += d * (*wy)[i-1]; 2239 2239 } 2240 2240 2241 2241 if( (wCx != NULL) && (wCy != NULL) ) 2242 2242 { … … 2247 2247 2248 2248 if( wCy->range(c) ) 2249 x += (*wCy)[c]; 2250 } 2251 2249 x += (*wCy)[c]; 2250 } 2251 2252 2252 dx = x; 2253 2253 dy = y; … … 2256 2256 // returns true if polynom p is bi-homogenous with respect to the given weights 2257 2257 // simultaneously sets bi-Degree 2258 bool p_IsBiHomogeneous(const poly p, 2259 const intvec *wx, const intvec *wy, 2260 const intvec *wCx, const intvec *wCy, 2258 bool p_IsBiHomogeneous(const poly p, 2259 const intvec *wx, const intvec *wy, 2260 const intvec *wCx, const intvec *wCy, 2261 2261 int &dx, int &dy, 2262 2262 const ring r) 2263 2263 { 2264 if( p == NULL ) 2264 if( p == NULL ) 2265 2265 { 2266 2266 dx = 0; … … 2280 2280 for(; q != NULL; pIter(q) ) 2281 2281 { 2282 int x, y; 2283 2282 int x, y; 2283 2284 2284 m_GetBiDegree( q, wx, wy, wCx, wCy, x, y, r); // get bi degree of q 2285 2285 2286 2286 if ( (x != ddx) || (y != ddy) ) return false; 2287 2287 } 2288 2288 2289 2289 dx = ddx; 2290 2290 dy = ddy; … … 2295 2295 2296 2296 // returns true if id is bi-homogenous without respect to the given weights 2297 bool id_IsBiHomogeneous(const ideal id, 2298 const intvec *wx, const intvec *wy, 2299 const intvec *wCx, const intvec *wCy, 2297 bool id_IsBiHomogeneous(const ideal id, 2298 const intvec *wx, const intvec *wy, 2299 const intvec *wCx, const intvec *wCy, 2300 2300 const ring r) 2301 2301 { … … 2325 2325 const int CommutativeVariable = 1; 2326 2326 const int AntiCommutativeVariable = 0; 2327 2327 2328 2328 intvec* w = new intvec(N, 1, CommutativeVariable); 2329 2329 2330 2330 if( rIsSCA(r) ) 2331 2331 { 2332 2332 const unsigned int m_iFirstAltVar = scaFirstAltVar(r); 2333 const unsigned int m_iLastAltVar = scaLastAltVar(r); 2333 const unsigned int m_iLastAltVar = scaLastAltVar(r); 2334 2334 2335 2335 for (unsigned int i = m_iFirstAltVar; i<= m_iLastAltVar; i++) 2336 2336 { 2337 2337 (*w)[i-1] = AntiCommutativeVariable; 2338 } 2338 } 2339 2339 } 2340 2340 return w; … … 2351 2351 const int CommutativeVariable = 0; 2352 2352 const int AntiCommutativeVariable = 1; 2353 2353 2354 2354 intvec* w = new intvec(N, 1, CommutativeVariable); 2355 2355 2356 2356 if( rIsSCA(r) ) 2357 2357 { 2358 2358 const unsigned int m_iFirstAltVar = scaFirstAltVar(r); 2359 const unsigned int m_iLastAltVar = scaLastAltVar(r); 2359 const unsigned int m_iLastAltVar = scaLastAltVar(r); 2360 2360 2361 2361 for (unsigned int i = m_iFirstAltVar; i<= m_iLastAltVar; i++) 2362 2362 { 2363 2363 (*w)[i-1] = AntiCommutativeVariable; 2364 } 2364 } 2365 2365 } 2366 2366 return w; … … 2372 2372 // reduce term lt(m) modulo <y_i^2> , i = iFirstAltVar .. iLastAltVar: 2373 2373 // either create a copy of m or return NULL 2374 inline poly m_KillSquares(const poly m, 2375 const unsigned int iFirstAltVar, const unsigned int iLastAltVar, 2374 inline poly m_KillSquares(const poly m, 2375 const unsigned int iFirstAltVar, const unsigned int iLastAltVar, 2376 2376 const ring r) 2377 { 2377 { 2378 2378 #ifdef PDEBUG 2379 2379 p_Test(m, r); … … 2389 2389 for(unsigned int k = iFirstAltVar; k <= iLastAltVar; k++) 2390 2390 if( p_GetExp(m, k, r) > 1 ) 2391 return NULL; 2392 2391 return NULL; 2392 2393 2393 return p_Head(m, r); 2394 2394 } … … 2396 2396 2397 2397 // reduce polynomial p modulo <y_i^2> , i = iFirstAltVar .. iLastAltVar 2398 poly p_KillSquares(const poly p, 2399 const unsigned int iFirstAltVar, const unsigned int iLastAltVar, 2398 poly p_KillSquares(const poly p, 2399 const unsigned int iFirstAltVar, const unsigned int iLastAltVar, 2400 2400 const ring r) 2401 { 2401 { 2402 2402 #ifdef PDEBUG 2403 2403 p_Test(p, r); … … 2422 2422 #endif 2423 2423 2424 // terms will be in the same order because of quasi-ordering! 2424 // terms will be in the same order because of quasi-ordering! 2425 2425 poly v = m_KillSquares(q, iFirstAltVar, iLastAltVar, r); 2426 2426 … … 2443 2443 return(pResult); 2444 2444 } 2445 2445 2446 2446 2447 2447 2448 2448 2449 2449 // reduces ideal id modulo <y_i^2> , i = iFirstAltVar .. iLastAltVar 2450 // returns the reduced ideal or zero ideal. 2451 ideal id_KillSquares(const ideal id, 2452 const unsigned int iFirstAltVar, const unsigned int iLastAltVar, 2450 // returns the reduced ideal or zero ideal. 2451 ideal id_KillSquares(const ideal id, 2452 const unsigned int iFirstAltVar, const unsigned int iLastAltVar, 2453 2453 const ring r) 2454 2454 { … … 2458 2458 2459 2459 if (iSize == 0) return id; 2460 2460 2461 2461 ideal temp = idInit(iSize, id->rank); 2462 2462 2463 2463 #if 0 2464 2464 PrintS("<id_KillSquares>\n"); … … 2474 2474 } 2475 2475 #endif 2476 2476 2477 2477 2478 2478 for (int j = 0; j < iSize; j++) -
kernel/units.cc
r19408c r18ff4c 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: units.cc,v 1. 1.1.1 2003-10-06 12:16:04Singular Exp $ */4 /* $Id: units.cc,v 1.2 2007-07-25 10:53:15 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: procedures to compute with units … … 33 33 } 34 34 ideal M0=idInit(IDELEMS(M),M->rank); 35 ideal M1=kNF(N,currQuotient,M,0, 2);35 ideal M1=kNF(N,currQuotient,M,0,KSTD_NF_ECART); 36 36 while(idElem(M1)>0&&(d==-1||idMinDegW(M1,w)<=d)) 37 37 { … … 46 46 } 47 47 idDelete(&M1); 48 M1=kNF(N,currQuotient,M,0, 2);48 M1=kNF(N,currQuotient,M,0,KSTD_NF_ECART); 49 49 } 50 50 idDelete(&M1);
Note: See TracChangeset
for help on using the changeset viewer.