Changeset f42fe73 in git for kernel/f5gb.cc
- Timestamp:
- Jun 2, 2009, 9:13:30 AM (15 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- ce4f35764efdc6262505d9577e454a29fcc981e9
- Parents:
- a4c5b94c36005f5de0d0d41f05a8e61dcdf10ada
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/f5gb.cc
ra4c5b9 rf42fe73 902 902 tempRed = tempRed->getNext(); 903 903 } 904 //pWrite(kBucketGetLm(bucket)); 905 //Print("HIER AUCH\n"); 906 if(NULL == redPoly) { 907 redPoly = kBucketExtractLm(bucket); 908 //Print("1: "); 909 //pWrite(redPoly); 910 } 911 else { 912 redPoly = p_Merge_q(redPoly,kBucketExtractLm(bucket),currRing); 913 //Print("REDPOLY: "); 914 //pWrite(redPoly); 915 } 916 tempPoly = kBucketGetLm(bucket); 917 //Print("TEMPPOLY2: "); 918 //pWrite(tempPoly); 904 if(NULL != tempPoly) { 905 if(NULL == redPoly) { 906 redPoly = kBucketExtractLm(bucket); 907 } 908 else { 909 redPoly = p_Merge_q(redPoly,kBucketExtractLm(bucket),currRing); 910 } 911 tempPoly = kBucketGetLm(bucket); 912 } 919 913 } 920 914 if(NULL == redPoly) { … … 931 925 criticalPair(gPrev,critPairs,lTag,rTag,rules); 932 926 } 933 // tempMon = tempMon->getNext();934 //}935 927 936 // if there are reducers than reduce l937 938 /*939 if(NULL != good->getFirst()) {940 941 //Print("TO BE REDUCED:\n");942 //pWrite(l->getPoly());943 LNode* tempGood = good->getFirst();944 kBucket* bucket = kBucketCreate();945 kBucketInit(bucket,l->getPoly(),0);946 //Print("\nREDUCERS: \n");947 while(NULL != tempGood) {948 //pWrite(tempGood->getPoly());949 int lTempGood = pLength(tempGood->getPoly());950 kBucket_Minus_m_Mult_p(bucket,pOne(),tempGood->getPoly(),&lTempGood);951 //Print("KBUCKET: ");952 //pWrite(kBucketGetLm(bucket));953 tempGood = tempGood->getNext();954 }955 poly temp = kBucketClear(bucket);956 //pWrite(temp);957 //Print("\n");958 if(NULL != temp) {959 pNorm(temp);960 //Print("NEW REDUCTION: ");961 //pWrite(temp);962 l->setPoly(temp);963 //Print("ELEMENT ADDED TO GPREV1: ");964 //pWrite(l->getPoly());965 //pWrite(l->getTerm());966 //Print("%p\n",gPrev->getLast());967 //pWrite(gPrev->getLast()->getPoly());968 gPrev->insert(l->getLPoly());969 //Print("%p\n",gPrev->getLast());970 //pWrite(gPrev->getLast()->getPoly());971 //rules->print();972 criticalPair(gPrev,critPairs,lTag,rTag,rules);973 //Print("LIST OF CRITICAL PAIRS: \n");974 //critPairs->print();975 //gPrev->print();976 }977 else {978 reductionsToZero++;979 //Print("ZERO REDUCTION\n");980 pDelete(&temp);981 }982 983 /*984 //Print("HIER IN GOOD REDUCTION\n");985 LNode* tempGood = good->getFirst();986 ideal reductionId = idInit(good->getLength(),1);987 int i;988 //Print("\n\n");989 //good->print();990 for(i=0;i<good->getLength();i++) {991 reductionId->m[i] = tempGood->getPoly();992 //Print("REDUCERS:");993 //pWrite(tempGood->getPoly());994 //Print("%p\n",tempGood);995 tempGood = tempGood->getNext();996 }997 //idShow(reductionId);998 //reductionId = idAdd(reductionId,gbPrev);999 //Print("\n\nREDUCTION PROCESS DONE TWICE!");1000 //idDelMultiples(reductionId);1001 //idShow(reductionId);1002 //pWrite(l->getPoly());1003 poly temp = kNF(reductionId,currQuotient,l->getPoly());1004 //pWrite(temp);1005 //poly temp2 = kNF(reductionId,currQuotient,temp);1006 //pWrite(temp2);1007 //Print("\n\n");1008 if(NULL != temp) {1009 pNorm(temp);1010 //Print("NEW REDUCTION: ");1011 //pWrite(temp);1012 l->setPoly(temp);1013 //Print("ELEMENT ADDED TO GPREV1: ");1014 //pWrite(l->getPoly());1015 //pWrite(l->getTerm());1016 //Print("%p\n",gPrev->getLast());1017 //pWrite(gPrev->getLast()->getPoly());1018 gPrev->insert(l->getLPoly());1019 //Print("%p\n",gPrev->getLast());1020 //pWrite(gPrev->getLast()->getPoly());1021 //rules->print();1022 criticalPair(gPrev,critPairs,lTag,rTag,rules);1023 //Print("LIST OF CRITICAL PAIRS: \n");1024 //critPairs->print();1025 //gPrev->print();1026 }1027 else {1028 reductionsToZero++;1029 //Print("ZERO REDUCTION\n");1030 pDelete(&temp);1031 }1032 //pWrite(temp);1033 //for(i=0;i<IDELEMS(reductionId);i++) {1034 //}1035 //idShow(reductionId);1036 //Print("HIER\n");1037 //Print("ADDRESS OF IDEAL: %p\n",&reductionId);1038 idDelete(&reductionId);1039 //Print("HIER\n");1040 1041 1042 }1043 1044 1045 else {1046 //pWrite(l->getPoly());1047 gPrev->insert(l->getLPoly());1048 //Print("ELEMENT ADDED TO GPREV2: ");1049 //pWrite(l->getPoly());1050 //pWrite(l->getTerm());1051 //Print("GENAU HIER: ");1052 //pWrite(l->getPoly());1053 criticalPair(gPrev,critPairs,lTag,rTag,rules);1054 //Print("LIST OF CRITICAL PAIRS: \n");1055 //critPairs->print();1056 }1057 */1058 928 // if there are "bad" reducers than try to compute new S-polynomials and rules 1059 929 … … 1440 1310 //pWrite(gPrevTag->getPoly()); 1441 1311 gPrev = F5inc(i, id->m[i-1], gPrev, gbPrev, ONE, lTag, rules, rTag); 1442 Print("%d\n",gPrev->count(gPrevTag->getNext()));1443 Print("%d\n",gPrev->getLength());1312 //Print("%d\n",gPrev->count(gPrevTag->getNext())); 1313 //Print("%d\n",gPrev->getLength()); 1444 1314 //Print("____________________________________ITERATION STEP DONE________________________________________\n"); 1445 1315 … … 1459 1329 // remove this comment to get "F5" 1460 1330 // 1461 /*1331 1462 1332 if(gPrev->getLength() > gbLength) { 1463 1333 if(i < IDELEMS(id)) { … … 1483 1353 gbPrev = idAdd(gbPrev,gbAdd); 1484 1354 } 1355 if(i == IDELEMS(id)) { 1356 ideal tempId = kInterRed(gbPrev); 1357 gbPrev = tempId; 1358 } 1485 1359 } 1486 1360 gbLength = gPrev->getLength(); 1487 */1361 1488 1362 1489 1363 … … 1517 1391 // interreduction stuff 1518 1392 // comment this out if you want F5 instead of F5R 1519 if(i<IDELEMS(id)) {1393 //if(i<IDELEMS(id)) { 1520 1394 ideal tempId = kInterRed(gbPrev); 1521 1395 gbPrev = tempId; 1522 }1396 //} 1523 1397 } 1524 1398 gbLength = gPrev->getLength(); … … 1530 1404 // computing new groebner basis gbPrev 1531 1405 // 1532 1406 /* 1533 1407 if(gPrev->getLength() > gbLength) { 1534 1408 if(i < IDELEMS(id)) { … … 1550 1424 gbPrev = idAdd(gbPrev,gbAdd); 1551 1425 } 1552 if(i<IDELEMS(id)) {1426 //if(i<IDELEMS(id)) { 1553 1427 ideal tempId = kInterRed(gbPrev); 1554 1428 Print("HERE\n"); … … 1566 1440 rTag->insert(rules->getFirst()); 1567 1441 } 1568 }1442 //} 1569 1443 gbLength = gPrev->getLength(); 1570 1444 } 1571 1445 */ 1572 1446 1573 1447
Note: See TracChangeset
for help on using the changeset viewer.