Changeset 1c809c1 in git


Ignore:
Timestamp:
Aug 10, 2011, 9:39:25 AM (12 years ago)
Author:
Stefan Steidel <steidel@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
04c8f285a16186a0886f05ff3b5b783ab679bf7e
Parents:
e3085c0d4bdb7123d79c22514ef9c099d8b71594
Message:
(1) Procedure name changed: signatureP --> signaturePuiseux, not static anymore and (2) signatureNemethi: input poly need not be irreducible anymore, the two possible variants run in parallel if no optional argument is used.

git-svn-id: file:///usr/local/Singular/svn/trunk@14364 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/surfacesignature.lib

    re3085c r1c809c1  
    4949PROCEDURES:
    5050 signatureBrieskorn(a1,a2,a3);  signature of singularity x^a1+y^a2+z^a3
    51  signatureNemethi(N,f);         signature of singularity z^N+f(x,y)=0, f irred.
     51 signaturePuiseux(N,f);         signature of singularity z^N+f(x,y)=0, f irred.
     52 signatureNemethi(N,f);         signature of singularity z^N+f(x,y)=0
    5253";
    5354
     
    9798///////////////////////////////////////////////////////////////////////////////
    9899
    99 proc signatureBrieskorn(a1,a2,a3)
     100proc signatureBrieskorn(int a1, int a2, int a3)
    100101"USAGE:  signatureBrieskorn(a1,a2,a3); a1,a2,a3 = integers
    101102RETURN:  signature of Brieskorn singularity x^a1+y^a2+z^a3
     
    148149///////////////////////////////////////////////////////////////////////////////
    149150
    150 static proc signatureP(int N,poly f)
    151 "USAGE:  signatureP(N,f); N = integer, f = irreducible poly in 2 variables
     151proc signaturePuiseux(int N, poly f)
     152"USAGE:  signaturePuiseux(N,f); N = int, f = irreducible poly in 2 variables
    152153RETURN:  signature of surface singularity defined by z^N + f(x,y) = 0
    153 EXAMPLE: example signatureP; shows an example
     154EXAMPLE: example signaturePuiseux; shows an example
    154155"
    155156{
     
    180181   poly f = x15-21x14+8x13y-6x13-16x12y+20x11y2-x12+8x11y-36x10y2
    181182            +24x9y3+4x9y2-16x8y3+26x7y4-6x6y4+8x5y5+4x3y6-y8;
    182    signatureP(N,f);
     183   signaturePuiseux(N,f);
    183184}
    184185
     
    296297   {
    297298      v=N[i,1..n];
    298       if(isRupture(v))    // the divisor intersects more then two others
     299      if(isRupture(v))      // the divisor intersects more then two others
    299300      {
    300301         for(j=1;j<=n;j++)
     
    313314   }
    314315   return(a-1+4*e+sumEdges(N,M,K,n)-sumExcepDiv(N,M,K,n));
     316}
     317
     318///////////////////////////////////////////////////////////////////////////////
     319
     320static proc signatureRes(int N, poly f)
     321//=== computes signature of surface singularity defined by z^N + f(x,y) = 0
     322//=== in terms of the imbedded resolution graph of f
     323{
     324   list L = totalmultiplicities(f);
     325   return(etaRes(L,N) - N*etaRes(L,1));
    315326}
    316327
     
    385396
    386397///////////////////////////////////////////////////////////////////////////////
    387 //---------------- Consolidation of the three former variants -----------------
     398
     399static proc signatureSpec(int N, poly f)
     400//=== computes signature of surface singularity defined by z^N + f(x,y) = 0
     401//=== in terms of the spectral pairs of f
     402{
     403   def R = basering;
     404   def Rds = changeord("ds");
     405   setring Rds;
     406   poly f = imap(R,f);
     407   list L = sppairs(f);
     408   setring R;
     409   list L = imap(Rds,L);
     410   return(etaSpec(L,N) - N*etaSpec(L,1));
     411}
     412
     413///////////////////////////////////////////////////////////////////////////////
     414//----------------- Consolidation of the two recent variants ------------------
    388415
    389416proc signatureNemethi(int N, poly f, list #)
    390417"USAGE:  signatureNemethi(N,f); N = integer, f = reduced poly in 2 variables,
    391418                                # empty or 1,2,3
    392 @*       - if # is empty or #[1] = 2 then resolution of singularities is used
    393 @*       - if #[1] = 1 then f has to be analytically irreducible and Puiseux
    394                        expansions are used
    395 @*       - if #[1] = 3 then spectral pairs are used
     419@*       - if #[1] = 1 then resolution of singularity is used
     420@*       - if #[1] = 2 then spectral pairs are used
     421@*       - if # is empty then both upper variants are used in parallel and the
     422@*                 fastest returns the result
    396423RETURN:  signature of surface singularity defined by z^N + f(x,y) = 0
    397424REMARK:  computes the signature of some special surface singularities
     
    401428   if(size(#) == 0)
    402429   {
    403       list L = totalmultiplicities(f);
    404       return(etaRes(L,N) - N*etaRes(L,1));
     430      link l(1) = "ssi:fork"; open(l(1));
     431      link l(2) = "ssi:fork"; open(l(2));
     432      list l = list(l(1),l(2));
     433      write(l(1), quote(signatureRes(N,f)));
     434      write(l(2), quote(signatureSpec(N,f)));
     435      int winner = waitfirst(l);
     436      number sigma = read(l(winner));
     437      close(l(1));
     438      close(l(2));
     439      if(printlevel >= 1)
     440      {
     441         if(winner == 1) { "Resolution of singularity has been used."; }
     442         if(winner == 2) { "Spectral pairs have been used."; }
     443      }
     444      return(sigma);
    405445   }
    406446
    407447   if(#[1] == 1)
    408448   {
    409       return(signatureP(N,f));
     449      return(signatureRes(N,f));
    410450   }
    411451
    412452   if(#[1] == 2)
    413453   {
    414       list L = totalmultiplicities(f);
    415       return(etaRes(L,N) - N*etaRes(L,1));
    416    }
    417 
    418    if(#[1] == 3)
    419    {
    420       def R = basering;
    421       def Rds = changeord("ds");
    422       setring Rds;
    423       poly f = imap(R,f);
    424       list L = sppairs(f);
    425       setring R;
    426       list L = imap(Rds,L);
    427       return(etaSpec(L,N) - N*etaSpec(L,1));
     454      return(signatureSpec(N,f));
    428455   }
    429456}
     
    435462            +24x9y3+4x9y2-16x8y3+26x7y4-6x6y4+8x5y5+4x3y6-y8;
    436463   signatureNemethi(N,f,1);
    437    signatureNemethi(N,f,2);
     464   printlevel = 1;
     465   signatureNemethi(N,f);
    438466}
    439467
Note: See TracChangeset for help on using the changeset viewer.