Changeset e5dc2c2 in git
- Timestamp:
- Jul 27, 2007, 4:09:52 PM (17 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- a7f91065c48e086c635273382cebfdf90d711129
- Parents:
- c2d114a721855bee723ab1a7863cd9572537c545
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
rc2d114 re5dc2c2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipshell.cc,v 1.16 6 2007-07-27 13:37:21Singular Exp $ */4 /* $Id: ipshell.cc,v 1.167 2007-07-27 14:09:52 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: … … 1917 1917 for (i=0; i<iv->length();i++) 1918 1918 { 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 }1926 1919 R->wvhdl[j][i]=(*iv)[i]; 1927 1920 } … … 4241 4234 { 4242 4235 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 }4250 4236 } 4251 4237 R->block0[n] = last+1; -
kernel/ring.cc
rc2d114 re5dc2c2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.6 6 2007-07-23 18:00:29Singular Exp $ */4 /* $Id: ring.cc,v 1.67 2007-07-27 14:09:52 Singular Exp $ */ 5 5 6 6 /* … … 2847 2847 2848 2848 // 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)); 2850 2850 // will be used for VarOffset: 2851 2851 int *v=(int *)omAlloc((r->N+1)*sizeof(int)); … … 2854 2854 v[i]=-1; 2855 2855 } 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)); 2857 2857 int typ_i=0; 2858 2858 int prev_ordsgn=0; … … 2992 2992 tmp_typ[typ_i], r->wvhdl[i]); 2993 2993 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 } 2994 3008 if (r->block1[i]!=r->block0[i]) 2995 3009 { … … 3003 3017 tmp_typ[typ_i], r->wvhdl[i]); 3004 3018 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 } 3005 3033 if (r->block1[i]!=r->block0[i]) 3006 3034 { … … 3110 3138 } 3111 3139 3112 omFreeSize((ADDRESS)tmp_ordsgn,( 2*(n+r->N)*sizeof(long)));3140 omFreeSize((ADDRESS)tmp_ordsgn,(3*(n+r->N)*sizeof(long))); 3113 3141 3114 3142 // ---------------------------- … … 3122 3150 memcpy(r->typ,tmp_typ,typ_i*sizeof(sro_ord)); 3123 3151 } 3124 omFreeSize((ADDRESS)tmp_typ,( 2*(n+r->N)*sizeof(sro_ord)));3152 omFreeSize((ADDRESS)tmp_typ,(3*(n+r->N)*sizeof(sro_ord))); 3125 3153 3126 3154 // ----------------------------
Note: See TracChangeset
for help on using the changeset viewer.