Changeset 3a8a0d9 in git
- Timestamp:
- Mar 5, 2012, 8:43:21 PM (11 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 5dc5557cfa7b8e12dc6662eaa5592e5d1137f0c1
- Parents:
- 9b1590d4c8e281abd068646c9d699284f9ea053a
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-05 20:43:21+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-05 20:46:40+01:00
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipshell.cc
r9b1590 r3a8a0d9 2278 2278 && ((R->order[jj]== ringorder_a) 2279 2279 || (R->order[jj]== ringorder_aa) 2280 || (R->order[jj]== ringorder_am) 2280 2281 || (R->order[jj]== ringorder_c) 2281 2282 || (R->order[jj]== ringorder_C) -
libpolys/polys/monomials/p_polys.cc
r9b1590 r3a8a0d9 122 122 case ro_am: 123 123 { 124 ord=POLY_NEGWEIGHT_OFFSET; 125 int a,e; 126 a=o->data.am.start; 127 e=o->data.am.end; 128 int *w=o->data.am.weights; 124 ord = POLY_NEGWEIGHT_OFFSET; 125 const short a=o->data.am.start; 126 const short e=o->data.am.end; 127 const int * w=o->data.am.weights; 129 128 #if 1 130 for( int i=a;i<=e;i++) ord+=p_GetExp(p,i,r)*w[i-a];131 int c=p_GetComp(p,r);129 for(short i=a; i<=e; i++, w++) 130 ord += ((*w) * p_GetExp(p,i,r)); 132 131 #else 133 132 long ai; 134 133 int ei,wi; 135 for( int i=a;i<=e;i++)134 for(short i=a;i<=e;i++) 136 135 { 137 136 ei=p_GetExp(p,i,r); … … 139 138 ai=ei*wi; 140 139 if (ai/ei!=wi) pSetm_error=TRUE; 141 ord +=ai;140 ord += ai; 142 141 if (ord<ai) pSetm_error=TRUE; 143 142 } 144 143 #endif 145 if ((c>0)&&(c<=o->data.am.len_gen)) 144 const int c = p_GetComp(p,r); 145 146 const short len_gen= o->data.am.len_gen; 147 148 if ((c > 0) && (c <= len_gen)) 146 149 { 147 ord+=w[c-(e-a)+2]; 150 const int * const wm = o->data.am.weights_m; 151 assume( wm[0] == len_gen ); 152 ord += wm[c]; 148 153 } 149 p->exp[o->data.am.place]=ord; 154 155 p->exp[o->data.am.place] = ord; 150 156 break; 151 157 } -
libpolys/polys/monomials/ring.cc
r9b1590 r3a8a0d9 357 357 if (r->order[l]!=ringorder_M) break; 358 358 } 359 if (r->order[l]==ringorder_am) /*j==0*/359 if (r->order[l]==ringorder_am) 360 360 { 361 361 int m=r->wvhdl[l][i]; … … 2207 2207 long *o, sro_ord &ord_struct, int *weights) 2208 2208 { 2209 assume(weights != NULL); 2210 2209 2211 // weighted degree (aligned) of variables v_start..v_end, ordsgn 1 2210 while((start<end) && (weights[0]==0)) { start++; weights++; }2211 while((start<end) && (weights[end-start]==0)) { end--; }2212 // while((start<end) && (weights[0]==0)) { start++; weights++; } 2213 // while((start<end) && (weights[end-start]==0)) { end--; } 2212 2214 rO_Align(place,bitplace); 2213 2215 ord_struct.ord_typ=ro_am; … … 2215 2217 ord_struct.data.am.end=end; 2216 2218 ord_struct.data.am.place=place; 2219 ord_struct.data.am.weights=weights; 2220 ord_struct.data.am.weights_m = weights + (end-start+1); 2217 2221 ord_struct.data.am.len_gen=weights[end-start+1]; 2218 ord_struct.data.am.weights=weights;2222 assume( ord_struct.data.am.weights_m[0] == ord_struct.data.am.len_gen ); 2219 2223 o[place]=1; 2220 2224 place++; -
libpolys/polys/monomials/ring.h
r9b1590 r3a8a0d9 93 93 short end; 94 94 short len_gen; // i>len_gen: weight(gen(i)):=0 95 int *weights; // pointers into wvhdl field of length (end-start+1) + len_gen 96 // contents w_1,... w_n, len, mod_w_1, .. mod_w_len, 0 95 int *weights; // pointers into wvhdl field of length (end-start+1) + len_gen + 1 96 // contents w_{start},... w_{end}, len, mod_w_1, .. mod_w_len, 0 97 int *weights_m; // pointers into wvhdl field of length len_gen + 1 98 // len_gen, mod_w_1, .. mod_w_len, 0 99 97 100 }; 98 101 typedef struct sro_am sro_am;
Note: See TracChangeset
for help on using the changeset viewer.