Changeset 301c033 in git
- Timestamp:
- Jul 21, 2010, 4:10:14 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 198c60532f02886e728a0b264975f50487915682
- Parents:
- 19191129ddddff4c6aac6c8ee9304d5336e4acbf
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ring.cc
r1919112 r301c033 129 129 } 130 130 131 ring rDefault(int ch, int N, char **n )131 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1) 132 132 { 133 133 ring r=(ring) omAlloc0Bin(sip_sring_bin); … … 143 143 } 144 144 /*weights: entries for 2 blocks: NULL*/ 145 r->wvhdl = (int **)omAlloc0(2 * sizeof(int_ptr)); 146 /*order: lp,0*/ 147 r->order = (int *) omAlloc(2* sizeof(int *)); 148 r->block0 = (int *)omAlloc0(2 * sizeof(int *)); 149 r->block1 = (int *)omAlloc0(2 * sizeof(int *)); 150 /* ringorder dp for the first block: var 1..N */ 151 r->order[0] = ringorder_lp; 152 r->block0[0] = 1; 153 r->block1[0] = N; 154 /* the last block: everything is 0 */ 155 r->order[1] = 0; 145 r->wvhdl = (int **)omAlloc0((ord_size+1) * sizeof(int_ptr)); 146 r->order = ord; 147 r->block0 = block0; 148 r->block1 = block1; 156 149 /*polynomial ring*/ 157 150 r->OrdSgn = 1; … … 160 153 rComplete(r); 161 154 return r; 155 } 156 157 ring rDefault(int ch, int N, char **n) 158 { 159 /*order: lp,0*/ 160 int *order = (int *) omAlloc(2* sizeof(int)); 161 int *block0 = (int *)omAlloc0(2 * sizeof(int)); 162 int *block1 = (int *)omAlloc0(2 * sizeof(int)); 163 /* ringorder dp for the first block: var 1..N */ 164 order[0] = ringorder_lp; 165 block0[0] = 1; 166 block1[0] = N; 167 /* the last block: everything is 0 */ 168 order[1] = 0; 169 170 return rDefault(ch,N,n,2,order,block0,block1); 162 171 } 163 172 -
kernel/ring.h
r1919112 r301c033 64 64 idhdl rDefault(const char *s); 65 65 ring rDefault(int ch, int N, char **n); 66 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1); 67 66 68 #define rIsRingVar(A) r_IsRingVar(A,currRing) 67 69 int r_IsRingVar(const char *n, ring r);
Note: See TracChangeset
for help on using the changeset viewer.