Changeset 85eb7d in git
- Timestamp:
- May 12, 2005, 9:44:10 AM (19 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 6d760524ba873f5c3e70a9354a4a6b6996c0f442
- Parents:
- 513490ba100f81af3b2ca50d41b50c4ad79862f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/tgb.cc
r513490b r85eb7d 5 5 * Computer Algebra System SINGULAR * 6 6 ****************************************/ 7 /* $Id: tgb.cc,v 1.1 8 2005-05-12 07:01:21bricken Exp $ */7 /* $Id: tgb.cc,v 1.19 2005-05-12 07:44:10 bricken Exp $ */ 8 8 /* 9 9 * ABSTRACT: slimgb and F4 implementation … … 1023 1023 c->tmp_spn=(sorted_pair_node**) omrealloc(c->tmp_spn,c->n*sizeof(sorted_pair_node*)); 1024 1024 c->tmp_spn[i]=(sorted_pair_node*) omalloc(sizeof(sorted_pair_node)); 1025 #define ENLARGE(pointer, type) pointer=(type*) omrealloc(pointer, c->n*sizeof(int)) 1025 1026 1026 hp=omrealloc(c->rep, c->n *sizeof(int)); 1027 1027 if (hp!=NULL){ … … 1204 1204 1205 1205 assume(h!=NULL); 1206 #define ENLARGE(pointer, type) pointer=(type*) omrealloc(pointer, c->n*sizeof(type)) 1206 1207 // BOOLEAN corr=lenS_correct(c->strat); 1207 1208 BOOLEAN R_found=FALSE; … … 1214 1215 sorted_pair_node** nodes=(sorted_pair_node**) omalloc(sizeof(sorted_pair_node*)*i); 1215 1216 int spc=0; 1216 c->T_deg=(int*) omrealloc(c->T_deg,c->n*sizeof(int)); 1217 ENLARGE(c->T_deg, int); 1218 ENLARGE(c->tmp_pair_lm,poly); 1219 ENLARGE(c->tmp_spn,sorted_pair_node*); 1220 ENLARGE(c->rep,int); 1221 ENLARGE(c->short_Exps,long); 1222 ENLARGE(c->lengths,int); 1223 ENLARGE(c->states, char*); 1224 ENLARGE(c->gcd_of_terms,poly); 1225 ENLARGE(c->S->m,poly); 1226 if (c->T_deg_full) 1227 ENLARGE(c->T_deg_full,int); 1217 1228 c->T_deg[i]=pTotaldegree(h); 1218 1229 if(c->T_deg_full){ 1219 c->T_deg_full=(int*) omrealloc(c->T_deg_full,c->n*sizeof(int));1220 1230 c->T_deg_full[i]=pTotaldegree_full(h); 1221 1231 } 1222 c->tmp_pair_lm=(poly*) omrealloc(c->tmp_pair_lm,c->n*sizeof(poly)); 1232 1233 1223 1234 c->tmp_pair_lm[i]=pOne_Special(c->r); 1224 c->tmp_spn=(sorted_pair_node**) omrealloc(c->tmp_spn,c->n*sizeof(sorted_pair_node*)); 1235 1236 1225 1237 c->tmp_spn[i]=(sorted_pair_node*) omalloc(sizeof(sorted_pair_node)); 1226 1238 1227 hp=omrealloc(c->rep, c->n *sizeof(int)); 1228 if (hp!=NULL){ 1229 c->rep=(int*) hp; 1230 } else { 1231 exit(1); 1232 } 1233 c->short_Exps=(long *) omrealloc(c->short_Exps ,c->n*sizeof(long)); 1234 1235 hp=omrealloc(c->lengths, c->n *sizeof(int)); 1236 if (hp!=NULL){ 1237 c->lengths=(int*) hp; 1238 } else { 1239 exit(1); 1240 } 1239 1241 1240 c->lengths[i]=pLength(h); 1242 hp=omrealloc(c->states, c->n * sizeof(char*));1243 1241 1244 c->states=(char**) hp;1245 c->gcd_of_terms=(poly*) omrealloc(c->gcd_of_terms, c->n *sizeof(poly));1246 1242 c->gcd_of_terms[i]=gcd_of_terms(h,c->r); 1247 1243 c->rep[i]=i; … … 1250 1246 else 1251 1247 c->states[i]=NULL; 1252 hp=omrealloc(c->S->m,c->n*sizeof(poly)); 1253 if (hp!=NULL){ 1254 c->S->m=(poly*) hp; 1255 } else { 1256 exit(1); 1257 } 1248 1249 1258 1250 c->S->m[i]=h; 1259 1251 c->short_Exps[i]=p_GetShortExpVector(h,c->r); 1252 #undef ENLARGE 1260 1253 for (j=0;j<i;j++){ 1261 1254
Note: See TracChangeset
for help on using the changeset viewer.