Changeset 9713ee in git
- Timestamp:
- Jul 17, 2013, 7:36:30 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 2b2e08e9ac466fdf41a00e09569fbe1ea27db681a667138296109b29e11fe1654025d4581abfc50a
- Parents:
- 22c7f081eb5086ea769d4b1bf61d4ca3f4a88b04
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/grobcov.lib
r22c7f0 r9713ee 1 ///////////////////////////////////////////////////////////////////////////// 1 ////////////////////////////////////////////////////////////////////////////// 2 2 version="version grobcov.lib 4.0.0.0 Jun_2013 "; 3 3 category="General purpose"; … … 222 222 { 223 223 if (size(J)==0){return(ideal(0));} 224 int te=0; 224 225 def RR=basering; 226 if(not(defined(@RP))) 227 { 228 te=1; 229 setglobalrings(); 230 } 225 231 setring(@RP); 226 232 def Ja=imap(RR,J); … … 232 238 setring(RR); 233 239 def Jc=imap(@RP,Jb); 240 if(te){kill @R; kill @RP; kill @P;} 234 241 return(Jc); 235 242 }; … … 3718 3725 proc groupKSWsegments(list T) 3719 3726 { 3727 //"T_T="; T; 3720 3728 int i; int j; 3721 3729 list L; … … 4044 4052 // If all levels of a class of locus are 1, then the set is locally closed. Otherwise the level 4045 4053 // gives the depth of the component. 4046 proc locus(list GG )4054 proc locus(list GG, list #) 4047 4055 "USAGE: locus(G); 4048 4056 The input must be the grobcov of a parametrical ideal … … 4063 4071 int t1=1; int t2=1; 4064 4072 def R=basering; 4073 int moverdim=nvars(R); 4074 list Lop=#; 4075 if(size(Lop)>0){moverdim=Lop[1];} 4065 4076 setglobalrings(); 4066 4077 list G1; list G2; … … 4071 4082 { 4072 4083 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); 4074 4087 if(d==0){G1[size(G1)+1]=G[i];} 4075 4088 else … … 4257 4270 // locusdg is the routine for computing the locus in dinamical geometry. 4258 4271 // 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). 4260 4274 // If such a point is detected, then it eliminates the segments of the grobcov that 4261 4275 // have this point as solution. 4262 4276 // Then it calls locus. 4263 proc locusdg(list GG )4277 proc locusdg(list GG,list #) 4264 4278 "USAGE: locusdg(GG) ; 4265 4279 The argument must be the output of grobcov … … 4272 4286 { 4273 4287 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];} 4274 4292 int i; int j; int k; 4275 4293 def B0=GG[1][2]; … … 4307 4325 if(te) 4308 4326 { 4309 //"T_N="; N;4327 string("locusdg detected that the mover must avoid point (",N,") in order to obtain the locus"); 4310 4328 // eliminate segments of GG where N is contained in the basis 4311 4329 list nGP; … … 4323 4341 if(te==0){nGP[size(nGP)+1]=GP[j];} 4324 4342 } 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 //} 4359 4383 example 4360 4384 {"EXAMPLE:"; echo = 2; … … 4369 4393 } 4370 4394 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 4400 proc 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 4371 4439 4372 4440 //********************* End locus ****************************
Note: See TracChangeset
for help on using the changeset viewer.