Changeset e55bdc in git


Ignore:
Timestamp:
Jan 4, 2018, 3:39:06 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
25ea9a7c2c1ac7855e46c5f4b2d4e82c1c271f0d
Parents:
cd41db8bc95c947e9ebfa6c7ca4b3c40724b3dae
Message:
fix: system("hilbroune",I): memory errors
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/combinatorics/hilb.cc

    rcd41db re55bdc  
    130130{
    131131  int  l = lp, x, i, j;
    132   int  *p, *pl;
     132  int  *pl;
     133  int  *p;
    133134  p = pol;
    134135  for (i = Nv; i>0; i--)
     
    264265
    265266//adds the new polynomial at the coresponding position
    266 //and simplifies the ideal
     267//and simplifies the ideal, destroys p
    267268static void SortByDeg_p(ideal I, poly p)
    268269{
     
    279280    if(p_DivisibleBy( I->m[i],p, currRing))
    280281    {
     282      p_Delete(&p,currRing);
    281283      return;
    282284    }
     
    286288    if(p_DivisibleBy(p,I->m[i], currRing))
    287289    {
    288       I->m[i] = NULL;
     290      p_Delete(&I->m[i],currRing);
    289291    }
    290292  }
     
    374376  idSkipZeroes(I);
    375377  res = idInit(1,1);
    376   res->m[0] = poly(0);
    377378  for(i = 0; i<=IDELEMS(I)-1;i++)
    378379  {
    379380    SortByDeg_p(res, I->m[i]);
     381    I->m[i]=NULL; // I->m[i] is now in res
    380382  }
    381383  idSkipZeroes(res);
     
    438440      {
    439441        SortByDeg_p(I,res->m[i]);
     442        res->m[i]=NULL; // is now in I
    440443      }
    441444    }
     
    449452{
    450453  SortByDeg_p(I,p->m[0]);
     454  p->m[0]=NULL; // is now in I
    451455  //idSkipZeroes(I);
    452456}
     
    13201324{
    13211325  intvec *work, *hseries2;
    1322   int i, j, k, s, t, l;
     1326  int i, j, k, t, l;
     1327  int s;
    13231328  if (hseries1 == NULL)
    13241329    return NULL;
     
    13531358void hDegreeSeries(intvec *s1, intvec *s2, int *co, int *mu)
    13541359{
    1355   int m, i, j, k;
     1360  int i, j, k;
     1361  int m;
    13561362  *co = *mu = 0;
    13571363  if ((s1 == NULL) || (s2 == NULL))
Note: See TracChangeset for help on using the changeset viewer.