Changeset 53aa95a in git


Ignore:
Timestamp:
Nov 15, 2015, 4:19:12 PM (8 years ago)
Author:
Stephan Oberfranz <oberfran@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
6a5247540425fea6f0653e52e86536f33d935124
Parents:
2b14db1dc10e81725f56233e1db3bbf76f14ff8c
Message:
changed optional arguments in the walk
Location:
Singular/LIB
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/grwalk.lib

    r2b14db r53aa95a  
    255255}
    256256
    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);
     257proc gwalk(ideal Go, list #)
     258"SYNTAX: gwalk(ideal i);
     259         gwalk(ideal i, intvec v, intvec w);
    260260TYPE:    ideal
    261261PURPOSE: compute the standard basis of the ideal, calculated via
     
    284284   //print("//** help ring = " + string(basering));
    285285   ideal G = fetch(xR, Go);
     286   int reduction=1;
     287   int printout=0;
    286288   G = system("Mwalk", G, curr_weight, target_weight,basering,reduction,printout);
    287289
     
    304306            zyx5+y6-y4x2-y3x3+2zyx4-y4x-y3x2+zyx3-3z2yx+3zx3-3y3-3y2x+3zx2,
    305307            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);
    307309}
    308310
     
    350352}
    351353
    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);
     354proc fwalk(ideal Go, list #)
     355"SYNTAX: fwalk(ideal i);
     356         fwalk(ideal i, intvec v, intvec w);
    355357TYPE:    ideal
    356358PURPOSE: compute the standard basis of the ideal w.r.t. the
     
    376378
    377379   ideal G = fetch(xR, Go);
     380   int reduction=1;
     381   int printout=0;
    378382   G = system("Mfwalk", G, curr_weight, target_weight, reduction, printout);
    379383
     
    391395    ring r = 32003,(z,y,x), lp;
    392396    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);
    396398}
    397399
     
    443445}
    444446
    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);
     447proc 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);
    448450TYPE:    ideal
    449451PURPOSE: compute the standard basis of the ideal, calculated via
     
    482484
    483485  ideal G = fetch(xR, Go);
    484 
     486  int reduction=1;
     487  int printout=0;
    485488  G = system("Mpwalk",G,n1,n2,curr_weight,target_weight,nP,reduction,printout);
    486489 
     
    498501    ring r = 32003,(z,y,x), lp;
    499502    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);
    503504}
    504505
  • Singular/LIB/modwalk.lib

    r2b14db r53aa95a  
    5353    option(redSB);
    5454
    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));
    6561    }
    6662
     
    110106    option(redSB);
    111107
    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));
    122114    }
    123115
     
    168160    option(redSB);
    169161
    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));
    180168    }
    181169
     
    224212    option(redSB);
    225213
    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));
    236220    }
    237221
  • Singular/LIB/rwalk.lib

    r2b14db r53aa95a  
    88
    99PROCEDURES:
    10 rwalk(ideal,int,int[,intvec,intvec]);   standard basis of ideal via Random Walk algorithm
    11 rwalk(ideal,int[,intvec,intvec]);       standard basis of ideal via Random Perturbation Walk algorithm
     10prwalk(ideal,int,int[,intvec,intvec]);   standard basis of ideal via Random Perturbation Walk algorithm
     11rwalk(ideal,int[,intvec,intvec]);       standard basis of ideal via Random Walk algorithm
    1212frandwalk(ideal,int[,intvec,intvec]);      standard basis of ideal via Random Fractal Walk algorithm
    1313";
     
    141141 * Random Walk  *
    142142 ****************/
    143 proc rwalk(ideal Go, int radius, int pert_deg, int reduction, int printout, list #)
     143proc rwalk(ideal Go, int radius, int pert_deg, list #)
    144144"SYNTAX: rwalk(ideal i, int radius);
    145145         if size(#)>0 then rwalk(ideal i, int radius, intvec v, intvec w);
     
    174174
    175175//--------------------  Initialize parameters  ------------------------
     176int reduction=1;
     177int printout=0;
    176178def xR = basering;
    177179execute("ring ostR = "+charstr(xR)+",("+varstr(xR)+"),"+ord_str+";");
     
    197199  int radius = 1;
    198200  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);
    202202}
    203203
     
    205205 * Perturbation Walk with random element *
    206206 *****************************************/
    207 proc prwalk(ideal Go, int radius, int o_pert_deg, int t_pert_deg, int reduction, int printout, list #)
     207proc prwalk(ideal Go, int radius, int o_pert_deg, int t_pert_deg, list #)
    208208"SYNTAX: rwalk(ideal i, int radius);
    209209         if size(#)>0 then rwalk(ideal i, int radius, intvec v, intvec w);
     
    215215SEE ALSO: std, stdfglm, groebner, gwalk, pwalk, fwalk, twalk, awalk1, awalk2
    216216KEYWORDS: Groebner walk
    217 EXAMPLE: example rwalk; shows an example"
     217EXAMPLE: example prwalk; shows an example"
    218218{
    219219//--------------------  Initialize parameters  ------------------------
     
    237237
    238238//--------------------  Initialize parameters  ------------------------
     239int reduction=1;
     240int printout=0;
    239241def xR = basering;
    240242execute("ring ostR = ("+charstr(xR)+"),("+varstr(xR)+"),"+ord_str+";");
     
    262264  int o_perturb_deg = 2;
    263265  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);
    267267}
    268268
     
    270270 * Fractal Walk with random element *
    271271 ************************************/
    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);
     272proc frandwalk(ideal Go, int radius, list #)
     273"SYNTAX: frwalk(ideal i, int radius);
     274         frwalk(ideal i, int radius, intvec v, intvec w);
    275275TYPE:    ideal
    276276PURPOSE: compute the standard basis of the ideal, calculated via
     
    280280SEE ALSO: std, stdfglm, groebner, gwalk, pwalk, twalk, awalk1, awalk2
    281281KEYWORDS: The fractal walk algorithm
    282 EXAMPLE: example frwalk; shows an example"
     282EXAMPLE: example frandwalk; shows an example"
    283283{
    284284   // we use ring with ordering (a(...),lp,C)
     
    305305   //print("//** help ring = " + string(basering));
    306306   ideal G = fetch(xR, Go);
    307    int pert_deg = 2;
     307   int reduction=1;
     308   int printout=0;
    308309
    309310   G = system("Mfrwalk", G, curr_weight, target_weight, radius, reduction, printout);
     
    323324    ideal I = y3+xyz+y2z+xz3, 3+xy+x2y+y2z;
    324325    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.