Changeset 5b45a4 in git for kernel/combinatorics/hdegree.cc
- Timestamp:
- Sep 16, 2014, 4:57:17 PM (10 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.