Changeset 1c4e9a in git
 Timestamp:
 Jul 19, 2011, 5:36:57 PM (12 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 a2174ab573b7b58a5ee6a6c293035fc8ecbd45ab
 Parents:
 1f637e0cf55bac728426f222f498b81de378e159
 gitauthor:
 mlee <martinlee84@web.de>20110719 17:36:57+02:00
 gitcommitter:
 Mohamed Barakat <mohamed.barakat@rwthaachen.de>20111109 12:52:40+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/fast_mult.cc
r1f637e r1c4e9a 3 3 ****************************************/ 4 4 /* $Id$ */ 5 #include <kernel/mod2.h>5 #include "mod2.h" 6 6 #include <polys/monomials/ring.h> 7 7 #include <kernel/fast_mult.h> … … 438 438 439 439 y = p_GetCoeff(p,r); 440 x = n_Mult(y,pGetCoeff(q),r );441 n_Delete(&y,r );440 x = n_Mult(y,pGetCoeff(q),r>cf); 441 n_Delete(&y,r>cf); 442 442 p_SetCoeff0(p,x,r); 443 443 //for (i=(currRing>N); i!=0; i) … … 458 458 poly res = p_Init(r,lm_bin); 459 459 460 x = n_Mult(p_GetCoeff(p,r),p_GetCoeff(q,r),r );460 x = n_Mult(p_GetCoeff(p,r),p_GetCoeff(q,r),r>cf); 461 461 p_SetCoeff0(res,x,r); 462 462 p_ExpVectorSum(res,p, q,r); … … 467 467 int i; 468 468 469 if(!n_IsOne(p_GetCoeff(p,r),r ))469 if(!n_IsOne(p_GetCoeff(p,r),r>cf)) 470 470 { 471 471 number x, y; 472 472 y = p_GetCoeff(p,r); 473 n_Power(y,exp,&x,r );474 n_Delete(&y,r );473 n_Power(y,exp,&x,r>cf); 474 n_Delete(&y,r>cf); 475 475 p_SetCoeff0(p,x,r); 476 476 } … … 535 535 if(i==0) 536 536 { 537 new_coef=n_Copy(coef,r );537 new_coef=n_Copy(coef,r>cf); 538 538 } 539 539 else 540 540 { 541 541 number old=new_coef; 542 number old_rest=n_Init(nsum(i1),r );543 new_coef=n_Mult(new_coef,old_rest,r );544 n_Delete(&old_rest,r );545 n_Delete(&old,r );546 number i_number=n_Init(i,r );542 number old_rest=n_Init(nsum(i1),r>cf); 543 new_coef=n_Mult(new_coef,old_rest,r>cf); 544 n_Delete(&old_rest,r>cf); 545 n_Delete(&old,r>cf); 546 number i_number=n_Init(i,r>cf); 547 547 old=new_coef; 548 new_coef=n_IntDiv(new_coef,i_number,r );549 n_Delete(&old,r );550 n_Delete(&i_number,r );548 new_coef=n_IntDiv(new_coef,i_number,r>cf); 549 n_Delete(&old,r>cf); 550 n_Delete(&i_number,r>cf); 551 551 } 552 552 //new_coef is … … 562 562 zw_l=zw_real; 563 563 } 564 //n_Delete(& new_coef,r );565 } 566 n_Delete(&new_coef,r );564 //n_Delete(& new_coef,r>cf); 565 } 566 n_Delete(&new_coef,r>cf); 567 567 if (pos==f_len2) 568 568 { … … 576 576 i=nsum; 577 577 exp[pos]=i; 578 number new_coef=n Copy(coef);//n_IntDiv(coef,facult[i],r); //really consumed???????578 number new_coef=n_Copy(coef,r>cf);//n_IntDiv(coef,facult[i],r); //really consumed??????? 579 579 buildTermAndAdd(n,facult,f_terms,exp,f_len,erg_bucket,r, new_coef,zw, tmp,term_pot); 580 580 // n_Delete(& new_coef,r); … … 594 594 // number null_number=n_Init(0,r); 595 595 number* facult=(number*) omAlloc((n+1)*sizeof(number)); 596 facult[0]=n_Init(1,r );596 facult[0]=n_Init(1,r>cf); 597 597 int i; 598 598 for(i=1;i<=n;i++) 599 599 { 600 number this_n=n_Init(i,r );601 facult[i]=n_Mult(this_n,facult[i1],r );602 n_Delete(&this_n,r );600 number this_n=n_Init(i,r>cf); 601 facult[i]=n_Mult(this_n,facult[i1],r>cf); 602 n_Delete(&this_n,r>cf); 603 603 } 604 604 … … 631 631 poly zw=NULL; 632 632 poly tmp=p_Init(r); 633 number one=n_Init(1,r );633 number one=n_Init(1,r>cf); 634 634 MC_iterate(f,n,r,f_len,&facult[0], &exp[0], &f_terms[0],erg_bucket,0,0,one/*facult[n]*/,zw,tmp, term_potences); 635 635 636 636 637 n_Delete(&one,r );637 n_Delete(&one,r>cf); 638 638 639 639 … … 644 644 for(i=0;i<=n;i++) 645 645 { 646 n_Delete(&facult[i],r );646 n_Delete(&facult[i],r>cf); 647 647 } 648 648 int i2;
Note: See TracChangeset
for help on using the changeset viewer.