Changeset 9713ee in git


Ignore:
Timestamp:
Jul 17, 2013, 7:36:30 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
Children:
2b2e08e9ac466fdf41a00e09569fbe1ea27db681a667138296109b29e11fe1654025d4581abfc50a
Parents:
22c7f081eb5086ea769d4b1bf61d4ca3f4a88b04
Message:
chg: update grobcov.lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/grobcov.lib

    r22c7f0 r9713ee  
    1 /////////////////////////////////////////////////////////////////////////////
     1//////////////////////////////////////////////////////////////////////////////
    22version="version grobcov.lib 4.0.0.0 Jun_2013 ";
    33category="General purpose";
     
    222222{
    223223  if (size(J)==0){return(ideal(0));}
     224  int te=0;
    224225  def RR=basering;
     226  if(not(defined(@RP)))
     227  {
     228    te=1;
     229    setglobalrings();
     230  }
    225231  setring(@RP);
    226232  def Ja=imap(RR,J);
     
    232238  setring(RR);
    233239  def Jc=imap(@RP,Jb);
     240  if(te){kill @R; kill @RP; kill @P;}
    234241  return(Jc);
    235242};
     
    37183725proc groupKSWsegments(list T)
    37193726{
     3727  //"T_T="; T;
    37203728  int i; int j;
    37213729  list L;
     
    40444052//              If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level
    40454053//              gives the depth of the component.
    4046 proc locus(list GG)
     4054proc locus(list GG, list #)
    40474055"USAGE:   locus(G);
    40484056               The input must be the grobcov  of a parametrical ideal
     
    40634071  int t1=1; int t2=1;
    40644072  def R=basering;
     4073  int moverdim=nvars(R);
     4074  list Lop=#;
     4075  if(size(Lop)>0){moverdim=Lop[1];}
    40654076  setglobalrings();
    40664077  list G1; list G2;
     
    40714082  {
    40724083    attrib(G[i][1],"IsSB",1);
    4073     d=dim(std(G[i][1]));
     4084    //d=dim(std(G[i][1]));
     4085    // ULL
     4086    d=locusdim(G[i][2],moverdim);
    40744087    if(d==0){G1[size(G1)+1]=G[i];}
    40754088    else
     
    42574270// locusdg is the routine for computing the locus in dinamical geometry.
    42584271//    It detects automatically a possible point that is to be avoided by the mover,
    4259 //    whose coordinates must be the last two coordinates in the definition of the ring.
     4272//    whose coordinates must be the last coordinates in the definition of the ring (2 last by default,
     4273//    or the dd last if the option locusdg(G,dd) is specified).
    42604274//    If such a point is detected, then it eliminates the segments of the grobcov that
    42614275//    have this point as solution.
    42624276//    Then it calls locus.
    4263 proc locusdg(list GG)
     4277proc locusdg(list GG,list #)
    42644278"USAGE:  locusdg(GG) ;
    42654279          The argument must be the output of grobcov
     
    42724286{
    42734287  def R=basering;
     4288  int dd=2; int comment=0;
     4289  list DD=#;
     4290  if (size(DD)>1){comment=1;}
     4291  if(size(DD)>0){dd=DD[1];}
    42744292  int i; int j; int k;
    42754293  def B0=GG[1][2];
     
    43074325    if(te)
    43084326    {
    4309       //"T_N="; N;
     4327      string("locusdg detected that the mover must avoid point (",N,") in order to obtain the locus");
    43104328      // eliminate segments of GG where N is contained in the basis
    43114329      list nGP;
     
    43234341        if(te==0){nGP[size(nGP)+1]=GP[j];}
    43244342      }
    4325       //"T_nGP="; nGP;
    4326       // Now eliminate components for which the basis has dim>0, and all elements non reducing to 0
    4327       // modulo N do not contain the mover coordinates
    4328       list nnGP; poly r;
    4329       for(j=1; j<=size(nGP);j++)
    4330       {
    4331         if(not(indepparameters(nGP[j][2])))
    4332         {
    4333           if(dim(std(nGP[j][1]))==0){nnGP[size(nnGP)+1]=nGP[j];}
    4334           else
    4335           {
    4336             te=1; k=1;
    4337             while(te and k<=size(nGP[2]))
    4338             {
    4339               r=pdivi(nGP[j][2][k],N)[1];
    4340               if(r==0){k++;}
    4341               else
    4342               {
    4343                 if(not(subset(variables(nGP[j][2][k]),vmov )))
    4344                 {
    4345                   te=0;
    4346                 }
    4347                 else{k++;}
    4348               }
    4349             }
    4350             if(te==1){nnGP[size(nnGP)+1]=nGP[j];}
    4351           }
    4352         }
    4353       }
    4354     }
    4355     kill @RP; kill @P; kill @R;
    4356     return(locus(nnGP));
    4357   }
    4358 }
     4343   }
     4344  }
     4345  //"T_nGP="; nGP;
     4346  kill @RP; kill @P; kill @R;
     4347  return(locus(nGP,dd));
     4348}
     4349//      // Now eliminate components for which the basis has dim>0, and all elements non reducing to 0
     4350//      // modulo N do not contain the mover coordinates
     4351//      list nnGP; poly r;
     4352//      for(j=1; j<=size(nGP);j++)
     4353//      {
     4354//        if(not(indepparameters(nGP[j][2])))
     4355//        {
     4356//          if(dim(std(nGP[j][1]))==0){nnGP[size(nnGP)+1]=nGP[j];}
     4357//          else
     4358//          {
     4359//            te=1; k=1;
     4360//            while(te and k<=size(nGP[2]))
     4361//            {
     4362//              r=pdivi(nGP[j][2][k],N)[1];
     4363//              if(r==0){k++;}
     4364//              else
     4365//              {
     4366//                if(not(subset(variables(nGP[j][2][k]),vmov )))
     4367//                {
     4368//                  te=0;
     4369//                }
     4370//                else{k++;}
     4371//              }
     4372//            }
     4373//            if(te==1){nnGP[size(nnGP)+1]=nGP[j];}
     4374//          }
     4375//        }
     4376//      }
     4377//
     4378//    }
     4379//    kill @RP; kill @P; kill @R;
     4380//    return(locus(nnGP));
     4381//  }
     4382//}
    43594383example
    43604384{"EXAMPLE:"; echo = 2;
     
    43694393}
    43704394
     4395// locusdim
     4396// input:
     4397//    B:         ideal, a basis of a segment of the grobcov
     4398//    dgdim: int, the dimension of the mover (for locusdg)
     4399//                by default dgdim is equal to the number of variables
     4400proc locusdim(ideal B, list #)
     4401{
     4402  def R=basering;
     4403  int dgdim;
     4404  int nv=nvars(R);
     4405  if (size(#)>0){dgdim=#[1];}
     4406  else {dgdim=nv;}
     4407  int d;
     4408  list v;
     4409  ideal vi;
     4410  int i;
     4411  for(i=1;i<=dgdim;i++)
     4412  {
     4413    v[size(v)+1]=varstr(nv-dgdim+i);
     4414    vi[size(v)+1]=var(nv-dgdim+i);
     4415  }
     4416  ideal B0;
     4417  for(i=1;i<=size(B);i++)
     4418  {
     4419    if(subset(variables(B[i]),vi))
     4420    {
     4421      B0[size(B0)+1]=B[i];
     4422    }
     4423  }
     4424  //"T_B0="; B0;
     4425  //"T_v="; v;
     4426  def RR=ringlist(R);
     4427  def RR0=RR;
     4428  RR0[2]=v;
     4429  def R0=ring(RR0);
     4430  //ringlist(R0);
     4431  setring(R0);
     4432  def B0r=imap(R,B0);
     4433  B0r=std(B0r);
     4434  d=dim(B0r);
     4435  setring R;
     4436  return(d);
     4437}
     4438
    43714439
    43724440//********************* End locus ****************************
Note: See TracChangeset for help on using the changeset viewer.