Changeset 1941b8 in git


Ignore:
Timestamp:
Aug 3, 2016, 4:27:18 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5482369543823873f05f2b2bf641804948bc2e5b
Parents:
bd9a41c240f0853fddef3cce8d80f2d7077b36c8
Message:
fix: tr. #768 by Thomas Markwig
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/alexpoly.lib

    rbd9a41 r1941b8  
    125125  intmat helpmati,helpmatii;
    126126  intvec helpvec;
     127  int inputispoly=0;
    127128  /////////////////////////////////////////////////////////////////////////////////
    128129  // Decide, which kind of input we have, and define the contact matrix
     
    142143    */
    143144    list I@N@V=invariants(INPUT);
     145    inputispoly=1;
    144146  }
    145147  else
     
    313315  }
    314316  /////////////////////////////////////////////////////////////////////////////////////
    315   // Sort the branches in such a way, that in the blowing up procedure whenever to branches
     317  // Sort the branches in such a way, that in the blowing up procedure whenever two branches
    316318  // C_i and C_j have contact k (i.e. after k steps they are separated) and one of the following
    317319  // situations occurs:
     
    359361  int n_i,n_j;
    360362  int bad_contact;
     363  list newpos;  // when reordering the branches, here we save the new order of the old branches
     364  for (ii=1;ii<=r;ii++)
     365  {
     366    newpos[ii]=ii;
     367  }
    361368  while (i<r)
    362369  {
     
    412419      bad_contact=1;
    413420      // Move the graph (etc.) of C_j into the position i.
     421      newpos=insert(newpos,j,i-1);
     422      newpos=delete(newpos,j+1);
    414423      graphs=insert(graphs,graphs[j],i-1);
    415424      graphs=delete(graphs,j+1);
     
    559568    }
    560569  }
    561   list result=rgraph,rtm,rmt;
    562   return(result);
     570  if (inputispoly==1) // if the input was a polynomial the ordering of the branches is fine
     571  {
     572    list result=rgraph,rtm,rmt;
     573    return(result);
     574  }
     575  else // reorder the branches according to the ordering of the input
     576  {
     577    // reordered total multiplicities, multiplicities and resolution graph
     578    intmat rtmro[nrows(rtm)][ncols(rtm)];
     579    intmat rmtro[nrows(rmt)][ncols(rmt)];
     580    intmat rgraphro=rgraph;
     581    for (i=1;i<=r;i++)
     582    {
     583      rtmro[1..nrows(rtm),newpos[i]]=rtm[1..nrows(rtm),i];
     584      rmtro[1..nrows(rmt),newpos[i]]=rmt[1..nrows(rmt),i];
     585      for (j=1;j<=nrows(rgraph);j++)
     586      {
     587        if (rgraph[j,j]==-i)
     588        {
     589          rgraphro[j,j]=-newpos[i];
     590        }
     591      }
     592    }
     593    list result=rgraphro,rtmro,rmtro;
     594    return(result);
     595  }
    563596}
    564597example
     
    835868    intmat intersecmult=I@N@V[size(I@N@V)][2];   // intersection multiplicities
    836869    for(i=1;i<=n;i++)
    837         {
    838           conductor[i]=I@N@V[i][5];
     870    {
     871      conductor[i]=I@N@V[i][5];
    839872      charexp[i]=I@N@V[i][1];
    840         }
     873    }
    841874  }
    842875  /////////////////////////////////////////////////////////////////////////////////////
     
    848881  {
    849882    for(j=1;j<=size(conductor);j++)
    850         {
    851           conductor[i]=conductor[i]+intersecmult[i,j];
    852         }
     883    {
     884      conductor[i]=conductor[i]+intersecmult[i,j];
     885    }
    853886  }
    854887  /////////////////////////////////////////////////////////////////////////////////////
  • Tst/Short/ok_s.lst

    rbd9a41 r1941b8  
    6262bug_tr760_761
    6363bug_tr767
     64bug_tr768
    6465bug_genus_etc
    6566conv_bi
Note: See TracChangeset for help on using the changeset viewer.