Changeset 1f637e in git for kernel/kstd1.cc
- Timestamp:
- Jul 19, 2011, 5:11:57 PM (13 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 1c4e9a5798bda4bc92d0013041b99005a50a7d7c
- Parents:
- 6ed8c424bfe6fd9dc397bfdde3e8acf884469342
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-07-19 17:11:57+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:52:40+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd1.cc
r6ed8c4 r1f637e 642 642 643 643 /*2 644 *looks whether exactly pVariables-1 axis are used644 *looks whether exactly (currRing->N)-1 axis are used 645 645 *returns last != 0 in this case 646 646 *last is the (first) unused axis … … 657 657 { 658 658 i++; 659 if (i > pVariables) break;659 if (i > (currRing->N)) break; 660 660 if (strat->NotUsedAxis[i]) 661 661 { … … 942 942 if (ecartWeights) 943 943 { 944 omFreeSize((ADDRESS)ecartWeights,( pVariables+1)*sizeof(short));944 omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short)); 945 945 ecartWeights=NULL; 946 946 } … … 1088 1088 //else 1089 1089 { 1090 ecartWeights=(short *)omAlloc(( pVariables+1)*sizeof(short));1090 ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short)); 1091 1091 /*uses automatic computation of the ecartWeights to set them*/ 1092 1092 kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights); … … 1095 1095 if (TEST_OPT_PROT) 1096 1096 { 1097 for(i=1; i<= pVariables; i++)1097 for(i=1; i<=(currRing->N); i++) 1098 1098 Print(" %d",ecartWeights[i]); 1099 1099 PrintLn(); … … 1108 1108 idhdl h; 1109 1109 1110 strat->NotUsedAxis = (BOOLEAN *)omAlloc(( pVariables+1)*sizeof(BOOLEAN));1111 for (j= pVariables; j>0; j--) strat->NotUsedAxis[j] = TRUE;1110 strat->NotUsedAxis = (BOOLEAN *)omAlloc(((currRing->N)+1)*sizeof(BOOLEAN)); 1111 for (j=(currRing->N); j>0; j--) strat->NotUsedAxis[j] = TRUE; 1112 1112 strat->enterS = enterSMora; 1113 1113 strat->initEcartPair = initEcartPairMora; /*- ecart approximation -*/ … … 1146 1146 //else 1147 1147 { 1148 ecartWeights=(short *)omAlloc(( pVariables+1)*sizeof(short));1148 ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short)); 1149 1149 /*uses automatic computation of the ecartWeights to set them*/ 1150 1150 kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights); … … 1154 1154 if (TEST_OPT_PROT) 1155 1155 { 1156 for(i=1; i<= pVariables; i++)1156 for(i=1; i<=(currRing->N); i++) 1157 1157 Print(" %d",ecartWeights[i]); 1158 1158 PrintLn(); … … 1400 1400 strat->lastAxis = 0; //??? 1401 1401 pDelete(&strat->kNoether); 1402 omFreeSize((ADDRESS)strat->NotUsedAxis,( pVariables+1)*sizeof(BOOLEAN));1402 omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN)); 1403 1403 if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat); 1404 1404 if (TEST_OPT_WEIGHTM) … … 1407 1407 if (ecartWeights) 1408 1408 { 1409 omFreeSize((ADDRESS)ecartWeights,( pVariables+1)*sizeof(short));1409 omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short)); 1410 1410 ecartWeights=NULL; 1411 1411 } … … 1517 1517 omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int)); 1518 1518 omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long)); 1519 omFreeSize((ADDRESS)strat->NotUsedAxis,( pVariables+1)*sizeof(BOOLEAN));1519 omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN)); 1520 1520 omfree(strat->sevT); 1521 1521 omfree(strat->S_2_R); … … 1535 1535 if (ecartWeights) 1536 1536 { 1537 omFreeSize((ADDRESS *)&ecartWeights,( pVariables+1)*sizeof(short));1537 omFreeSize((ADDRESS *)&ecartWeights,((currRing->N)+1)*sizeof(short)); 1538 1538 ecartWeights=NULL; 1539 1539 } … … 1656 1656 omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int)); 1657 1657 omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long)); 1658 omFreeSize((ADDRESS)strat->NotUsedAxis,( pVariables+1)*sizeof(BOOLEAN));1658 omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN)); 1659 1659 omfree(strat->sevT); 1660 1660 omfree(strat->S_2_R); … … 1674 1674 if (ecartWeights) 1675 1675 { 1676 omFreeSize((ADDRESS *)&ecartWeights,( pVariables+1)*sizeof(short));1676 omFreeSize((ADDRESS *)&ecartWeights,((currRing->N)+1)*sizeof(short)); 1677 1677 ecartWeights=NULL; 1678 1678 } … … 2205 2205 strat->ak = idRankFreeModule(tempF); 2206 2206 initBuchMoraCrit(strat); 2207 strat->NotUsedAxis = (BOOLEAN *)omAlloc(( pVariables+1)*sizeof(BOOLEAN));2208 for (j= pVariables; j>0; j--) strat->NotUsedAxis[j] = TRUE;2207 strat->NotUsedAxis = (BOOLEAN *)omAlloc(((currRing->N)+1)*sizeof(BOOLEAN)); 2208 for (j=(currRing->N); j>0; j--) strat->NotUsedAxis[j] = TRUE; 2209 2209 strat->enterS = enterSBba; 2210 2210 strat->posInT = posInT17; … … 2228 2228 omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int)); 2229 2229 omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long)); 2230 omFreeSize((ADDRESS)strat->NotUsedAxis,( pVariables+1)*sizeof(BOOLEAN));2230 omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN)); 2231 2231 omfree(strat->sevT); 2232 2232 omfree(strat->S_2_R); … … 2507 2507 if (ecartWeights) 2508 2508 { 2509 omFreeSize((ADDRESS)ecartWeights,( pVariables+1)*sizeof(short));2509 omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short)); 2510 2510 ecartWeights=NULL; 2511 2511 }
Note: See TracChangeset
for help on using the changeset viewer.