Changeset c87dbd in git


Ignore:
Timestamp:
Apr 20, 2007, 2:21:12 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
5411c83f97258af47096ddd35e1e76f1d12b9d3c
Parents:
adde988366fe79ac130279c9a15ff9741ba9b061
Message:
*hannes: optimizations


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/alexpoly.lib

    radde988 rc87dbd  
    1 version="$Id: alexpoly.lib,v 1.15 2007-04-19 15:10:38 Singular Exp $";
     1version="$Id: alexpoly.lib,v 1.16 2007-04-20 12:21:12 Singular Exp $";
    22category="Singularities";
    33info="
     
    117117  /// separated on the first exceptional divisor. Otherwise split_graph should not be applied!
    118118  ///////////////////////////////////////////////////////////////////////////////////////////////
    119   /// If #[1]="tau", then totalmultiplicities is called for the use in tau_es - thus it returns
     119  /// If #[1]="tau", then totalmultiplicities is called for the use in tau_es2 - thus it returns
    120120  /// the prolonged resolutiongraphs of the branches, their multiplicity sequences and their
    121121  /// contact matrix - sorted appropriately.
     
    279279  }
    280280  ///////////////////////////////////////////////////////////////////////////////
    281   // Check, if the procedure is called from inside tau_es.
     281  // Check, if the procedure is called from inside tau_es2.
    282282  int check_tau;
    283283  if (size(#)==1)
     
    289289  }
    290290  /////////////////////////////////////////////////////////////////////////////////
    291   // The procedure tau_es expects the branches to be ordered according to their
     291  // The procedure tau_es2 expects the branches to be ordered according to their
    292292  // contact during the resolution process.
    293293  /////////////////////////////////////////////////////////////////////////////////
     
    305305  }
    306306  ///////////////////////////////////////////////////////////////////////////////////
    307   /// If the procedure is called from inside tau_es, the output will be the prolonged
     307  /// If the procedure is called from inside tau_es2, the output will be the prolonged
    308308  /// resolutiongraphs of the branches, their multiplicity sequences and their contact matrix.
    309309  if (check_tau==1)
     
    21232123"USAGE:    delete_row(M,i); M intmat, i int
    21242124RETURN:   intmat, which is derived from M by removing the ith row
    2125 NOTE:     This procedure is only for internal use; it is called in move_row and tau_es.
     2125NOTE:     This procedure is only for internal use; it is called in move_row and tau_es2.
    21262126"
    21272127{
     
    21852185"USAGE:    find_last_non_one (v,k); intvec v, int k
    21862186RETURN:   int i, the last index i>=k such that v[i]!=1, or k-1 if no such i exists.
    2187 NOTE:     This procedure is only for internal use; it is called in tau_es.
     2187NOTE:     This procedure is only for internal use; it is called in tau_es2.
    21882188"
    21892189{
     
    22062206"USAGE:    intmat_minus_one(M);  intmat M
    22072207RETURN:   intmat, all non-zero entries of M deminuished by 1.
    2208 NOTE:     This procedure is only for internal use; it is called in tau_es.
     2208NOTE:     This procedure is only for internal use; it is called in tau_es2.
    22092209"
    22102210{
     
    22282228         or the output of @code{hnexpansion(f[,\"ess\"])}, or the list @code{hne} in
    22292229         the ring created by @code{hnexpansion(f[,\"ess\"])}, or the output of
    2230          @code{develop(f)} resp. of @code{extdevelop(f,n)}, or a list containing 
    2231          the contact matrix and a list of integer vectors with the characteristic exponents 
     2230         @code{develop(f)} resp. of @code{extdevelop(f,n)}, or a list containing
     2231         the contact matrix and a list of integer vectors with the characteristic exponents
    22322232         of the branches of a plane curve singularity, or an integer vector containing the
    2233          characteristic exponents of an irreducible plane curve singularity, or the resolution 
     2233         characteristic exponents of an irreducible plane curve singularity, or the resolution
    22342234         graph of a plane curve singularity (i.e. the output of resolutiongraph or
    22352235         the first entry in the output of totalmultiplicities).
    2236 RETURN:  list, of three integer matrices. The first one is the proximity matrix of 
    2237          the plane curve defined by the INPUT, i.e. the entry i,j is 1 if the 
    2238          infinitely near point corresponding to row i is proximate to the infinitely 
    2239          near point corresponding to row j. The second integer matrix is the incidence matrix of the 
    2240          resolution graph of the plane curve. The entry on the diagonal in row i is -s-1 
    2241          if s is the number of points proximate to the infinitely near point corresponding 
    2242          to the ith row in the matrix. The third integer matrix is the incidence matrix of 
    2243          the Enriques diagram of the plane curve singularity, i.e. each row corresponds to 
     2236RETURN:  list, of three integer matrices. The first one is the proximity matrix of
     2237         the plane curve defined by the INPUT, i.e. the entry i,j is 1 if the
     2238         infinitely near point corresponding to row i is proximate to the infinitely
     2239         near point corresponding to row j. The second integer matrix is the incidence matrix of the
     2240         resolution graph of the plane curve. The entry on the diagonal in row i is -s-1
     2241         if s is the number of points proximate to the infinitely near point corresponding
     2242         to the ith row in the matrix. The third integer matrix is the incidence matrix of
     2243         the Enriques diagram of the plane curve singularity, i.e. each row corresponds to
    22442244         an infinitely near point in the minimal standard resolution, including the
    22452245         strict transforms of the branches, the diagonal element gives
     
    22482248         for other purposes as well it is better to calculate this first
    22492249         with the aid of @code{hnexpansion} and use it as input instead of
    2250          the polynomial itself. 
     2250         the polynomial itself.
    22512251         @*
    2252          If you are not sure whether the INPUT polynomial is reduced or not, use 
     2252         If you are not sure whether the INPUT polynomial is reduced or not, use
    22532253         @code{squarefree(INPUT)} as input instead.
    22542254         @*
    2255          If the input is a smooth curve, then the output will consist of 
     2255         If the input is a smooth curve, then the output will consist of
    22562256         three one-by-one zero matrices.
    22572257         @*
    2258          For the definitions of the computed objects see e.g. the book 
    2259          Eduardo Casas-Alvero, Singularities of Plane Curves.       
     2258         For the definitions of the computed objects see e.g. the book
     2259         Eduardo Casas-Alvero, Singularities of Plane Curves.
    22602260SEE ALSO: develop, hnexpansion, totalmultiplicities, alexanderpolynomial
    22612261EXAMPLE: example proximitymatrix;  shows an example
     
    22672267    intmat resgr=INPUT;
    22682268  }
    2269   else 
     2269  else
    22702270  {
    22712271    intmat resgr=totalmultiplicities(INPUT)[1];
     
    22782278  ////////  Calculate the proximity resolution graph ////////////
    22792279  int i,j;
    2280   int n=nrows(resgr); 
     2280  int n=nrows(resgr);
    22812281  intvec diag; // Diagonal of the Enriques diagram.
    22822282  int si; // number of points proximate to the point corresponding to the ith row
     
    22952295      resgr[i,i]=resgr[j,j]+1;
    22962296    }
    2297   } 
     2297  }
    22982298  // Set the weights in the resolution graph to the blowing up level in the resolution.
    22992299  for (i=1;i<=n;i++)
     
    23012301    resgr[i,i]=resgr[i,i]-1;
    23022302    diag[i]=resgr[i,i]; // The level of the corresponding infinitely near point.
    2303   } 
    2304   // Replace the weights in the resolution graph by 
     2303  }
     2304  // Replace the weights in the resolution graph by
    23052305  // -s-1, where s is the number of points which are proximate to the point.
    23062306  for (i=1;i<=n;i++)
    23072307  {
    2308     si=-1; 
     2308    si=-1;
    23092309    // Find the points of higher weight which are connected to the ith row.
    23102310    for (j=i+1;j<=n;j++)
     
    23672367"
    23682368{
    2369   for (int k=1;k<=ncols(M);k++)
    2370   {
    2371     M[j,k]=kj*M[j,k]+ki*M[i,k];
    2372   }
     2369  int k=ncols(M);
     2370  M[j,1..k]=kj*M[j,1..k]+ki*M[i,1..k];
    23732371  return(M);
    23742372}
     
    23932391  {
    23942392    if (M[n,n]<0)
    2395     {   
     2393    {
    23962394      M=addmultiplrows(M,n,n,-1,0);
    23972395    }
     
    24152413RETURN:      list, the first entry is an integer matrix containing the total
    24162414             multiplicities and the second entry is an integer matrix containing
    2417              the multiplicies of the resolution given by rg, where the zeros 
     2415             the multiplicies of the resolution given by rg, where the zeros
    24182416             corresponding to the strict transforms of the branches of the curve
    24192417             have been replaced by the (total) multiplicities of the infinitely near
     
    24622460
    24632461proc intmat_inverse (intmat M)
    2464 "USAGE:      intmat_inverse(M); intmat M 
     2462"USAGE:      intmat_inverse(M); intmat M
    24652463ASSUME:      M is a lower triangular integer matrix with diagonal entries 1 or -1
    24662464RETURN:      intmat, the inverse of M
     
    24722470  int n=nrows(M);
    24732471  intmat U[n][n];
     2472  U=U+1;
    24742473  for (i=1;i<=n;i++)
    24752474  {
    2476     U[i,i]=1;
    2477   }
    2478   for (i=1;i<=n;i++)
    2479   {
    24802475    if (M[i,i]==-1)
    2481     {     
     2476    {
    24822477      M=addmultiplrows(M,i,i,-1,0);
    24832478      U=addmultiplrows(U,i,i,-1,0);
    24842479    }
    24852480    for (j=i+1;j<=n;j++)
    2486     {     
     2481    {
    24872482      U=addmultiplrows(U,i,j,-M[j,i],M[i,i]);
    24882483      M=addmultiplrows(M,i,j,-M[j,i],M[i,i]);
    2489     } 
     2484    }
    24902485  }
    24912486  return(U);
Note: See TracChangeset for help on using the changeset viewer.