Changeset 53aa95a in git
- Timestamp:
- Nov 15, 2015, 4:19:12 PM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 6a5247540425fea6f0653e52e86536f33d935124
- Parents:
- 2b14db1dc10e81725f56233e1db3bbf76f14ff8c
- Location:
- Singular/LIB
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/grwalk.lib
r2b14db r53aa95a 255 255 } 256 256 257 proc gwalk(ideal Go, int reduction,int printout,list #)258 "SYNTAX: gwalk(ideal i , int reduction, int printout);259 gwalk(ideal i, int reduction, int printout, intvec v, intvec w);257 proc gwalk(ideal Go, list #) 258 "SYNTAX: gwalk(ideal i); 259 gwalk(ideal i, intvec v, intvec w); 260 260 TYPE: ideal 261 261 PURPOSE: compute the standard basis of the ideal, calculated via … … 284 284 //print("//** help ring = " + string(basering)); 285 285 ideal G = fetch(xR, Go); 286 int reduction=1; 287 int printout=0; 286 288 G = system("Mwalk", G, curr_weight, target_weight,basering,reduction,printout); 287 289 … … 304 306 zyx5+y6-y4x2-y3x3+2zyx4-y4x-y3x2+zyx3-3z2yx+3zx3-3y3-3y2x+3zx2, 305 307 yx7-y7+y5x2+y4x3+3yx6+y5x+y4x2+3yx5-6zyx3+yx4+3x5+3y4+3y3x-6zyx2+6x4+3x3-9zx; 306 gwalk(I ,0,1);308 gwalk(I); 307 309 } 308 310 … … 350 352 } 351 353 352 proc fwalk(ideal Go, int reduction, int printout,list #)353 "SYNTAX: fwalk(ideal i ,int reductioin);354 fwalk(ideal i, int reduction intvec v, intvec w);354 proc fwalk(ideal Go, list #) 355 "SYNTAX: fwalk(ideal i); 356 fwalk(ideal i, intvec v, intvec w); 355 357 TYPE: ideal 356 358 PURPOSE: compute the standard basis of the ideal w.r.t. the … … 376 378 377 379 ideal G = fetch(xR, Go); 380 int reduction=1; 381 int printout=0; 378 382 G = system("Mfwalk", G, curr_weight, target_weight, reduction, printout); 379 383 … … 391 395 ring r = 32003,(z,y,x), lp; 392 396 ideal I = y3+xyz+y2z+xz3, 3+xy+x2y+y2z; 393 int reduction = 1; 394 int printout = 1; 395 fwalk(I,reduction,printout); 397 fwalk(I); 396 398 } 397 399 … … 443 445 } 444 446 445 proc pwalk(ideal Go, int n1, int n2, int reduction, int printout,list #)446 "SYNTAX: pwalk(int d, ideal i, int n1, int n2 , int reduction, int printout);447 pwalk(int d, ideal i, int n1, int n2, int reduction, int printout, intvec v, intvec w);447 proc pwalk(ideal Go, int n1, int n2, list #) 448 "SYNTAX: pwalk(int d, ideal i, int n1, int n2); 449 pwalk(int d, ideal i, int n1, int n2, intvec v, intvec w); 448 450 TYPE: ideal 449 451 PURPOSE: compute the standard basis of the ideal, calculated via … … 482 484 483 485 ideal G = fetch(xR, Go); 484 486 int reduction=1; 487 int printout=0; 485 488 G = system("Mpwalk",G,n1,n2,curr_weight,target_weight,nP,reduction,printout); 486 489 … … 498 501 ring r = 32003,(z,y,x), lp; 499 502 ideal I = y3+xyz+y2z+xz3, 3+xy+x2y+y2z; 500 int reduction = 1; 501 int printout = 2; 502 pwalk(I,2,2,reduction,printout); 503 pwalk(I,2,2); 503 504 } 504 505 -
Singular/LIB/modwalk.lib
r2b14db r53aa95a 53 53 option(redSB); 54 54 55 /* set additional parameters */ 56 int reduction = 1; 57 int printout = 0; 58 59 /* call modular() */ 60 if (size(#) > 0) { 61 I = modular("gwalk", list(I,reduction,printout,#)); 62 } 63 else { 64 I = modular("gwalk", list(I,reduction,printout)); 55 /* call modular() */ 56 if (size(#) > 0) { 57 I = modular("gwalk", list(I,#)); 58 } 59 else { 60 I = modular("gwalk", list(I)); 65 61 } 66 62 … … 110 106 option(redSB); 111 107 112 /* set additional parameters */ 113 int reduction = 1; 114 int printout = 0; 115 116 /* call modular() */ 117 if (size(#) > 0) { 118 I = modular("rwalk", list(I,radius,pertdeg,reduction,printout,#)); 119 } 120 else { 121 I = modular("rwalk", list(I,radius,pertdeg,reduction,printout)); 108 /* call modular() */ 109 if (size(#) > 0) { 110 I = modular("rwalk", list(I,radius,pertdeg,#)); 111 } 112 else { 113 I = modular("rwalk", list(I,radius,pertdeg)); 122 114 } 123 115 … … 168 160 option(redSB); 169 161 170 /* set additional parameters */ 171 int reduction = 1; 172 int printout = 0; 173 174 /* call modular() */ 175 if (size(#) > 0) { 176 I = modular("fwalk", list(I,reduction,printout,#)); 177 } 178 else { 179 I = modular("fwalk", list(I,reduction,printout)); 162 /* call modular() */ 163 if (size(#) > 0) { 164 I = modular("fwalk", list(I,#)); 165 } 166 else { 167 I = modular("fwalk", list(I)); 180 168 } 181 169 … … 224 212 option(redSB); 225 213 226 /* set additional parameters */ 227 int reduction = 1; 228 int printout = 0; 229 230 /* call modular() */ 231 if (size(#) > 0) { 232 I = modular("frandwalk", list(I,radius,reduction,printout,#)); 233 } 234 else { 235 I = modular("frandwalk", list(I,radius,reduction,printout)); 214 /* call modular() */ 215 if (size(#) > 0) { 216 I = modular("frandwalk", list(I,radius,#)); 217 } 218 else { 219 I = modular("frandwalk", list(I,radius)); 236 220 } 237 221 -
Singular/LIB/rwalk.lib
r2b14db r53aa95a 8 8 9 9 PROCEDURES: 10 rwalk(ideal,int,int[,intvec,intvec]); standard basis of ideal via RandomWalk algorithm11 rwalk(ideal,int[,intvec,intvec]); standard basis of ideal via Random PerturbationWalk algorithm10 prwalk(ideal,int,int[,intvec,intvec]); standard basis of ideal via Random Perturbation Walk algorithm 11 rwalk(ideal,int[,intvec,intvec]); standard basis of ideal via Random Walk algorithm 12 12 frandwalk(ideal,int[,intvec,intvec]); standard basis of ideal via Random Fractal Walk algorithm 13 13 "; … … 141 141 * Random Walk * 142 142 ****************/ 143 proc rwalk(ideal Go, int radius, int pert_deg, int reduction, int printout,list #)143 proc rwalk(ideal Go, int radius, int pert_deg, list #) 144 144 "SYNTAX: rwalk(ideal i, int radius); 145 145 if size(#)>0 then rwalk(ideal i, int radius, intvec v, intvec w); … … 174 174 175 175 //-------------------- Initialize parameters ------------------------ 176 int reduction=1; 177 int printout=0; 176 178 def xR = basering; 177 179 execute("ring ostR = "+charstr(xR)+",("+varstr(xR)+"),"+ord_str+";"); … … 197 199 int radius = 1; 198 200 int perturb_deg = 2; 199 int reduction = 0; 200 int printout = 1; 201 rwalk(I,radius,perturb_deg,reduction,printout); 201 rwalk(I,radius,perturb_deg); 202 202 } 203 203 … … 205 205 * Perturbation Walk with random element * 206 206 *****************************************/ 207 proc prwalk(ideal Go, int radius, int o_pert_deg, int t_pert_deg, int reduction, int printout,list #)207 proc prwalk(ideal Go, int radius, int o_pert_deg, int t_pert_deg, list #) 208 208 "SYNTAX: rwalk(ideal i, int radius); 209 209 if size(#)>0 then rwalk(ideal i, int radius, intvec v, intvec w); … … 215 215 SEE ALSO: std, stdfglm, groebner, gwalk, pwalk, fwalk, twalk, awalk1, awalk2 216 216 KEYWORDS: Groebner walk 217 EXAMPLE: example rwalk; shows an example"217 EXAMPLE: example prwalk; shows an example" 218 218 { 219 219 //-------------------- Initialize parameters ------------------------ … … 237 237 238 238 //-------------------- Initialize parameters ------------------------ 239 int reduction=1; 240 int printout=0; 239 241 def xR = basering; 240 242 execute("ring ostR = ("+charstr(xR)+"),("+varstr(xR)+"),"+ord_str+";"); … … 262 264 int o_perturb_deg = 2; 263 265 int t_perturb_deg = 2; 264 int reduction = 0; 265 int printout = 2; 266 prwalk(I,radius,o_perturb_deg,t_perturb_deg,reduction,printout); 266 prwalk(I,radius,o_perturb_deg,t_perturb_deg); 267 267 } 268 268 … … 270 270 * Fractal Walk with random element * 271 271 ************************************/ 272 proc frandwalk(ideal Go, int radius, int reduction, int printout,list #)273 "SYNTAX: frwalk(ideal i, int radius , int reduction, int printout);274 frwalk(ideal i, int radius, int reduction, int printout, intvec v, intvec w);272 proc frandwalk(ideal Go, int radius, list #) 273 "SYNTAX: frwalk(ideal i, int radius); 274 frwalk(ideal i, int radius, intvec v, intvec w); 275 275 TYPE: ideal 276 276 PURPOSE: compute the standard basis of the ideal, calculated via … … 280 280 SEE ALSO: std, stdfglm, groebner, gwalk, pwalk, twalk, awalk1, awalk2 281 281 KEYWORDS: The fractal walk algorithm 282 EXAMPLE: example fr walk; shows an example"282 EXAMPLE: example frandwalk; shows an example" 283 283 { 284 284 // we use ring with ordering (a(...),lp,C) … … 305 305 //print("//** help ring = " + string(basering)); 306 306 ideal G = fetch(xR, Go); 307 int pert_deg = 2; 307 int reduction=1; 308 int printout=0; 308 309 309 310 G = system("Mfrwalk", G, curr_weight, target_weight, radius, reduction, printout); … … 323 324 ideal I = y3+xyz+y2z+xz3, 3+xy+x2y+y2z; 324 325 int reduction = 0; 325 frandwalk(I,2 ,0,1);326 } 326 frandwalk(I,2); 327 }
Note: See TracChangeset
for help on using the changeset viewer.