Changeset 3ea5cee in git
 Timestamp:
 May 29, 2009, 11:26:48 AM (14 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
 Children:
 a2b50cb2b820afde605ed45cb52930a5913927cc
 Parents:
 224d153b4a430841dbc33e16788c163dbc00c5ca
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/presolve.lib
r224d153 r3ea5cee 1 1 /////////////////////////////////////////////////////////////////////////////// 2 //changed GMG 20.5.09: degreepart, linearpart, elimpart 3 /////////////////////////////////////////////////////////////////////////////// 4 version="$Id: presolve.lib,v 1.33 20090525 09:47:39 Singular Exp $"; 2 version="$Id: presolve.lib,v 1.34 20090529 09:26:48 Singular Exp $"; 5 3 category="Symbolicnumerical solving"; 6 4 info=" … … 94 92 (default: v = 1,...,1) 95 93 _[2]: remaining generators of id 96 NOTE: if id is of type int/number/poly it is converted to ideal, if id is97 of type intmat/matrix/vector to module and then the corresponding98 generators are computed99 94 EXAMPLE: example degreepart; shows an example 100 95 " … … 149 144 _[1]: generators of id of total degree <= 1 150 145 _[2]: remaining generators of id 151 NOTE: all variables have degree 1 (independent of ordering of basering)152 146 EXAMPLE: example linearpart; shows an example 153 147 " … … 185 179 " 186 180 { 187 int ii,n,k ,ringchange;188 string o ;181 int ii,n,k; 182 string o, newo; 189 183 intvec getoption = option(get); 190 184 option(redSB); … … 200 194 if ( n < nvars(BAS) ) 201 195 { 202 rest = maxi[n+1..nvars(BAS)]; //variables which are not substituted196 rest = maxi[n+1..nvars(BAS)]; 203 197 } 204 198 attrib(rest,"isSB",1); … … 211 205 //## gmg, gendert 9/2008: interred sehr lange z.B. bei Leonard1 in normal, 212 206 //daher interred ersetzt durch: std nur auf linearpart angewendet 213 //Wechsel zu dp Ordnung (da Lin affin linear) 214 215 // replace ordering different from dp by dp  216 o = "dp("+string(n)+")"; 217 if( ! find(ordstr(BAS),o) or find(ordstr(BAS),"a") ) 218 { 219 ringchange = 1; //remember change of ring 207 //Ordnung muss global sein, sonst egal (da Lin affin linear) 208 209 // replace ordering by dp if it is not global  210 if ( ord_test(BAS) <= 0 ) 211 { 220 212 intvec V; 221 213 V[n]=0; V=V+1; //weights for dp ordering … … 238 230 lin = lin,id1; 239 231 lin = std(lin); 240 id = simplify(NF(id,lin),2); //instead of subst , (### is faster)232 id = simplify(NF(id,lin),2); //instead of subst 241 233 id1 = linearpart(id)[1]; 242 234 } … … 283 275 // go back to original ring end return  284 276 285 if ( ringchange )//i.e there was a ring change277 if ( ord_test(BAS) <= 0 ) //i.e there was a ring change 286 278 { 287 279 setring BAS; … … 355 347 356 348 list L = elimlinearpart(i,n); 349 if ( e == 0 ) 350 { 351 return(L); 352 } 357 353 ideal lin, eva, sub, neva, phi = L[1], L[2], L[3], L[4], L[5]; 358 if ( e == 0 )359 {360 return(L);361 }362 363 354 // direct substitution of variables if possible and if e!=0  364 355 // first find terms lin1 in lin of pure degree 1 in each polynomial of lin … … 391 382 z ergibt ich auch i[2]z*i[3] mit option(redThrough) 392 383 statt interred kann man hier auch NF(i,i[3])+i[3] verwenden 393 hier li fert elimpart(i) 2 Substitutionen (x,y) elimpart(interred(i))384 hier liefert elimpart(i) 2 Substitutionen (x,y) elimpart(interred(i)) 394 385 aber 3 (x,y,z) 395 386 Da interred oder NF aber die Laenge der polys vergroessern kann, nicht gemacht … … 430 421 //kin = polys of lin which contained a pure degree 1 part. 431 422 kin = simplify(kin,2); 432 l = size(kin);//l != 0 since lin1 != 0423 l = ncols(kin); //l != 0 since lin1 != 0 433 424 poly p,kip,vip, cand; 434 425 int count=1; … … 441 432 { 442 433 p = kin[kk]/var(ii); 443 //if ( deg(p) == 0 ) 444 //old test, does not work if some var has deg 0 445 //geaendert Mai 09 gmg 446 447 if( p!=0 & p == jet(p,0) ) 448 //this means that kin[kk]= p*var(ii) + h, 449 //with p=const !=0 and h not depending on var(ii) 434 if ( deg(p) == 0 ) //this means that kin[kk]= p*var(ii) + h, 435 //with p=const and h not depending on var(ii) 450 436 { 451 437 //we look for the shortest candidate to substitute var(ii) … … 462 448 } 463 449 } 464 } 450 } 465 451 if ( cand != 0 ) 466 452 { 467 453 p = cand/var(ii); 468 kip = cand/p; //normalized polynomial of kin w.r.t var(ii)454 kip = cand/p; //normalized polynomial of kin w.r.t var(ii) 469 455 eva = eva+var(ii); //var(ii) added to list of elimin. vars 470 456 neva[ii] = 0;
Note: See TracChangeset
for help on using the changeset viewer.