Changeset 1f637e in git for kernel/kstd1.cc


Ignore:
Timestamp:
Jul 19, 2011, 5:11:57 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
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
Message:
FIX: replaced pVariables by currRing->N...
ADD: added 'void rChangeCurrRing(ring r);' to polys/polys.h
CHG: started changing gr_kstd2.cc and syz*.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/kstd1.cc

    r6ed8c4 r1f637e  
    642642
    643643/*2
    644 *looks whether exactly pVariables-1 axis are used
     644*looks whether exactly (currRing->N)-1 axis are used
    645645*returns last != 0 in this case
    646646*last is the (first) unused axis
     
    657657    {
    658658      i++;
    659       if (i > pVariables) break;
     659      if (i > (currRing->N)) break;
    660660      if (strat->NotUsedAxis[i])
    661661      {
     
    942942      if (ecartWeights)
    943943      {
    944         omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short));
     944        omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short));
    945945        ecartWeights=NULL;
    946946      }
     
    10881088    //else
    10891089    {
    1090       ecartWeights=(short *)omAlloc((pVariables+1)*sizeof(short));
     1090      ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short));
    10911091      /*uses automatic computation of the ecartWeights to set them*/
    10921092      kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights);
     
    10951095    if (TEST_OPT_PROT)
    10961096    {
    1097       for(i=1; i<=pVariables; i++)
     1097      for(i=1; i<=(currRing->N); i++)
    10981098        Print(" %d",ecartWeights[i]);
    10991099      PrintLn();
     
    11081108  idhdl h;
    11091109
    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;
    11121112  strat->enterS = enterSMora;
    11131113  strat->initEcartPair = initEcartPairMora; /*- ecart approximation -*/
     
    11461146    //else
    11471147    {
    1148       ecartWeights=(short *)omAlloc((pVariables+1)*sizeof(short));
     1148      ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short));
    11491149      /*uses automatic computation of the ecartWeights to set them*/
    11501150      kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights);
     
    11541154    if (TEST_OPT_PROT)
    11551155    {
    1156       for(i=1; i<=pVariables; i++)
     1156      for(i=1; i<=(currRing->N); i++)
    11571157        Print(" %d",ecartWeights[i]);
    11581158      PrintLn();
     
    14001400  strat->lastAxis = 0; //???
    14011401  pDelete(&strat->kNoether);
    1402   omFreeSize((ADDRESS)strat->NotUsedAxis,(pVariables+1)*sizeof(BOOLEAN));
     1402  omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN));
    14031403  if (TEST_OPT_PROT) messageStat(srmax,lrmax,hilbcount,strat);
    14041404  if (TEST_OPT_WEIGHTM)
     
    14071407    if (ecartWeights)
    14081408    {
    1409       omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short));
     1409      omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short));
    14101410      ecartWeights=NULL;
    14111411    }
     
    15171517  omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int));
    15181518  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));
    15201520  omfree(strat->sevT);
    15211521  omfree(strat->S_2_R);
     
    15351535    if (ecartWeights)
    15361536    {
    1537       omFreeSize((ADDRESS *)&ecartWeights,(pVariables+1)*sizeof(short));
     1537      omFreeSize((ADDRESS *)&ecartWeights,((currRing->N)+1)*sizeof(short));
    15381538      ecartWeights=NULL;
    15391539    }
     
    16561656  omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int));
    16571657  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));
    16591659  omfree(strat->sevT);
    16601660  omfree(strat->S_2_R);
     
    16741674    if (ecartWeights)
    16751675    {
    1676       omFreeSize((ADDRESS *)&ecartWeights,(pVariables+1)*sizeof(short));
     1676      omFreeSize((ADDRESS *)&ecartWeights,((currRing->N)+1)*sizeof(short));
    16771677      ecartWeights=NULL;
    16781678    }
     
    22052205  strat->ak = idRankFreeModule(tempF);
    22062206  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;
    22092209  strat->enterS      = enterSBba;
    22102210  strat->posInT      = posInT17;
     
    22282228  omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int));
    22292229  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));
    22312231  omfree(strat->sevT);
    22322232  omfree(strat->S_2_R);
     
    25072507    if (ecartWeights)
    25082508    {
    2509       omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short));
     2509      omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short));
    25102510      ecartWeights=NULL;
    25112511    }
Note: See TracChangeset for help on using the changeset viewer.