Changeset 5b45a4 in git
- Timestamp:
- Sep 16, 2014, 4:57:17 PM (9 years ago)
- Branches:
- (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
- Children:
- 46f37cb57098799d8399fc704c5b3ca2020ca0c1
- Parents:
- eb55f8a52fe5ee84d19c269132981a40defce0da
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-09-16 16:57:17+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-09-23 20:15:33+02:00
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/khstd.cc
reb55f8a r5b45a4 156 156 Lm = id_Head(strat->Shdl,currRing); 157 157 158 newhilb =hHstdSeries(Lm,w,strat->kHomW,Q,currRing); 158 newhilb =hHstdSeries(Lm,w,strat->kHomW,Q,currRing); // ,strat->tailRing? 159 159 160 160 #if ADIDEBUG -
kernel/combinatorics/hdegree.cc
reb55f8a r5b45a4 838 838 } 839 839 840 static void hDegree0(ideal S, ideal Q, const ring r=currRing)841 { 842 id_Test (S, r);843 id_Test (Q, r);840 static void hDegree0(ideal S, ideal Q, const ring tailRing) 841 { 842 id_TestTail(S, currRing, tailRing); 843 id_TestTail(Q, currRing, tailRing); 844 844 845 845 int mc; 846 hexist = hInit(S, Q, &hNexist, r);846 hexist = hInit(S, Q, &hNexist, tailRing); 847 847 if (!hNexist) 848 848 { … … 852 852 else 853 853 hMu = 0; 854 855 const ring r = currRing; 856 854 857 hwork = (scfmon)omAlloc(hNexist * sizeof(scmon)); 855 858 hvar = (varset)omAlloc(((r->N) + 1) * sizeof(int)); … … 909 912 } 910 913 911 int scMult0Int(ideal S, ideal Q, const ring r)912 { 913 id_Test (S, r);914 id_Test (Q, r);915 hDegree0(S, Q );914 int scMult0Int(ideal S, ideal Q, const ring tailRing) 915 { 916 id_TestTail(S, currRing, tailRing); 917 id_TestTail(Q, currRing, tailRing); 918 hDegree0(S, Q, tailRing); 916 919 return hMu; 917 920 } … … 1016 1019 1017 1020 hNvar = (currRing->N); 1018 hexist = hInit(S, Q, &hNexist, tailRing); 1021 hexist = hInit(S, Q, &hNexist, tailRing); // tailRing? 1019 1022 if (k!=0) 1020 1023 hComp(hexist, hNexist, k, hexist, &hNstc); … … 1309 1312 } 1310 1313 1311 static ideal scIdKbase() 1312 { 1313 polyset mm; 1314 ideal res; 1315 poly p, q = last; 1316 int i = pLength(q); 1317 res = idInit(i,1); 1318 mm = res->m; 1319 i = 0; 1314 static ideal scIdKbase(poly q, const int rank) 1315 { 1316 ideal res = idInit(pLength(q), rank); 1317 polyset mm = res->m; 1318 int i = 0; 1320 1319 do 1321 1320 { 1322 mm[i] = q;1323 i++; 1324 p = pNext(q);1321 *mm = q; ++mm; 1322 1323 const poly p = pNext(q); 1325 1324 pNext(q) = NULL; 1326 1325 q = p; 1326 1327 1327 } while (q!=NULL); 1328 1328 1329 id_Test(res, currRing); 1329 id_Test(res, currRing); // WRONG RANK!!!??? 1330 1330 return res; 1331 1331 } … … 1391 1391 if (p == NULL) 1392 1392 return idInit(1,s->rank); 1393 else 1394 { 1395 last = p; 1396 ideal res=scIdKbase(); 1397 res->rank=s->rank; 1398 id_Test(res, currRing); 1399 return res; 1400 } 1393 1394 last = p; 1395 return scIdKbase(p, s->rank); 1401 1396 } 1402 1397 1403 1398 #if 0 //-- alternative implementation of scComputeHC 1399 /* 1404 1400 void scComputeHCw(ideal ss, ideal Q, int ak, poly &hEdge, ring tailRing) 1405 1401 { … … 1422 1418 hexist = hInit(s, Q, &hNexist, currRing); 1423 1419 p = last = pInit(); 1424 / *pNext(p) = NULL;*/1420 // pNext(p) = NULL; 1425 1421 act = (scmon)omAlloc(((currRing->N) + 1) * sizeof(int)); 1426 1422 *act = 0; … … 1463 1459 { 1464 1460 last = p; 1465 ideal res=scIdKbase(); 1466 res->rank=ss->rank; 1461 ideal res=scIdKbase(p, ss->rank); 1467 1462 poly p_ind=res->m[0]; int ind=0; 1468 1463 for(i=IDELEMS(res)-1;i>0;i--) … … 1484 1479 } 1485 1480 } 1481 */ 1486 1482 #endif -
kernel/combinatorics/hilb.cc
reb55f8a r5b45a4 1138 1138 int /*notstc*/, intvec *wdegree, ideal Q, ring tailRing) 1139 1139 { 1140 id_TestTail(S, currRing, tailRing);1140 // id_TestTail(S, currRing, tailRing); 1141 1141 1142 1142 intvec *work, *hseries1=NULL; … … 1293 1293 intvec * hHstdSeries(ideal S, intvec *modulweight, intvec *wdegree, ideal Q, ring tailRing) 1294 1294 { 1295 id_TestTail(S, currRing, tailRing); 1296 id_TestTail(Q, currRing, tailRing); 1295 1297 return hSeries(S, modulweight, 0, wdegree, Q, tailRing); 1296 1298 } … … 1298 1300 intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing) 1299 1301 { 1302 id_TestTail(S, currRing, tailRing); 1303 id_TestTail(Q, currRing, tailRing); 1300 1304 return hSeries(S, modulweight, 1, wdegree, Q, tailRing); 1301 1305 } -
kernel/combinatorics/stairc.h
reb55f8a r5b45a4 27 27 int scDimInt(ideal s,ideal Q=NULL); 28 28 int scMultInt(ideal s,ideal Q=NULL); 29 int scMult0Int(ideal s,ideal Q=NULL, const ring r=currRing);29 int scMult0Int(ideal s,ideal Q=NULL, const ring tailRing = currRing); 30 30 void scPrintDegree(int co, int mu); 31 31 void scDegree(ideal s,intvec *modulweight,ideal Q=NULL); -
kernel/ideals.cc
reb55f8a r5b45a4 45 45 46 46 /* #define WITH_OLD_MINOR */ 47 #define pCopy_noCheck(p) pCopy(p)48 47 49 48 /*0 implementation*/ … … 1209 1208 * 1210 1209 */ 1211 static ideal idInitializeQuot (ideal h1, ideal h2, BOOLEAN h1IsStb, 1212 BOOLEAN *addOnlyOne, int *kkmax) 1213 { 1210 static ideal idInitializeQuot (ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN *addOnlyOne, int *kkmax) 1211 { 1212 idTest(h1); 1213 idTest(h2); 1214 1214 1215 ideal temph1; 1215 1216 poly p,q = NULL; … … 1267 1268 if (h4->m[i-1]!=NULL) 1268 1269 { 1269 p = p Copy_noCheck(h4->m[i-1]);1270 p_Shift(&p,1,currRing);1270 p = p_Copy_noCheck(h4->m[i-1], currRing); p_Shift(&p,1,currRing); 1271 // pTest(p); 1271 1272 h4->m[i] = p; 1272 1273 } … … 1313 1314 } 1314 1315 idDelete(&temph1); 1316 idTest(h4); 1315 1317 return h4; 1316 1318 } -
libpolys/polys/monomials/p_polys.h
reb55f8a r5b45a4 801 801 * 802 802 ***************************************************************/ 803 // returns a copy of p 803 /// returns a copy of p (without any additional testing) 804 static inline poly p_Copy_noCheck(poly p, const ring r) 805 { 806 assume(r != NULL); assume(r->p_Procs != NULL); assume(r->p_Procs->p_Copy != NULL); 807 return r->p_Procs->p_Copy(p, r); 808 } 809 810 /// returns a copy of p 804 811 static inline poly p_Copy(poly p, const ring r) 805 812 { 806 const poly pp = r->p_Procs->p_Copy(p, r); 813 p_Test(p,r); 814 const poly pp = p_Copy_noCheck(p, r); 807 815 p_Test(pp,r); 808 816 return pp; … … 829 837 #ifndef PDEBUG 830 838 if (tailRing == lmRing) 831 return tailRing->p_Procs->p_Copy(p, tailRing);839 return p_Copy_noCheck(p, tailRing); 832 840 #endif 833 841 poly pres = p_Head(p, lmRing); 834 pNext(pres) = tailRing->p_Procs->p_Copy(pNext(p), tailRing);842 pNext(pres) = p_Copy_noCheck(pNext(p), tailRing); 835 843 return pres; 836 844 }
Note: See TracChangeset
for help on using the changeset viewer.