Changeset aad4e14 in git
- Timestamp:
- Nov 11, 2010, 12:18:07 PM (13 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 24fd7045c041f0c1ce23de9358433e0667a8228d
- Parents:
- a80025e8d85c97a2cc2a6b86ef219a392df4f2b5
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/interpolation.cc
ra80025e raad4e14 311 311 temp=(mon_list_entry*)omAlloc0(sizeof(mon_list_entry)); 312 312 (*temp).next=curptr; 313 (*temp).mon=(exponent*)omAlloc 0(sizeof(exponent)*variables);313 (*temp).mon=(exponent*)omAlloc(sizeof(exponent)*variables); 314 314 memcpy(temp->mon,mon,sizeof(exponent)*variables); 315 315 if (prevptr==NULL) return temp; … … 333 333 mono_type m; 334 334 m=(exponent*)omAlloc0(sizeof(exponent)*variables); 335 int i;336 for (i=0;i<variables;i++) m[i]=0;337 335 return m; 338 336 } … … 341 339 { 342 340 int i,j,k; 343 points=(coordinates*)omAlloc 0(sizeof(coordinates)*n_points);341 points=(coordinates*)omAlloc(sizeof(coordinates)*n_points); 344 342 for (i=0;i<n_points;i++) 345 343 { 346 points[i]=(coordinate_products*)omAlloc 0(sizeof(coordinate_products)*variables);344 points[i]=(coordinate_products*)omAlloc(sizeof(coordinate_products)*variables); 347 345 for (j=0;j<variables;j++) points[i][j]=(modp_number*)omAlloc0(sizeof(modp_number)*(max_coord)); 348 346 } 349 347 condition_list=(condition_type*)omAlloc0(sizeof(condition_type)*final_base_dim); 350 348 for (i=0;i<final_base_dim;i++) condition_list[i].mon=(exponent*)omAlloc0(sizeof(exponent)*variables); 351 modp_points=(modp_coordinates*)omAlloc 0(sizeof(modp_coordinates)*n_points);349 modp_points=(modp_coordinates*)omAlloc(sizeof(modp_coordinates)*n_points); 352 350 for (i=0;i<n_points;i++) modp_points[i]=(modp_number*)omAlloc0(sizeof(modp_number)*variables); 353 351 if (!only_modp) … … 356 354 for (i=0;i<n_points;i++) 357 355 { 358 q_points[i]=(mpq_t*)omAlloc 0(sizeof(mpq_t)*variables);356 q_points[i]=(mpq_t*)omAlloc(sizeof(mpq_t)*variables); 359 357 for (j=0;j<variables;j++) mpq_init(q_points[i][j]); 360 358 } … … 362 360 for (i=0;i<n_points;i++) 363 361 { 364 int_points[i]=(mpz_t*)omAlloc 0(sizeof(mpz_t)*variables);362 int_points[i]=(mpz_t*)omAlloc(sizeof(mpz_t)*variables); 365 363 for (j=0;j<variables;j++) mpz_init(int_points[i][j]); 366 364 } 367 365 } 368 coord_exist=(coord_exist_table*)omAlloc 0(sizeof(coord_exist_table)*n_points);366 coord_exist=(coord_exist_table*)omAlloc(sizeof(coord_exist_table)*n_points); 369 367 for (i=0;i<n_points;i++) 370 368 { 371 369 coord_exist[i]=(bool*)omAlloc0(sizeof(bool)*variables); 372 for (j=0;j<variables;j++) coord_exist[i][j]=false; 373 } 374 generic_column_name=(mono_type*)omAlloc0(sizeof(mono_type)*final_base_dim); 370 } 371 generic_column_name=(mono_type*)omAlloc(sizeof(mono_type)*final_base_dim); 375 372 for (i=0;i<final_base_dim;i++) generic_column_name[i]=ZeroMonomial (); 376 373 good_primes=0; … … 379 376 if (!only_modp) 380 377 { 381 polycoef=(mpz_t*)omAlloc 0(sizeof(mpz_t)*(final_base_dim+1));382 polyexp=(mono_type*)omAlloc 0(sizeof(mono_type)*(final_base_dim+1));378 polycoef=(mpz_t*)omAlloc(sizeof(mpz_t)*(final_base_dim+1)); 379 polyexp=(mono_type*)omAlloc(sizeof(mono_type)*(final_base_dim+1)); 383 380 for (i=0;i<=final_base_dim;i++) 384 381 { … … 406 403 my_row=(modp_number*)omAlloc0(sizeof(modp_number)*final_base_dim); 407 404 my_solve_row=(modp_number*)omAlloc0(sizeof(modp_number)*final_base_dim); 408 column_name=(mono_type*)omAlloc 0(sizeof(mono_type)*final_base_dim);405 column_name=(mono_type*)omAlloc(sizeof(mono_type)*final_base_dim); 409 406 for (i=0;i<final_base_dim;i++) column_name[i]=ZeroMonomial (); 410 407 last_solve_column=0; … … 415 412 416 413 // produces table of modp inverts by finding a generator of (Z_myp*,*) 417 gen_table=(modp_number*)omAlloc 0(sizeof(modp_number)*myp);414 gen_table=(modp_number*)omAlloc(sizeof(modp_number)*myp); 418 415 gen_table[1]=1; 419 416 for (pos_gen=2;pos_gen<myp;pos_gen++) … … 537 534 int j,k; 538 535 mono_type mn; 539 mn=(exponent*)omAlloc 0(sizeof(exponent)*variables);536 mn=(exponent*)omAlloc(sizeof(exponent)*variables); 540 537 memcpy(mn,mon,sizeof(exponent)*variables); 541 538 for (k=0;k<variables;k++) … … 562 559 int j,k; 563 560 mono_type mn; 564 mn=(exponent*)omAlloc 0(sizeof(exponent)*variables);561 mn=(exponent*)omAlloc(sizeof(exponent)*variables); 565 562 memcpy(mn,mon,sizeof(exponent)*variables); 566 563 for (k=0;k<variables;k++) … … 992 989 } 993 990 temp=(generator_entry*)omAlloc0(sizeof(generator_entry)); 994 if (prev_ptr==NULL) cur_result->generator=temp; else prev_ptr->next=temp; 991 if (prev_ptr==NULL) cur_result->generator=temp; 992 else prev_ptr->next=temp; 995 993 temp->next=NULL; 996 994 temp->coef=(modp_number*)omAlloc0(sizeof(modp_number)*final_base_dim); … … 1375 1373 if (prev==NULL) gen_list=temp; else prev->next=temp; 1376 1374 temp->next=NULL; 1377 temp->polycoef=(mpz_t*)omAlloc 0(sizeof(mpz_t)*(final_base_dim+1));1378 temp->polyexp=(mono_type*)omAlloc 0(sizeof(mono_type)*(final_base_dim+1));1375 temp->polycoef=(mpz_t*)omAlloc(sizeof(mpz_t)*(final_base_dim+1)); 1376 temp->polyexp=(mono_type*)omAlloc(sizeof(mono_type)*(final_base_dim+1)); 1379 1377 for (i=0;i<=final_base_dim;i++) 1380 1378 { -
Singular/misc_ip.cc
ra80025e raad4e14 381 381 382 382 #ifdef HAVE_FACTORY 383 #define SI_DONT_HAVE_GLOBAL_VARS 383 384 #include <factory/factory.h> 384 385 // libfac:
Note: See TracChangeset
for help on using the changeset viewer.