Changeset dd693a in git


Ignore:
Timestamp:
Apr 20, 2011, 5:53:00 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
13366d2378411800abb16557d58c0777dd923739
Parents:
9765f3b4f33f8fae7a5ca4ed7831d01d8ca37a06
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-04-20 17:53:00+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:21+01:00
Message:
fix p_TakeOutComp
add p_Vec2Polys
Location:
libpolys/polys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/kbuckets.cc

    r9765f3 rdd693a  
    10121012// Hmm... for now I'm too lazy to implement those independent of currRing
    10131013// But better declare it extern than including polys.h
    1014 extern void pTakeOutComp(poly *p, long comp, poly *q, int *lq);
     1014extern void p_TakeOutComp(poly *p, long comp, poly *q, int *lq, const ring r);
    10151015
    10161016void kBucketTakeOutComp(kBucket_pt bucket,
     
    10281028    {
    10291029      MULTIPLY_BUCKET(bucket,i);
    1030       pTakeOutComp(&(bucket->buckets[i]), comp, &q, &lq);
     1030      p_TakeOutComp(&(bucket->buckets[i]), comp, &q, &lq, bucket->bucket_ring);
    10311031      if (q != NULL)
    10321032      {
     
    10401040  kBucketAdjustBucketsUsed(bucket);
    10411041#else
    1042   pTakeOutComp(&(bucket->p), comp, &p, &lp);
     1042  p_TakeOutComp(&(bucket->p), comp, &p, &lp,bucket->bucket_ring);
    10431043  (bucket->l) -= lp;
    10441044#endif
  • libpolys/polys/monomials/p_polys.cc

    r9765f3 rdd693a  
    28482848  }
    28492849}
     2850
     2851/*2
     2852* convert a vector to a set of polys,
     2853* allocates the polyset, (entries 0..(*len)-1)
     2854* the vector will not be changed
     2855*/
     2856void  p_Vec2Polys(poly v, poly* *p, int *len, const ring r)
     2857{
     2858  poly h;
     2859  int k;
     2860
     2861  *len=p_MaxComp(v,r);
     2862  if (*len==0) *len=1;
     2863  *p=(poly*)omAlloc0((*len)*sizeof(poly));
     2864  while (v!=NULL)
     2865  {
     2866    h=p_Head(v,r);
     2867    k=p_GetComp(h,r);
     2868    p_SetComp(h,0,r);
     2869    (*p)[k-1]=p_Add_q((*p)[k-1],h,r);
     2870    pIter(v);
     2871  }
     2872}
     2873
    28502874/* -------------------------------------------------------- */
    28512875/*2
  • libpolys/polys/monomials/p_polys.h

    r9765f3 rdd693a  
    108108poly      p_NSet(number n, const ring r);
    109109
    110 /// TODO: the following procedure got lost... and is not defined anywhere!
    111110void  p_Vec2Polys(poly v, poly**p, int *len, const ring r);
    112111
Note: See TracChangeset for help on using the changeset viewer.