Changeset 0deb6a in git for Singular/walk_ip.cc
- Timestamp:
- Aug 4, 2011, 11:54:26 AM (12 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/walk_ip.cc
red8227 r0deb6a 67 67 test &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set 68 68 69 idhdl destRingHdl = currRingHdl;70 69 ring destRing = currRing; 71 70 ideal destIdeal = NULL; 72 71 idhdl sourceRingHdl = (idhdl)first->data; 73 r SetHdl( sourceRingHdl);74 r ing sourceRing = currRing;72 ring sourceRing = IDRING(sourceRingHdl); 73 rChangeCurrRing( sourceRing ); 75 74 76 75 if(state==WalkOk) 77 76 { 78 77 int * vperm = (int *)omAlloc0( (currRing->N+1)*sizeof( int ) ); 79 state= walkConsistency( IDRING(sourceRingHdl), IDRING(destRingHdl), vperm );78 state= walkConsistency( sourceRing, destRing, vperm ); 80 79 omFreeSize( (ADDRESS)vperm, (currRing->N+1)*sizeof(int) ); 81 80 } … … 112 111 113 112 ring almostDestRing=currRing; 114 r SetHdl(destRingHdl);113 rChangeCurrRing(destRing); 115 114 116 115 switch (state) { … … 132 131 case WalkIncompatibleSourceRing: 133 132 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 r SetHdl(destRingHdl);133 rChangeCurrRing(destRing); 135 134 destIdeal= idInit(0,0); 136 135 break; … … 172 171 //unperturbedStartVectorStrategy SHOULD BE SET BY THE USER THROUGH 173 172 //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 175 174 //MAXIMALLY PERTURBED 176 175 … … 181 180 test &= (~Sy_bit(OPT_REDSB)); //make sure option noredSB is set 182 181 183 idhdl destRingHdl = currRingHdl;184 182 ring destRing = currRing; 185 183 ideal destIdeal = NULL; … … 189 187 190 188 int * vperm = (int *)omAlloc0( (currRing->N+1)*sizeof( int ) ); 191 state= fractalWalkConsistency( IDRING(sourceRingHdl), IDRING(destRingHdl), vperm );189 state= fractalWalkConsistency( sourceRing, destRing, vperm ); 192 190 omFreeSize( (ADDRESS)vperm, (currRing->N+1)*sizeof(int) ); 193 191 … … 219 217 { 220 218 ring almostDestRing=currRing; 221 r SetHdl(destRingHdl);222 destIdeal=idrMoveR(destIdeal, currRing,almostDestRing);219 rChangeCurrRing(destRing); 220 destIdeal=idrMoveR(destIdeal,destRing,almostDestRing); 223 221 } 224 222 … … 234 232 Werror( "ring %s and current ring are incompatible\n", 235 233 first->Name() ); 236 r SetHdl(destRingHdl);234 rChangeCurrRing(destRing); 237 235 destIdeal= idInit(0,0); 238 236 return destIdeal; … … 241 239 case WalkIncompatibleDestRing: 242 240 Werror( "Order of basering not allowed,\n must be a combination of lp,dp,Dp,wp,Wp and C or just M.\n"); 243 r SetHdl(destRingHdl);241 rChangeCurrRing(destRing); 244 242 destIdeal= idInit(0,0); 245 243 return destIdeal; … … 249 247 Werror( "Order of %s not allowed,\n must be a combination of lp,dp,Dp,wp,Wp and C or just M.\n", 250 248 first->Name()); 251 r SetHdl(destRingHdl);249 rChangeCurrRing(destRing); 252 250 destIdeal= idInit(0,0); 253 251 return destIdeal; … … 257 255 Werror( "Can't find ideal %s in ring %s.\n", 258 256 second->Name(), first->Name() ); 259 r SetHdl(destRingHdl);257 rChangeCurrRing(destRing); 260 258 destIdeal= idInit(0,0); 261 259 return destIdeal; … … 264 262 case WalkOverFlowError: 265 263 Werror( "Overflow occured in ring %s.\n", first->Name() ); 266 r SetHdl(destRingHdl);264 rChangeCurrRing(destRing); 267 265 destIdeal= idInit(0,0); 268 266 return destIdeal; … … 270 268 271 269 default: 272 r SetHdl(destRingHdl);270 rChangeCurrRing(destRing); 273 271 destIdeal= idInit(1,1); 274 272 return destIdeal;
Note: See TracChangeset
for help on using the changeset viewer.