Changeset 0deb6a in git


Ignore:
Timestamp:
Aug 4, 2011, 11:54:26 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '0bc2210f8055033868008a3836878db65ec6f89e')
Children:
74d48c1a17242972a66858ee7285e5ac056722cd
Parents:
ed82272d0e143c59b60e31b441961e2bbc3f3afd
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-08-04 11:54:26+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:14:24+01:00
Message:
 fix walk_ip.cc (currRingHdl/rSetHdl not needed)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/walk_ip.cc

    red8227 r0deb6a  
    6767    test &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set
    6868
    69     idhdl destRingHdl = currRingHdl;
    7069    ring destRing = currRing;
    7170    ideal destIdeal = NULL;
    7271    idhdl sourceRingHdl = (idhdl)first->data;
    73     rSetHdl( sourceRingHdl );
    74     ring sourceRing = currRing;
     72    ring sourceRing = IDRING(sourceRingHdl);
     73    rChangeCurrRing( sourceRing );
    7574
    7675    if(state==WalkOk)
    7776    {
    7877      int * vperm = (int *)omAlloc0( (currRing->N+1)*sizeof( int ) );
    79       state= walkConsistency( IDRING(sourceRingHdl), IDRING(destRingHdl), vperm );
     78      state= walkConsistency( sourceRing, destRing, vperm );
    8079      omFreeSize( (ADDRESS)vperm, (currRing->N+1)*sizeof(int) );
    8180    }
     
    112111
    113112    ring almostDestRing=currRing;
    114     rSetHdl(destRingHdl);
     113    rChangeCurrRing(destRing);
    115114
    116115    switch (state) {
     
    132131        case WalkIncompatibleSourceRing:
    133132          Werror( "Order of %s not allowed,\n must be a combination of a,A,lp,dp,Dp,wp,Wp,M and C.\n",first->Name());
    134           rSetHdl(destRingHdl);
     133          rChangeCurrRing(destRing);
    135134          destIdeal= idInit(0,0);
    136135          break;
     
    172171  //unperturbedStartVectorStrategy SHOULD BE SET BY THE USER THROUGH
    173172  //A THIRD ARGUMENT. TRUE MEANS THAT THE UNPERTURBED START
    174   //VECTOR STRATEGY IS USED AND FALSE THAT THE START VECTOR IS 
     173  //VECTOR STRATEGY IS USED AND FALSE THAT THE START VECTOR IS
    175174  //MAXIMALLY PERTURBED
    176175
     
    181180    test &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set
    182181
    183     idhdl destRingHdl = currRingHdl;
    184182    ring destRing = currRing;
    185183    ideal destIdeal = NULL;
     
    189187
    190188    int * vperm = (int *)omAlloc0( (currRing->N+1)*sizeof( int ) );
    191     state= fractalWalkConsistency( IDRING(sourceRingHdl), IDRING(destRingHdl), vperm );
     189    state= fractalWalkConsistency( sourceRing, destRing, vperm );
    192190    omFreeSize( (ADDRESS)vperm, (currRing->N+1)*sizeof(int) );
    193191
     
    219217     {
    220218       ring almostDestRing=currRing;
    221        rSetHdl(destRingHdl);
    222        destIdeal=idrMoveR(destIdeal,currRing,almostDestRing);
     219       rChangeCurrRing(destRing);
     220       destIdeal=idrMoveR(destIdeal,destRing,almostDestRing);
    223221     }
    224222
     
    234232            Werror( "ring %s and current ring are incompatible\n",
    235233                     first->Name() );
    236             rSetHdl(destRingHdl);
     234            rChangeCurrRing(destRing);
    237235            destIdeal= idInit(0,0);
    238236            return destIdeal;
     
    241239        case WalkIncompatibleDestRing:
    242240            Werror( "Order of basering not allowed,\n must be a combination of lp,dp,Dp,wp,Wp and C or just M.\n");
    243             rSetHdl(destRingHdl);
     241            rChangeCurrRing(destRing);
    244242            destIdeal= idInit(0,0);
    245243            return destIdeal;
     
    249247            Werror( "Order of %s not allowed,\n must be a combination of lp,dp,Dp,wp,Wp and C or just M.\n",
    250248                     first->Name());
    251             rSetHdl(destRingHdl);
     249            rChangeCurrRing(destRing);
    252250            destIdeal= idInit(0,0);
    253251            return destIdeal;
     
    257255            Werror( "Can't find ideal %s in ring %s.\n",
    258256                     second->Name(), first->Name() );
    259             rSetHdl(destRingHdl);
     257            rChangeCurrRing(destRing);
    260258            destIdeal= idInit(0,0);
    261259            return destIdeal;
     
    264262        case WalkOverFlowError:
    265263            Werror( "Overflow occured in ring %s.\n", first->Name() );
    266             rSetHdl(destRingHdl);
     264            rChangeCurrRing(destRing);
    267265            destIdeal= idInit(0,0);
    268266            return destIdeal;
     
    270268
    271269        default:
    272             rSetHdl(destRingHdl);
     270            rChangeCurrRing(destRing);
    273271            destIdeal= idInit(1,1);
    274272            return destIdeal;
Note: See TracChangeset for help on using the changeset viewer.