Changeset e5dc2c2 in git


Ignore:
Timestamp:
Jul 27, 2007, 4:09:52 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
a7f91065c48e086c635273382cebfdf90d711129
Parents:
c2d114a721855bee723ab1a7863cd9572537c545
Message:
*hannes: check wp/Wp weights


git-svn-id: file:///usr/local/Singular/svn/trunk@10274 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    rc2d114 re5dc2c2  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipshell.cc,v 1.166 2007-07-27 13:37:21 Singular Exp $ */
     4/* $Id: ipshell.cc,v 1.167 2007-07-27 14:09:52 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    19171917           for (i=0; i<iv->length();i++)
    19181918           {
    1919              if (((R->order[j]==ringorder_wp)
    1920                || (R->order[j]==ringorder_Wp))
    1921              && ((*iv)[i]<=0))
    1922              {
    1923                Werror("weight (var %d) for wp/Wp has to be positive, but is %d",i+1,(*iv)[i]);
    1924                goto rCompose_err;
    1925              }
    19261919             R->wvhdl[j][i]=(*iv)[i];
    19271920           }
     
    42414234            {
    42424235              R->wvhdl[n][i-2] = (*iv)[i];
    4243               if (((R->order[n]==ringorder_wp)
    4244                 || (R->order[n]==ringorder_Wp))
    4245               && ((*iv)[i]<=0))
    4246               {
    4247                 Werror("weight (var %d) for wp/Wp has to be positive, but is %d ",i+1,(*iv)[i]);
    4248                 return TRUE;
    4249               }
    42504236            }
    42514237            R->block0[n] = last+1;
  • kernel/ring.cc

    rc2d114 re5dc2c2  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.66 2007-07-23 18:00:29 Singular Exp $ */
     4/* $Id: ring.cc,v 1.67 2007-07-27 14:09:52 Singular Exp $ */
    55
    66/*
     
    28472847
    28482848  // will be used for ordsgn:
    2849   long *tmp_ordsgn=(long *)omAlloc0(2*(n+r->N)*sizeof(long));
     2849  long *tmp_ordsgn=(long *)omAlloc0(3*(n+r->N)*sizeof(long));
    28502850  // will be used for VarOffset:
    28512851  int *v=(int *)omAlloc((r->N+1)*sizeof(int));
     
    28542854    v[i]=-1;
    28552855  }
    2856   sro_ord *tmp_typ=(sro_ord *)omAlloc0(2*(n+r->N)*sizeof(sro_ord));
     2856  sro_ord *tmp_typ=(sro_ord *)omAlloc0(3*(n+r->N)*sizeof(sro_ord));
    28572857  int typ_i=0;
    28582858  int prev_ordsgn=0;
     
    29922992                   tmp_typ[typ_i], r->wvhdl[i]);
    29932993        typ_i++;
     2994        { // check for weights <=0
     2995          int jj;
     2996          BOOLEAN have_bad_weights=FALSE;
     2997          for(jj=r->block1[i]-r->block0[i];jj>=0; jj--)
     2998          {
     2999            if (r->wvhdl[i][jj]<=0) have_bad_weights=TRUE;
     3000          }
     3001          if (have_bad_weights)
     3002          {
     3003             rO_TDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,
     3004                                     tmp_typ[typ_i]);
     3005             typ_i++;
     3006          }
     3007        }
    29943008        if (r->block1[i]!=r->block0[i])
    29953009        {
     
    30033017                   tmp_typ[typ_i], r->wvhdl[i]);
    30043018        typ_i++;
     3019        { // check for weights <=0
     3020          int j;
     3021          BOOLEAN have_bad_weights=FALSE;
     3022          for(j=r->block1[i]-r->block0[i];j>=0; j--)
     3023          {
     3024            if (r->wvhdl[i][j]<=0) have_bad_weights=TRUE;
     3025          }
     3026          if (have_bad_weights)
     3027          {
     3028             rO_TDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,
     3029                                     tmp_typ[typ_i]);
     3030             typ_i++;
     3031          }
     3032        }
    30053033        if (r->block1[i]!=r->block0[i])
    30063034        {
     
    31103138  }
    31113139
    3112   omFreeSize((ADDRESS)tmp_ordsgn,(2*(n+r->N)*sizeof(long)));
     3140  omFreeSize((ADDRESS)tmp_ordsgn,(3*(n+r->N)*sizeof(long)));
    31133141
    31143142  // ----------------------------
     
    31223150    memcpy(r->typ,tmp_typ,typ_i*sizeof(sro_ord));
    31233151  }
    3124   omFreeSize((ADDRESS)tmp_typ,(2*(n+r->N)*sizeof(sro_ord)));
     3152  omFreeSize((ADDRESS)tmp_typ,(3*(n+r->N)*sizeof(sro_ord)));
    31253153
    31263154  // ----------------------------
Note: See TracChangeset for help on using the changeset viewer.