Changeset 510257 in git for Singular/LIB/rwalk.lib
- Timestamp:
- Sep 9, 2015, 8:05:39 PM (9 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- d8946a4d5d5abc81d1b71aeddf7fedbadca56fb7
- Parents:
- 36b81ac0b97d2f019093a024dc770731cfabfe174d031cda72b3385df1b0e2f8f2b790e31626ceb6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/rwalk.lib
-
Property
mode
changed from
100644
to100755
r4d031c r510257 10 10 rwalk(ideal,int,int[,intvec,intvec]); standard basis of ideal via Random Walk algorithm 11 11 rwalk(ideal,int[,intvec,intvec]); standard basis of ideal via Random Perturbation Walk algorithm 12 fr walk(ideal,int[,intvec,intvec]); standard basis of ideal via Random Fractal Walk algorithm12 frandwalk(ideal,int[,intvec,intvec]); standard basis of ideal via Random Fractal Walk algorithm 13 13 "; 14 14 … … 141 141 * Random Walk * 142 142 ****************/ 143 proc rwalk(ideal Go, int radius, int pert_deg, list #)143 proc rwalk(ideal Go, int radius, int pert_deg, int reduction, int printout, list #) 144 144 "SYNTAX: rwalk(ideal i, int radius); 145 145 if size(#)>0 then rwalk(ideal i, int radius, intvec v, intvec w); 146 intermediate Groebner bases are not reduced if reduction = 0 146 147 TYPE: ideal 147 148 PURPOSE: compute the standard basis of the ideal, calculated via … … 178 179 179 180 ideal G = fetch(xR, Go); 180 G = system("Mrwalk", G, curr_weight, target_weight, radius, pert_deg, basering);181 G = system("Mrwalk", G, curr_weight, target_weight, radius, pert_deg, reduction, printout); 181 182 182 183 setring xR; … … 196 197 int radius = 1; 197 198 int perturb_deg = 2; 198 rwalk(I,radius,perturb_deg); 199 int reduction = 0; 200 int printout = 1; 201 rwalk(I,radius,perturb_deg,reduction,printout); 199 202 } 200 203 … … 202 205 * Perturbation Walk with random element * 203 206 *****************************************/ 204 proc prwalk(ideal Go, int radius, int o_pert_deg, int t_pert_deg, list #)207 proc prwalk(ideal Go, int radius, int o_pert_deg, int t_pert_deg, int reduction, int printout, list #) 205 208 "SYNTAX: rwalk(ideal i, int radius); 206 209 if size(#)>0 then rwalk(ideal i, int radius, intvec v, intvec w); … … 227 230 OSCTW= OrderStringalp_NP("al", #); 228 231 } 232 int nP = OSCTW[1]; 229 233 string ord_str = OSCTW[2]; 230 234 intvec curr_weight = OSCTW[3]; // original weight vector … … 238 242 239 243 ideal G = fetch(xR, Go); 240 G = system("Mprwalk", G, curr_weight, target_weight, radius, o_pert_deg, t_pert_deg, basering); 244 G = system("Mprwalk", G, curr_weight, target_weight, radius, o_pert_deg, t_pert_deg, 245 nP, reduction, printout); 241 246 242 247 setring xR; … … 257 262 int o_perturb_deg = 2; 258 263 int t_perturb_deg = 2; 259 prwalk(I,radius,o_perturb_deg,t_perturb_deg); 264 int reduction = 0; 265 int printout = 2; 266 prwalk(I,radius,o_perturb_deg,t_perturb_deg,reduction,printout); 260 267 } 261 268 … … 263 270 * Fractal Walk with random element * 264 271 ************************************/ 265 proc frandwalk(ideal Go, int radius, list #)266 "SYNTAX: frwalk(ideal i, int radius );267 frwalk(ideal i, int radius, int vec v, intvec w);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); 268 275 TYPE: ideal 269 276 PURPOSE: compute the standard basis of the ideal, calculated via … … 299 306 ideal G = fetch(xR, Go); 300 307 int pert_deg = 2; 301 G = system("Mfrwalk", G, curr_weight, target_weight, radius); 308 309 G = system("Mfrwalk", G, curr_weight, target_weight, radius, reduction, printout); 302 310 303 311 setring xR; … … 314 322 ring r = 0,(z,y,x), lp; 315 323 ideal I = y3+xyz+y2z+xz3, 3+xy+x2y+y2z; 316 frandwalk(I,2); 317 } 324 int reduction = 0; 325 frandwalk(I,2,0,1); 326 } -
Property
mode
changed from
Note: See TracChangeset
for help on using the changeset viewer.