Changeset e324f51 in git


Ignore:
Timestamp:
Nov 16, 2020, 8:17:03 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
93071995c509c3daf345991ea24275045205d604
Parents:
7f4475eb5b248c52cbad0428d40629dab16db64a2629de36e042e643d9a0d27aaae21641614f5e22
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2020-11-16 20:17:03+01:00
git-committer:
GitHub <noreply@github.com>2020-11-16 20:17:03+01:00
Message:
Merge pull request #1031 from YueRen/gitfanBug

fix: bug reported by Donton-Bury and Grab
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/gitfan.lib

    r7f4475 re324f51  
    985985"
    986986{
    987   cone Qgammadual = coneViaInequalities(transpose(Q));
    988   bigintmat R = facets(Qgammadual);
    989   list idx1=intvecToList(intvec(1..nrows(R)));
    990   intvec idx2=1..ncols(R);
    991   intvec idx1iv;
    992   bigintmat Ri[nrows(R)-1][ncols(R)];
    993   list C;
    994   for (int i = 1; i<=nrows(R);i++){
    995     idx1iv = listToIntvec(delete(idx1,i));
    996     Ri=R[idx1iv,idx2];
    997     C[i]=coneViaPoints(Ri);
    998     dbprint(string(i)+"   "+string(nrows(facets(C[i]))));
     987  // Check whether the cone generated by the columns of Q is pointed:
     988  intmat Qt = transpose(Q);
     989  cone CQ = coneViaPoints(Qt);
     990  if (dimension(convexIntersection(CQ,negatedCone(CQ)))==0)
     991  {
     992    // The following old code assumes that
     993    // the cone generated by the columns of Q is pointed:
     994    cone Qgammadual = coneViaInequalities(Qt);
     995    bigintmat R = facets(Qgammadual);
     996    list idx1=intvecToList(intvec(1..nrows(R)));
     997    intvec idx2=1..ncols(R);
     998    intvec idx1iv;
     999    bigintmat Ri[nrows(R)-1][ncols(R)];
     1000    list C;
     1001    for (int i = 1; i<=nrows(R);i++){
     1002      idx1iv = listToIntvec(delete(idx1,i));
     1003      Ri=R[idx1iv,idx2];
     1004      C[i]=coneViaPoints(Ri);
     1005      dbprint(string(i)+"   "+string(nrows(facets(C[i]))));
     1006    }
     1007  }
     1008  else
     1009  {
     1010    // The following code works always but is generally slower:
     1011    list C;
     1012    for (int i=1; i<=nrows(Qt); i++)
     1013    {
     1014      intmat Qdash[nrows(Qt)-1][ncols(Qt)];
     1015      for (int j=1; j<i; j++)
     1016      {
     1017        Qdash[j,1..ncols(Qt)] = Qt[j,1..ncols(Qt)];
     1018      }
     1019      for (int j=i+1; j<=nrows(Qt); j++)
     1020      {
     1021        Qdash[j-1,1..ncols(Qt)] = Qt[j,1..ncols(Qt)];
     1022      }
     1023      C[i] = coneViaPoints(Qdash);
     1024    }
    9991025  }
    10001026  cone mov = convexIntersection(C);
     
    10101036    0, 1, 0, 1, 0, -1, 0, 0, 1, 0,
    10111037    0, 0, 1, 1, -1, 0, 0, 0, 0, 1;
     1038  cone mov = movingCone(Q);
     1039  mov;
     1040  rays(mov);
     1041
     1042  // moving cone where the image of the positive orthant
     1043  // is the entire space
     1044  // (from bug reported by Donton-Bury and Grab)
     1045  intmat Q[3][16] =
     1046    7, 7,7,7, 7,7,7, 7,7,7, 7,7,7, -7,0,0,
     1047    0, 0,2,1, 0,2,1, 3,2,1, 3,2,4, 0,-3,0,
     1048    0, 0,1,2, 0,1,2, 3,1,2, 3,4,2, 0,0,-3;
    10121049  cone mov = movingCone(Q);
    10131050  mov;
     
    30923129  orbitConesOld(a, Q);
    30933130}
    3094 
  • factory/cf_chinese.cc

    r2629de3 re324f51  
    256256#else
    257257          if (c.inZ())
    258             result += power (x, i.exp()) * Farey_n(c,q);
     258            result += power (x, i.exp()) * Farey_n(c,q);
    259259#endif
    260260          else
Note: See TracChangeset for help on using the changeset viewer.