Changeset 635bdd in git


Ignore:
Timestamp:
Nov 21, 2014, 1:41:33 PM (9 years ago)
Author:
Stephan Oberfranz <oberfran@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
f2ba60d666fcc3a4164b840100f6e982e9749517
Parents:
10b82cde01129c33a7f8f0327bfc5e043a2199b3cb6dc33c118a894b213ceda9734ce618f5c616b9
Message:
Merge branch 'spielwiese' of github.com:Singular/Sources into spielwiese
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/modwalk.lib

    • Property mode changed from 100644 to 100755
    rcb6dc33 r635bdd  
    1616
    1717PROCEDURES:
     18modpWalk(ideal,int,int,int[,int,int,int,int])    standard basis conversion of I in prime characteristic
    1819modWalk(ideal,int,int[,int,int,int,int]);        standard basis conversion of I using modular methods (chinese remainder)
    1920";
     
    2930////////////////////////////////////////////////////////////////////////////////
    3031
    31 static proc modpWalk(def II, int p, int variant, list #)
     32proc modpWalk(def II, int p, int variant, list #)
    3233"USAGE:  modpWalk(I,p,#); I ideal, p integer, variant integer
    3334ASSUME:  If size(#) > 0, then
     
    8081    }
    8182  }
    82 
    83 //-------------------------  make i homogeneous  -----------------------------
    84   if(!mixedTest() && !h)
    85   {
    86     if(!((find(ordstr_R0, "M") > 0) || (find(ordstr_R0, "a") > 0) || neg))
    87     {
    88       if(!((order == "simple") || (sizerl > 4)))
    89       {
    90         list rl@r = ringlist(@r);
    91         nvar@r = nvars(@r);     
    92         intvec w;
    93         for(k = 1; k <= nvar@r; k++)
    94         {
    95           w[k] = deg(var(k));
    96         }
    97         w[nvar@r + 1] = 1;
    98         rl@r[2][nvar@r + 1] = "homvar";
    99         rl@r[3][2][2] = w;
    100         def HomR = ring(rl@r);
    101         setring HomR;
    102         ideal i = imap(@r, i);
    103         i = homog(i, homvar);
    104       }
    105     }
    106   }
    107 
    10883//-------------------------  compute a standard basis mod p  -----------------------------
    109 
    11084  if(variant == 1)
    11185  {
     
    11387    {
    11488      i = rwalk(i,radius,pert_deg,#);
    115      // rwalk(i,radius,pert_deg,#); std(i);
    11689    }
    11790    else
     
    175148    }
    176149  }
    177  
    178   if(!mixedTest() && !h)
    179   {
    180     if(!((find(ordstr_R0, "M") > 0) || (find(ordstr_R0, "a") > 0) || neg))
    181     {
    182       if(!((order == "simple") || (sizerl > 4)))
    183       {
    184         i = subst(i, homvar, 1);
    185         i = simplify(i, 34);
    186         setring @r;
    187         i = imap(HomR, i);
    188         i = interred(i);
    189         kill HomR;
    190       }
    191     }
    192   }
     150
    193151  setring R0;
    194152  return(list(fetch(@r,i),p));
     
    487445  if(n2 > 4)
    488446  {
    489   //  L[5] = prime(random(an,en));
     447    L[5] = prime(random(an,en));
    490448  }
    491449  if(printlevel >= 10)
     
    528486//-------------------  Now all leading ideals are the same  --------------------
    529487//-------------------  Lift results to basering via farey  ---------------------
    530 
    531488    tt = timer; rt = rtimer;
    532489    N = T2[1];
     
    545502
    546503//----------------  Test if we already have a standard basis of I --------------
    547 
    548504    tt = timer; rt = rtimer;
    549     pTest = pTestSB(I,J,L,variant);
    550     //pTest = primeTestSB(I,J,L,variant);
     505    pTest = primeTest(J, prime(random(1000000000,2134567879)));
    551506    if(printlevel >= 10)
    552507    {
     
    596551    }
    597552//--------------  We do not already have a standard basis of I, therefore do the main computation for more primes  --------------
    598 
    599553    T1 = H;
    600554    T2 = N;
     
    613567      for(i=j; i<=size(L); i++)
    614568      {
    615         //Arguments[i-j+1] = list(II,L[i],variant,list(curr_weight,target_weight));
    616569        Arguments[size(Arguments)+1] = list(II,L[i],variant,list(curr_weight,target_weight));
    617570      }
     
    621574      for(i=j; i<=size(L); i++)
    622575      {
    623         //Arguments[i-j+1] = list(II,L[i],variant);
    624576        Arguments[size(Arguments)+1] = list(II,L[i],variant);
    625577      }
     
    632584    for(i=1; i<=size(PP); i++)
    633585    {
    634       //P[size(P) + 1] = PP[i];
    635586      T1[size(T1) + 1] = PP[i][1];
    636587      T2[size(T2) + 1] = bigint(PP[i][2]);
     
    649600  echo = 2;
    650601  ring R=0,(x,y,z),lp;
    651   ideal I=-x+y2z-z,xz+1,x2+y2-1;
    652   // I is a standard basis in dp
    653   ideal J = modWalk(I,1);
     602  ideal I= y3+xyz+y2z+xz3, 3+xy+x2y+y2z;
     603  ideal J = modWalk(I,2);
    654604  J;
    655605}
     
    772722  return(J);
    773723}
    774 //////////////////////////////////////////////////////////////////////////////////
    775 static proc primeTestSB(def II, ideal J, list L, int variant, list #)
    776 "USAGE:  primeTestSB(I,J,L,variant,#); I,J ideals, L intvec of primes, variant int
    777 RETURN:  1 (resp. 0) if for a randomly chosen prime p that is not in L
    778          J mod p is (resp. is not) a standard basis of I mod p
    779 EXAMPLE: example primeTestSB; shows an example
    780 "
    781 {
    782 if(typeof(II) == "ideal")
    783   {
    784   ideal I = II;
    785   int radius = 2;
    786   }
    787 if(typeof(II) == "list")
    788   {
    789   ideal I = II[1];
    790   int radius = II[2];
    791   }
    792 
    793 int i,j,k,p;
    794 def R = basering;
    795 list r = ringlist(R);
    796 
    797 while(!j)
    798   {
    799   j = 1;
    800   p = prime(random(1000000000,2134567879));
    801   for(i = 1; i <= size(L); i++)
    802     {
    803     if(p == L[i])
    804       {
    805       j = 0;
    806       break;
    807       }
    808     }
    809   if(j)
    810     {
    811     for(i = 1; i <= ncols(I); i++)
    812       {
    813       for(k = 2; k <= size(I[i]); k++)
    814         {
    815         if((denominator(leadcoef(I[i][k])) mod p) == 0)
    816           {
    817           j = 0;
    818           break;
    819           }
    820         }
    821       if(!j)
    822         {
    823         break;
    824         }
    825       }
    826     }
    827   if(j)
    828     {
    829     if(!primeTest(I,p))
    830       {
    831       j = 0;
    832       }
    833     }
    834   }
    835 r[1] = p;
    836 def @R = ring(r);
    837 setring @R;
    838 ideal I = imap(R,I);
    839 ideal J = imap(R,J);
    840 attrib(J,"isSB",1);
    841 
    842 int t = timer;
    843 j = 1;
    844 if(isIncluded(I,J) == 0)
    845   {
    846   j = 0;
    847   }
    848 if(printlevel >= 11)
    849   {
    850   "isIncluded(I,J) takes "+string(timer - t)+" seconds";
    851   "j = "+string(j);
    852   }
    853 t = timer;
    854 if(j)
    855   {
    856   if(size(#) > 0)
    857     {
    858     ideal K = modpWalk(I,p,variant,#)[1];
    859     }
    860   else
    861     {
    862     ideal K = modpWalk(I,p,variant)[1];
    863     }
    864   t = timer;
    865   if(isIncluded(J,K) == 0)
    866     {
    867     j = 0;
    868     }
    869   if(printlevel >= 11)
    870     {
    871     "isIncluded(K,J) takes "+string(timer - t)+" seconds";
    872     "j = "+string(j);
    873     }
    874   }
    875 setring R;
    876 
    877 return(j);
    878 }
    879 example
    880 { "EXAMPLE:"; echo = 2;
    881    intvec L = 2,3,5;
    882    ring r = 0,(x,y,z),lp;
    883    ideal I = x+1,x+y+1;
    884    ideal J = x+1,y;
    885    primeTestSB(I,I,L,1);
    886    primeTestSB(I,J,L,1);
    887 }
    888 
    889 ////////////////////////////////////////////////////////////////////////////////
    890 static proc pTestSB(ideal I, ideal J, list L, int variant, list #)
    891 "USAGE:  pTestSB(I,J,L,variant,#); I,J ideals, L intvec of primes, variant int
    892 RETURN:  1 (resp. 0) if for a randomly chosen prime p that is not in L
    893          J mod p is (resp. is not) a standard basis of I mod p
    894 EXAMPLE: example pTestSB; shows an example
    895 "
    896 {
    897    int i,j,k,p;
    898    def R = basering;
    899    list r = ringlist(R);
    900 
    901    while(!j)
    902    {
    903       j = 1;
    904       p = prime(random(1000000000,2134567879));
    905       for(i = 1; i <= size(L); i++)
    906       {
    907          if(p == L[i]) { j = 0; break; }
    908       }
    909       if(j)
    910       {
    911          for(i = 1; i <= ncols(I); i++)
    912          {
    913             for(k = 2; k <= size(I[i]); k++)
    914             {
    915                if((denominator(leadcoef(I[i][k])) mod p) == 0) { j = 0; break; }
    916             }
    917             if(!j){ break; }
    918          }
    919       }
    920       if(j)
    921       {
    922          if(!primeTest(I,p)) { j = 0; }
    923       }
    924    }
    925    r[1] = p;
    926    def @R = ring(r);
    927    setring @R;
    928    ideal I = imap(R,I);
    929    ideal J = imap(R,J);
    930    attrib(J,"isSB",1);
    931 
    932    int t = timer;
    933    j = 1;
    934    if(isIncluded(I,J) == 0) { j = 0; }
    935 
    936    if(printlevel >= 11)
    937    {
    938       "isIncluded(I,J) takes "+string(timer - t)+" seconds";
    939       "j = "+string(j);
    940    }
    941 
    942    t = timer;
    943    if(j)
    944    {
    945       if(size(#) > 0)
    946       {
    947          ideal K = modpStd(I,p,variant,#[1])[1];
    948       }
    949       else
    950       {
    951          ideal K = groebner(I);
    952       }
    953       t = timer;
    954       if(isIncluded(J,K) == 0) { j = 0; }
    955 
    956       if(printlevel >= 11)
    957       {
    958          "isIncluded(J,K) takes "+string(timer - t)+" seconds";
    959          "j = "+string(j);
    960       }
    961    }
    962    setring R;
    963    return(j);
    964 }
    965 example
    966 { "EXAMPLE:"; echo = 2;
    967    intvec L = 2,3,5;
    968    ring r = 0,(x,y,z),dp;
    969    ideal I = x+1,x+y+1;
    970    ideal J = x+1,y;
    971    pTestSB(I,I,L,2);
    972    pTestSB(I,J,L,2);
    973 }
     724
    974725////////////////////////////////////////////////////////////////////////////////
    975726static proc mixedTest()
  • Singular/LIB/primdec.lib

    r10b82c r635bdd  
    11////////////////////////////////////////////////////////////////////////////
    2 version="version primdec.lib 4.0.0.0 Jun_2013 "; // $Id$
     2version="version primdec.lib 4.0.1.1 Nov_2014 "; // $Id$
    33category="Commutative Algebra";
    44info="
     
    44224422  for(i=nrows(m);i>=1; i--)
    44234423  {
    4424     PHI[i]=ideal(m[i,1..ncols(m)]);
     4424    PHI[i]=simplify(ideal(m[i,1..ncols(m)]),2);
    44254425    I=0;
    44264426    for(j=ncols(PHI[i]);j>0;j--)
  • Singular/LIB/rwalk.lib

    • Property mode changed from 100644 to 100755
  • Singular/LIB/swalk.lib

    • Property mode changed from 100644 to 100755
  • Singular/extra.cc

    rcb6dc33 r635bdd  
    19541954    if (strcmp(sys_cmd, "Mfrwalk") == 0)
    19551955    {
    1956       const short t[]={6,IDEAL_CMD,INTVEC_CMD,INTVEC_CMD,INT_CMD,INT_CMD,RING_CMD};
     1956      const short t[]={4,IDEAL_CMD,INTVEC_CMD,INTVEC_CMD,INT_CMD};
    19571957      if (!iiCheckTypes(h,t,1)) return TRUE;
    19581958      if (((intvec*) h->next->Data())->length() != currRing->N &&
  • Singular/iparith.cc

    r10b82c r635bdd  
    71217121    {
    71227122      (*iv)[i]=(int)(long)h->Data();
     7123    }
     7124    else if (h->Typ()==INTVEC_CMD)
     7125    {
     7126      intvec *ivv=(intvec*)h->Data();
     7127      for(int j=0;j<ivv->length();j++,i++)
     7128      {
     7129        (*iv)[i]=(*ivv)[j];
     7130      }
     7131      i--;
    71237132    }
    71247133    else
  • Singular/walk.cc

    • Property mode changed from 100644 to 100755
    rcb6dc33 r635bdd  
    562562}
    563563
     564/*****************************************************************************
     565 * compute the gcd of the entries of the vectors curr_weight and diff_weight *
     566 *****************************************************************************/
     567static int simplify_gcd(intvec* curr_weight, intvec* diff_weight)
     568{
     569  int j;
     570  int nRing = currRing->N;
     571  int gcd_tmp = (*curr_weight)[0];
     572  for (j=1; j<nRing; j++)
     573  {
     574    gcd_tmp = gcd(gcd_tmp, (*curr_weight)[j]);
     575    if(gcd_tmp == 1)
     576    {
     577      break;
     578    }
     579  }
     580  if(gcd_tmp != 1)
     581  {
     582    for (j=0; j<nRing; j++)
     583    {
     584    gcd_tmp = gcd(gcd_tmp, (*diff_weight)[j]);
     585    if(gcd_tmp == 1)
     586      {
     587        break;
     588      }
     589    }
     590  }
     591  return gcd_tmp;
     592}
     593
    564594/*********************************************
    565595 * cancel gcd of integers zaehler and nenner *
     
    18611891}
    18621892
     1893
     1894/**************************************************************
     1895 * Look for the position of the smallest absolut value in vec *
     1896 **************************************************************/
     1897static int MivAbsMaxArg(intvec* vec)
     1898{
     1899  int k = MivAbsMax(vec);
     1900  int i=0;
     1901  while(1)
     1902  {
     1903    if((*vec)[i] == k || (*vec)[i] == -k)
     1904    {
     1905      break;
     1906    }
     1907    i++;
     1908  }
     1909  return i;
     1910}
     1911
     1912
    18631913/**********************************************************************
    18641914 * Compute a next weight vector between curr_weight and target_weight *
     
    18751925
    18761926  int nRing = currRing->N;
    1877   int checkRed, j, kkk, nG = IDELEMS(G);
     1927  int checkRed, j, nG = IDELEMS(G);
    18781928  intvec* ivtemp;
    18791929
     
    19131963  mpz_init(dcw);
    19141964
    1915   //int tn0, tn1, tz1, ncmp, gcd_tmp, ntmp;
    19161965  int gcd_tmp;
    19171966  intvec* diff_weight = MivSub(target_weight, curr_weight);
     
    19191968  intvec* diff_weight1 = MivSub(target_weight, curr_weight);
    19201969  poly g;
    1921   //poly g, gw;
     1970
    19221971  for (j=0; j<nG; j++)
    19231972  {
     
    19812030    }
    19822031  }
    1983 //Print("\n// Alloc Size = %d \n", nRing*sizeof(mpz_t));
     2032  //Print("\n// Alloc Size = %d \n", nRing*sizeof(mpz_t));
    19842033  mpz_t *vec=(mpz_t*)omAlloc(nRing*sizeof(mpz_t));
    19852034
    19862035
    1987   // there is no 0<t<1 and define the next weight vector that is equal to the current weight vector
     2036  // there is no 0<t<1 and define the next weight vector that is equal
     2037  // to the current weight vector
    19882038  if(mpz_cmp(t_nenner, t_null) == 0)
    19892039  {
     
    20562106#endif
    20572107
    2058   //  BOOLEAN isdwpos;
    2059 
    2060   // construct a new weight vector
     2108// construct a new weight vector and check whether vec[j] is overflow,
     2109// i.e. vec[j] > 2^31.
     2110// If vec[j] doesn't overflow, define a weight vector. Otherwise,
     2111// report that overflow appears. In the second case, test whether the
     2112// the correctness of the new vector plays an important role
     2113
    20612114  for (j=0; j<nRing; j++)
    20622115  {
     
    21022155    }
    21032156  }
    2104 
     2157  // reduce the vector with the gcd
     2158  if(mpz_cmp_si(ggt,1) != 0)
     2159  {
     2160    for (j=0; j<nRing; j++)
     2161    {
     2162      mpz_divexact(vec[j], vec[j], ggt);
     2163    }
     2164  }
    21052165#ifdef  NEXT_VECTORS_CC
    21062166  PrintS("\n// gcd of elements of the vector: ");
     
    21082168#endif
    21092169
    2110 /**********************************************************************
    2111 * construct a new weight vector and check whether vec[j] is overflow, *
    2112 * i.e. vec[j] > 2^31.                                                 *
    2113 * If vec[j] doesn't overflow, define a weight vector. Otherwise,      *
    2114 * report that overflow appears. In the second case, test whether the  *
    2115 * the correctness of the new vector plays an important role           *
    2116 **********************************************************************/
    2117   kkk=0;
    21182170  for(j=0; j<nRing; j++)
    21192171    {
     
    21312183
    21322184  REDUCTION:
     2185  checkRed = 1;
    21332186  for (j=0; j<nRing; j++)
    21342187  {
    2135     (*diff_weight)[j] = mpz_get_si(vec[j]);
    2136   }
    2137   while(MivAbsMax(diff_weight) >= 5)
    2138   {
    2139     for (j=0; j<nRing; j++)
    2140     {
    2141       if(mpz_cmp_si(ggt,1)==0)
    2142       {
    2143         (*diff_weight1)[j] = floor(0.1*(*diff_weight)[j] + 0.5);
    2144         // Print("\n//  vector[%d] = %d \n",j+1, (*diff_weight1)[j]);
    2145       }
    2146       else
    2147       {
    2148         mpz_divexact(vec[j], vec[j], ggt);
    2149         (*diff_weight1)[j] = floor(0.1*(*diff_weight)[j] + 0.5);
    2150         // Print("\n//  vector[%d] = %d \n",j+1, (*diff_weight1)[j]);
    2151       }
    2152 /*
    2153       if((*diff_weight1)[j] == 0)
    2154       {
    2155         kkk = kkk + 1;
    2156       }
    2157 */
    2158     }
    2159 
    2160 
    2161 /*
    2162     if(kkk > nRing - 1)
    2163     {
    2164       // diff_weight was reduced to zero
    2165       // Print("\n // MwalkNextWeightCC: geaenderter Vector gleich Null! \n");
    2166       goto TEST_OVERFLOW;
    2167     }
    2168 */
    2169 
    2170     if(test_w_in_ConeCC(G,diff_weight1) != 0)
    2171     {
    2172       Print("\n// MwalkNextWeightCC: geaenderter vector liegt in Groebnerkegel! \n");
    2173       for (j=0; j<nRing; j++)
    2174       {
    2175         (*diff_weight)[j] = (*diff_weight1)[j];
    2176       }
    2177       if(MivAbsMax(diff_weight) < 5)
    2178       {
    2179         checkRed = 1;
    2180         goto SIMPLIFY_GCD;
    2181       }
    2182     }
    2183     else
    2184     {
    2185       // Print("\n// MwalkNextWeightCC: geaenderter vector liegt nicht in Groebnerkegel! \n");
    2186       break;
    2187     }
     2188    (*diff_weight1)[j] = mpz_get_si(vec[j]);
     2189  }
     2190  while(test_w_in_ConeCC(G,diff_weight1))
     2191  {
     2192    for(j=0; j<nRing; j++)
     2193    {
     2194      (*diff_weight)[j] = (*diff_weight1)[j];
     2195      mpz_set_si(vec[j], (*diff_weight)[j]);     
     2196    }
     2197    for(j=0; j<nRing; j++)
     2198    {
     2199      (*diff_weight1)[j] = floor(0.1*(*diff_weight)[j] + 0.5);
     2200    }
     2201  }
     2202  if(MivAbsMax(diff_weight)>10000)
     2203  {
     2204    for(j=0; j<nRing; j++)
     2205    {
     2206      (*diff_weight1)[j] = (*diff_weight)[j];
     2207    }
     2208    j = 0;
     2209    while(test_w_in_ConeCC(G,diff_weight1))
     2210    {
     2211      (*diff_weight)[j] = (*diff_weight1)[j];
     2212      mpz_set_si(vec[j], (*diff_weight)[j]);
     2213      j = MivAbsMaxArg(diff_weight1);
     2214      (*diff_weight1)[j] = floor(0.1*(*diff_weight1)[j] + 0.5);
     2215    }
     2216    goto SIMPLIFY_GCD;
    21882217  }
    21892218
     
    22242253   mpz_clear(t_null);
    22252254
    2226 
    2227 
    22282255  if(Overflow_Error == FALSE)
    22292256  {
    22302257    Overflow_Error = nError;
    22312258  }
    2232  rComplete(currRing);
    2233   for(kkk=0; kkk<IDELEMS(G);kkk++)
    2234   {
    2235     poly p=G->m[kkk];
     2259  rComplete(currRing);
     2260  for(j=0; j<IDELEMS(G); j++)
     2261  {
     2262    poly p=G->m[j];
    22362263    while(p!=NULL)
    22372264    {
     
    22732300}
    22742301
    2275 /**************************************************************
     2302/********************************************************************
    22762303 * define and execute a new ring which order is (a(vb),a(va),lp,C)  *
    2277  * ************************************************************/
     2304 * ******************************************************************/
    22782305static void VMrHomogeneous(intvec* va, intvec* vb)
    22792306{
     
    44454472    {
    44464473      next_weight2 = MkInterRedNextWeight(next_weight22,target_weight,G);
     4474      if(MivAbsMax(next_weight2)>1147483647)
     4475      {
     4476        for(i=0; i<nV; i++)
     4477        {
     4478          (*next_weight22)[i] = (*next_weight2)[i];
     4479        }
     4480        i = 0;
     4481        while(test_w_in_ConeCC(G,next_weight22))
     4482        {
     4483          (*next_weight2)[i] = (*next_weight22)[i];
     4484          i = MivAbsMaxArg(next_weight22);
     4485          (*next_weight22)[i] = floor(0.1*(*next_weight22)[i] + 0.5);
     4486        }
     4487      }
    44474488      delete next_weight22;
    44484489      break;
     
    45754616    else
    45764617    {
    4577       rChangeCurrRing(VMrDefault(orig_target_weight)); // Aenderung
     4618      rChangeCurrRing(VMrDefault(orig_target_weight));
    45784619    }
    45794620    TargetRing = currRing;
     
    46464687    else
    46474688    {
    4648       rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung
     4689      rChangeCurrRing(VMrDefault(curr_weight));
    46494690    }
    46504691    newRing = currRing;
     
    47554796    else
    47564797    {
    4757       rChangeCurrRing(VMrDefault(orig_target_weight)); // Aenderung
     4798      rChangeCurrRing(VMrDefault(orig_target_weight));
    47584799    }
    47594800    F1 = idrMoveR(G, newRing,currRing);
     
    47864827      else
    47874828      {
    4788         rChangeCurrRing(VMrDefault(orig_target_weight)); // Aenderung
     4829        rChangeCurrRing(VMrDefault(orig_target_weight));
    47894830      }
    47904831    KSTD_Finish:
     
    48844925      tim = clock();
    48854926      /*
    4886         Print("\n// **** Grï¿œbnerwalk took %d steps and ", nwalk);
     4927        Print("\n// **** Groebnerwalk took %d steps and ", nwalk);
    48874928        PrintS("\n// **** call the rec. Pert. Walk to compute a red GB of:");
    48884929        idElements(Gomega, "G_omega");
     
    49144955      oldRing = currRing;
    49154956
    4916       /* create a new ring newRing */
     4957      // create a new ring newRing
    49174958       if (rParameter(currRing) != NULL)
    49184959       {
     
    49214962       else
    49224963       {
    4923          rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung
     4964         rChangeCurrRing(VMrDefault(curr_weight));
    49244965       }
    49254966      newRing = currRing;
     
    49474988      else
    49484989      {
    4949         rChangeCurrRing(VMrDefault(curr_weight));  //Aenderung
     4990        rChangeCurrRing(VMrDefault(curr_weight));
    49504991      }
    49514992      newRing = currRing;
     
    50185059      else
    50195060      {
    5020         rChangeCurrRing(VMrDefault(target_weight)); // Aenderung
     5061        rChangeCurrRing(VMrDefault(target_weight));
    50215062      }
    50225063      F1 = idrMoveR(G, newRing,currRing);
     
    57925833
    57935834  to = clock();
    5794   /* perturbs the original vector */
     5835  // perturbs the original vector
    57955836  if(MivComp(curr_weight, iv_dp) == 1) //rOrdStr(currRing) := "dp"
    57965837  {
     
    58095850      DefRingPar(curr_weight);
    58105851    else
    5811       rChangeCurrRing(VMrDefault(curr_weight)); //Aenderung 1
     5852      rChangeCurrRing(VMrDefault(curr_weight));
    58125853
    58135854    G = idrMoveR(Go, XXRing,currRing);
     
    58245865  ring HelpRing = currRing;
    58255866
    5826   /* perturbs the target weight vector */
     5867  // perturbs the target weight vector
    58275868  if(tp_deg > 1 && tp_deg <= nV)
    58285869  {
     
    58305871      DefRingPar(target_weight);
    58315872    else
    5832       rChangeCurrRing(VMrDefault(target_weight)); // Aenderung 2
     5873      rChangeCurrRing(VMrDefault(target_weight));
    58335874
    58345875    TargetRing = currRing;
     
    58915932      DefRingPar(curr_weight);
    58925933    else
    5893       rChangeCurrRing(VMrDefault(curr_weight)); //Aenderung 3
     5934      rChangeCurrRing(VMrDefault(curr_weight));
    58945935
    58955936    newRing = currRing;
     
    60146055        DefRingPar(orig_target);
    60156056      else
    6016         rChangeCurrRing(VMrDefault(orig_target)); //Aenderung
     6057        rChangeCurrRing(VMrDefault(orig_target));
    60176058
    60186059    TargetRing=currRing;
     
    61926233          DefRingPar(omtmp);
    61936234        else
    6194           rChangeCurrRing(VMrDefault1(omtmp)); //Aenderung3
     6235          rChangeCurrRing(VMrDefault1(omtmp));
    61956236
    61966237        testring = currRing;
     
    62426283      else
    62436284      {
    6244         rChangeCurrRing(VMrDefault1(omtmp)); // Aenderung4
     6285        rChangeCurrRing(VMrDefault1(omtmp));
    62456286      }
    62466287#ifdef TEST_OVERFLOW
     
    62806321        DefRingPar(omtmp);
    62816322      else
    6282         rChangeCurrRing(VMrDefault1(omtmp)); //Aenderung5
     6323        rChangeCurrRing(VMrDefault1(omtmp));
    62836324
    62846325      testring = currRing;
     
    63476388            DefRingPar(Xivinput);
    63486389          else
    6349             rChangeCurrRing(VMrDefault1(Xivinput)); //Aenderung6
     6390            rChangeCurrRing(VMrDefault1(Xivinput));
    63506391
    63516392        testring = currRing;
     
    63946435      DefRingPar(omega);
    63956436    else
    6396       rChangeCurrRing(VMrDefault1(omega)); //Aenderung7
     6437      rChangeCurrRing(VMrDefault1(omega));
    63976438
    63986439    Gomega1 = idrMoveR(Gomega, oRing,currRing);
     
    65176558    /* determine the next border */
    65186559    next_vect = MWalkRandomNextWeight(G, omega,omega2, weight_rad, 1+nlev);
    6519     //next_vect = MkInterRedNextWeight(omega,omega2,G);
     6560    if(isNolVector(next_vect))
     6561    {
     6562      next_vect = MkInterRedNextWeight(omega,omega2,G);
     6563    }
    65206564    xtnw=xtnw+clock()-to;
    65216565#ifdef PRINT_VECTORS
     
    65396583          DefRingPar(omtmp);
    65406584        else
    6541           rChangeCurrRing(VMrDefault1(omtmp)); //Aenderung3
     6585          rChangeCurrRing(VMrDefault1(omtmp));
    65426586
    65436587        testring = currRing;
     
    65896633      else
    65906634      {
    6591         rChangeCurrRing(VMrDefault1(omtmp)); // Aenderung4
     6635        rChangeCurrRing(VMrDefault1(omtmp));
    65926636      }
    65936637#ifdef TEST_OVERFLOW
     
    66276671        DefRingPar(omtmp);
    66286672      else
    6629         rChangeCurrRing(VMrDefault1(omtmp)); //Aenderung5
     6673        rChangeCurrRing(VMrDefault1(omtmp));
    66306674
    66316675      testring = currRing;
     
    66946738            DefRingPar(Xivinput);
    66956739          else
    6696             rChangeCurrRing(VMrDefault1(Xivinput)); //Aenderung6
     6740            rChangeCurrRing(VMrDefault1(Xivinput));
    66976741
    66986742        testring = currRing;
     
    67416785      DefRingPar(omega);
    67426786    else
    6743       rChangeCurrRing(VMrDefault1(omega)); //Aenderung7
     6787      rChangeCurrRing(VMrDefault1(omega));
    67446788
    67456789    Gomega1 = idrMoveR(Gomega, oRing,currRing);
     
    68746918      DefRingPar(ivtarget);
    68756919    else
    6876       rChangeCurrRing(VMrDefault1(ivtarget)); //Aenderung1
     6920      rChangeCurrRing(VMrDefault1(ivtarget));
    68776921
    68786922    I1 = idrMoveR(I, oldRing,currRing);
     
    69036947    DefRingPar(ivstart);
    69046948  else
    6905     rChangeCurrRing(VMrDefault1(ivstart)); //Aenderung2
     6949    rChangeCurrRing(VMrDefault1(ivstart));
    69066950
    69076951  I = idrMoveR(I1,tRing,currRing);
     
    70007044      DefRingPar(ivtarget);
    70017045    else
    7002       rChangeCurrRing(VMrDefault1(ivtarget)); //Aenderung1
     7046      rChangeCurrRing(VMrDefault1(ivtarget));
    70037047
    70047048    I1 = idrMoveR(I, oldRing,currRing);
     
    70297073    DefRingPar(ivstart);
    70307074  else
    7031     rChangeCurrRing(VMrDefault1(ivstart)); //Aenderung2
     7075    rChangeCurrRing(VMrDefault1(ivstart));
    70327076
    70337077  I = idrMoveR(I1,tRing,currRing);
     
    71017145  intvec* hilb_func;
    71027146#endif
    7103   /* to avoid (1,0,...,0) as the target vector */
     7147  // to avoid (1,0,...,0) as the target vector
    71047148  intvec* last_omega = new intvec(nV);
    71057149  for(i=nV-1; i>0; i--)
     
    71167160
    71177161  to=clock();
    7118   /* compute a red. GB w.r.t. the help ring */
     7162  // compute a red. GB w.r.t. the help ring
    71197163  if(MivComp(curr_weight, iv_dp) == 1) //rOrdStr(currRing) = "dp"
    71207164    G = MstdCC(G);
     
    71257169      DefRingPar(curr_weight);
    71267170    else
    7127       rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung 4
     7171      rChangeCurrRing(VMrDefault(curr_weight));
    71287172    G = idrMoveR(G, XXRing,currRing);
    71297173    G = MstdCC(G);
     
    71517195      DefRingPar(curr_weight);
    71527196    else
    7153       rChangeCurrRing(VMrDefault(curr_weight)); //Aenderung 5
     7197      rChangeCurrRing(VMrDefault(curr_weight));
    71547198    to=clock();
    71557199    Gw = idrMoveR(G, exring,currRing);
     
    71867230      DefRingPar(curr_weight);
    71877231    else
    7188       rChangeCurrRing(VMrDefault(curr_weight)); //Aenderung 6
     7232      rChangeCurrRing(VMrDefault(curr_weight));
    71897233
    71907234    newRing = currRing;
     
    72717315          DefRingPar(target_tmp);
    72727316        else
    7273           rChangeCurrRing(VMrDefault(target_tmp)); // Aenderung 8
     7317          rChangeCurrRing(VMrDefault(target_tmp));
    72747318
    72757319      lpRing = currRing;
     
    73317375          DefRingPar(target_tmp);
    73327376        else
    7333           rChangeCurrRing(VMrDefault(target_tmp)); //Aenderung 9
     7377          rChangeCurrRing(VMrDefault(target_tmp));
    73347378
    73357379      lpRing = currRing;
     
    75347578    else
    75357579    {
    7536       rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung 10
     7580      rChangeCurrRing(VMrDefault(curr_weight));
    75377581    }
    75387582    G = idrMoveR(G, XXRing,currRing);
     
    75677611    else
    75687612    {
    7569       rChangeCurrRing(VMrDefault(curr_weight)); //Aenderung 11
     7613      rChangeCurrRing(VMrDefault(curr_weight));
    75707614    }
    75717615    to=clock();
     
    76107654    else
    76117655    {
    7612       rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung 12
     7656      rChangeCurrRing(VMrDefault(curr_weight));
    76137657    }
    76147658    newRing = currRing;
     
    77797823        else
    77807824        {
    7781           rChangeCurrRing(VMrDefault(target_tmp)); // Aenderung 13
     7825          rChangeCurrRing(VMrDefault(target_tmp));
    77827826        }
    77837827      }
     
    78527896        else
    78537897        {
    7854           rChangeCurrRing(VMrDefault(target_tmp)); // Aenderung 14
     7898          rChangeCurrRing(VMrDefault(target_tmp));
    78557899        }
    78567900      }
     
    80958139    else
    80968140    {
    8097       rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung 15
     8141      rChangeCurrRing(VMrDefault(curr_weight));
    80988142    }
    80998143    newRing = currRing;
     
    85178561        else
    85188562        {
    8519           rChangeCurrRing(VMrDefault(cw_tmp)); // Aenderung 16
     8563          rChangeCurrRing(VMrDefault(cw_tmp));
    85208564        }
    85218565        G = idrMoveR(Go, XXRing,currRing);
     
    85918635    else
    85928636    {
    8593       rChangeCurrRing(VMrDefault(curr_weight)); // Aenderung 17
     8637      rChangeCurrRing(VMrDefault(curr_weight));
    85948638    }
    85958639    newRing = currRing;
     
    86538697      else
    86548698      {
    8655         rChangeCurrRing(VMrDefault(target_weight)); // Aenderung 18
     8699        rChangeCurrRing(VMrDefault(target_weight));
    86568700      }
    86578701      F1 = idrMoveR(G, newRing,currRing);
  • Singular/walk.h

    • Property mode changed from 100644 to 100755
  • Tst/Short/bug_tr667.res.gz.uu

    r10b82c r635bdd  
    11begin 640 bug_tr667.res.gz
    2 M'XL(",7_:50``V)U9U]T<C8V-RYR97,`Q55-;YM`$+W[5ZRB'F#9)>PL7ZX%
    3 M4C^DRE+42W)I*R=*;"L!.2;R+M3+K^^P-I`/M>HER0%8S[R9]W;G&<XOOLZ_
    4 M$T)$3L[FG\F)5MK?%#<GL\GY,0,YP>!5L2VTX\XFW9/D.;FI;Z_T+HX3?[O^
    5 M[2M]K8<*F9-A'?KD])3<%]M/2GVYN]X-B<CO"$\>=L7]:KU\QAGG9%=L;\D.
    6 MKXP$S#%,LXK5K&1[IECKLM7#B$YR4JS6UQLR1S`7"36TO`2ZIRV'F&JJ/(R5
    7 M#$)J,*QI=0F>`&H8%P$U/,%0C8GR4!'1<FR=YF13*$W.`%N/NW#F[HB9XM'!
    8 MC'3[5$6[)NJNJC<K<K,F(2/;2I-H\DLL/DX0>H6+K#RL8)'IPTHN,C/!WR/$
    9 M#!"(M<(ME0-2B&D-Y;[UXBA0$XR,56!TA3L;:D5B2D#DBQZ)[<`A,%`!CP)3
    10 MP3$98E4*&FK`"C'5",1*Q)4\A`C;'6#1(HL052%*ADC:@3JJ0S9>9#(,C,2X
    11 MET:6I$1=V/?8MN[IDD46IT%@HBKT1!"#!8>EQ/$DH:[#O4+UD$0!<F"1XB!3
    12 MVZ\&+YI:X59AF":178(W%4&`-/UT1#":40C_:"L<II.PIG&9TZ*SEJQXXBB!
    13 MGL=A/U0;TR&;!@W3-)X<AR[D(\\-032[(VG3<'!I2PL/*[E$CCZVO)2>I$LN
    14 M64LU]I3H/$1U:9=J7HSMHT>J8Y\<_R7?+GY:Y_5VZI^]`9:>`]1R#E&T`2KA
    15 M,`1P_$AZ(,>[8ZE1!73!`15V93;/P:IK+4AVV^J%6P7PK@IZ^N<'\900%2R'
    16 M1CA%BBJY/?0W.I7WE-.["%^21Q>=__BGB5Y;['/3O\>!O=#P-R.]@I__9_]O
    17 >0=L;(WWTJIGZ]EO??<UKY0AW]F'R!W\#-+LA"```
     2M'XL("$J,:U0``V)U9U]T<C8V-RYR97,`Q59;;YLP&'W/K["J/8`Q%'\V$!:!
     3MM(LT18KVTKYL4UJU2=2"TE`%PP*_?A\F7)I=M&EJ^Y#@?#X^Y_B[H%Q<?IQ_
     4M)H3PF"SF[\F9RI6S36[/9I.+XP[$!(/7R2Y1ACF;-$\2Q^2VN+M6>]\/G-WF
     5MNY.K&]6?$#'IU](AY^?D(=F]R_,/]S=[8JB]@Z<8T<_0[)&>TS@X>]PG#^O-
     6MZL2$'Y-]LKLC>_Q$Q&5&Q13+6,%2=F`YJTVV?AS004R2]>9F2^8(MGE`*YI>
     7M`3W0V@:?*II;&$L92%IA6-'L"BP.M&(V=VEE!Q@J<"-M3W@T':BG,=DFN2(+
     8M0.KA6L;<'#`AYA)FI+EXGM0;DM]GQ79-;C=$,K++%/$FW_CR[02AU[B(\G8%
     9MRRAM5V(951/\/4#2'J+&$#&"5#T$?)7CK0<RSL,"TD-M^9Y[%)/+*%`%8`S0
     10MC1SQ0*4R3$?/QH,JU;A3UD!SVN!6D('MN54&:4_.IZ"@`#S!0]1)\23B4EN"
     11MAW0MS%M&'J(R1`F)H@VHD6IW_64DI%L)C%M33XNDZ`MYC[1%)Q<L(W_JNI67
     12M28N[/FBP3`76-)"JD(<<W4/@N:B!AW(;Q%3S%6!YH3:N'<IIX.DE6"%W793I
     13M2LK=>%SL!6!BS%E3X+;"24Z`C>K,GQ;XU]7KN/DIM_@7[O\H>V<`NI[F?4]_
     14MNOPZ;FF.(]V8,18<@[(/RV'2.<YO.Z)(8@2L+$UFU#BE*Y8\F4[NZ_L^9MNJ
     15M098E#E]96F*D-I[?/CAUB"%H6=I@TIHF%IZT!6ITL=65L`1=V8+55"&GP"E&
     16M5+-M4F4G`WTXN`;7(<<W3G?E+KO=LTOTRC*`:LT^BDE')S;T`4PZBK;B^&UH
     17M:70!3;!'R>:8WK=!NZLU2#37ZHQK!_"J#CKYTT0\%40'JYX(JTC1I:V3_D)9
     18M>4T[71?A"!^[Z.++'YOHN<V>-OUK).PG#[]KI&?HY[^Y_TO(=HT!HU>-</0?
     194J>:O4I$;^")],_D!_<@,CGX)````
    1820`
    1921end
  • Tst/Short/bug_tr667.stat

    r10b82c r635bdd  
    1 1 >> tst_memory_0 :: 1416232901:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:524216
    2 1 >> tst_memory_1 :: 1416232901:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:2625536
    3 1 >> tst_memory_2 :: 1416232901:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:2636032
    4 1 >> tst_timer_1 :: 1416232901:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:1154
     11 >> tst_memory_0 :: 1416334410:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:605288
     21 >> tst_memory_1 :: 1416334410:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:2691072
     31 >> tst_memory_2 :: 1416334410:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:2691072
     41 >> tst_timer_1 :: 1416334410:4011, 64 bit:4.0.1:x86_64-Linux:nepomuck:1031
  • Tst/Short/bug_tr667.tst

    r10b82c r635bdd  
    22tst_init();
    33
    4 // minAssChar
     4// minAssChar (tr.667, tr.669)
    55LIB"primdec.lib";
    66ring rng = 0,(y,t,o,u,j,x,s,z),dp;
     
    88list L2 = minAssChar(I);
    99L2;  // size should be 4, not 5
     10minAssChar(L2[2]); //  size is 2, should be 1
     11minAssChar(L2[3]); //  size is 2, should be 1
     12list L1 = minAssGTZ(I);
     13size(L1);
    1014
    1115ring r = (7,vv),(z,t,c,i),dp;
  • kernel/GBEngine/kstdfac.cc

    r10b82c r635bdd  
    322322      PrintS("-");mflush();
    323323    }
     324    int i;
     325    if (strat->redTailChange)
     326    {
     327      for(i=strat->tl;i>=0;i--)
     328      {
     329        strat->initEcart(&strat->T[i]);
     330      }
     331    }
    324332    ideal fac;
    325333    ideal fac_copy;
     
    334342    deleteInS(si,strat);
    335343
    336     int i;
    337344    for(i=IDELEMS(fac)-1;i>=0;i--)
    338345    {
  • kernel/GBEngine/kutil.cc

    r10b82c r635bdd  
    11131113* used in mora case and if pLexOrder & sugar in bba case
    11141114*/
    1115 void initEcartNormal (LObject* h)
     1115void initEcartNormal (TObject* h)
    11161116{
    11171117  h->FDeg = h->pFDeg();
     
    11211121}
    11221122
    1123 void initEcartBBA (LObject* h)
     1123void initEcartBBA (TObject* h)
    11241124{
    11251125  h->FDeg = h->pFDeg();
  • kernel/GBEngine/kutil.h

    r10b82c r635bdd  
    277277  int (*red)(LObject * L,kStrategy strat);
    278278  int (*red2)(LObject * L,kStrategy strat);
    279   void (*initEcart)(LObject * L);
     279  void (*initEcart)(TObject * L);
    280280  int (*posInT)(const TSet T,const int tl,LObject &h);
    281281  int (*posInLSba)(const LSet set, const int length,
     
    507507#endif
    508508
    509 void initEcartNormal (LObject* h);
    510 void initEcartBBA (LObject* h);
     509void initEcartNormal (TObject* h);
     510void initEcartBBA (TObject* h);
    511511void initS (ideal F, ideal Q,kStrategy strat);
    512512void initSL (ideal F, ideal Q,kStrategy strat);
  • kernel/ideals.cc

    r10b82c r635bdd  
    23682368  if ((w !=NULL)&&(*w!=NULL) &&(del>0))
    23692369  {
    2370     intvec *wtmp=new intvec((*w)->length()-del);
     2370    int nl=si_max((*w)->length()-del,1);
     2371    intvec *wtmp=new intvec(nl);
    23712372    for(i=0;i<res->rank;i++) (*wtmp)[i]=(**w)[i];
    23722373    delete *w;
Note: See TracChangeset for help on using the changeset viewer.