Changeset 1c4e9a in git


Ignore:
Timestamp:
Jul 19, 2011, 5:36:57 PM (13 years ago)
Author:
mlee <martinlee84@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
a2174ab573b7b58a5ee6a6c293035fc8ecbd45ab
Parents:
1f637e0cf55bac728426f222f498b81de378e159
git-author:
mlee <martinlee84@web.de>2011-07-19 17:36:57+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:52:40+01:00
Message:
put r->cf at appropiate places
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/fast_mult.cc

    r1f637e r1c4e9a  
    33****************************************/
    44/* $Id$ */
    5 #include <kernel/mod2.h>
     5#include "mod2.h"
    66#include <polys/monomials/ring.h>
    77#include <kernel/fast_mult.h>
     
    438438
    439439  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);
    442442  p_SetCoeff0(p,x,r);
    443443  //for (i=(currRing->N); i!=0; i--)
     
    458458  poly res = p_Init(r,lm_bin);
    459459
    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);
    461461  p_SetCoeff0(res,x,r);
    462462  p_ExpVectorSum(res,p, q,r);
     
    467467  int i;
    468468
    469   if(!n_IsOne(p_GetCoeff(p,r),r))
     469  if(!n_IsOne(p_GetCoeff(p,r),r->cf))
    470470  {
    471471    number x, y;
    472472    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);
    475475    p_SetCoeff0(p,x,r);
    476476  }
     
    535535      if(i==0)
    536536      {
    537         new_coef=n_Copy(coef,r);
     537        new_coef=n_Copy(coef,r->cf);
    538538      }
    539539      else
    540540      {
    541541        number old=new_coef;
    542         number old_rest=n_Init(n-sum-(i-1),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(n-sum-(i-1),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);
    547547        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);
    551551      }
    552552      //new_coef is
     
    562562        zw_l=zw_real;
    563563      }
    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);
    567567    if (pos==f_len-2)
    568568    {
     
    576576    i=n-sum;
    577577    exp[pos]=i;
    578     number new_coef=nCopy(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???????
    579579    buildTermAndAdd(n,facult,f_terms,exp,f_len,erg_bucket,r, new_coef,zw, tmp,term_pot);
    580580    // n_Delete(& new_coef,r);
     
    594594  //  number null_number=n_Init(0,r);
    595595  number* facult=(number*) omAlloc((n+1)*sizeof(number));
    596   facult[0]=n_Init(1,r);
     596  facult[0]=n_Init(1,r->cf);
    597597  int i;
    598598  for(i=1;i<=n;i++)
    599599  {
    600     number this_n=n_Init(i,r);
    601     facult[i]=n_Mult(this_n,facult[i-1],r);
    602     n_Delete(&this_n,r);
     600    number this_n=n_Init(i,r->cf);
     601    facult[i]=n_Mult(this_n,facult[i-1],r->cf);
     602    n_Delete(&this_n,r->cf);
    603603  }
    604604
     
    631631  poly zw=NULL;
    632632  poly tmp=p_Init(r);
    633   number one=n_Init(1,r);
     633  number one=n_Init(1,r->cf);
    634634  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);
    635635
    636636
    637   n_Delete(&one,r);
     637  n_Delete(&one,r->cf);
    638638
    639639
     
    644644  for(i=0;i<=n;i++)
    645645  {
    646     n_Delete(&facult[i],r);
     646    n_Delete(&facult[i],r->cf);
    647647  }
    648648  int i2;
Note: See TracChangeset for help on using the changeset viewer.