Changeset b0a811 in git


Ignore:
Timestamp:
Jan 9, 2013, 4:12:24 PM (10 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
ae78cf6564485cf2bbbd730e599efd2c029214e3
Parents:
c81bf79ced86ab51e160b984ca42699ac44228a0
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2013-01-09 16:12:24+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-02-19 20:27:28+01:00
Message:
chg: incorporate some suggestions by Hans

Conflicts:
	kernel/ideals.cc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/MinorInterface.cc

    rc81bf7 rb0a811  
    539539    else
    540540    { /* k == 0, i.e., all minors are requested */
    541       long minorCount = 1;
    542       for (int i = rowCount - minorSize + 1; i <= rowCount; i++)
    543         minorCount = minorCount * i;
    544       for (int i = 2; i <= minorSize; i++) minorCount = minorCount / i;
    545       for (int i = columnCount - minorSize + 1; i <= columnCount; i++)
    546         minorCount = minorCount * i;
    547       for (int i = 2; i <= minorSize; i++) minorCount = minorCount / i;
    548       /* now: minorCount =   (rowCount over minorSize)
    549                            * (columnCount over minorSize) */
     541      int minorCount = binom(rowCount, minorSize);
     542      minorCount *= binom(columnCount, minorSize);
    550543      if      ((minorSize >= 3) && (vars <= 4)
    551544               && (minorCount >= 100))                           c = true;
  • kernel/ideals.cc

    rc81bf7 rb0a811  
    1212#include <omalloc/omalloc.h>
    1313#include <misc/auxiliary.h>
    14 
    1514
    1615#ifndef NDEBUG
     
    25762575static int tCompare(const poly a, const poly b)
    25772576{
    2578   if (b == NULL)
    2579   {
    2580     if (a == NULL) return(0);
    2581 
    2582     return(1);
    2583   }
    2584 
     2577  if (b == NULL) return(a != NULL);
    25852578  if (a == NULL) return(-1);
    25862579
     
    26482641  for (int j = 1; j < idsize; j++)
    26492642  {
    2650     if (pEqualPolys(id_sort[i].p, id_sort[j].p))
     2643    if (id_sort[i].p != NULL && pEqualPolys(id_sort[i].p, id_sort[j].p))
    26512644    {
    26522645      index_i = id_sort[i].index;
     
    26612654        i = j;
    26622655      }
    2663       if (id->m[index] != NULL) {
    2664         pDelete(&id->m[index]);
    2665       }
     2656      pDelete(&id->m[index]);
    26662657    }
    26672658    else
     
    26722663  omFreeSize((ADDRESS)(id_sort), idsize*sizeof(poly_sort));
    26732664}
    2674 
Note: See TracChangeset for help on using the changeset viewer.