Changeset 239d73 in git


Ignore:
Timestamp:
Mar 15, 2018, 1:26:07 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
4dda3ed2d0a4ac4c52db5cbb2f1b77b888dc7ef2
Parents:
59b9fdb6e4914ed681cc7907561abf9361bae474
Message:
add p_Vec2Array (julia), opt: p_Vec2polys
Location:
libpolys/polys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.cc

    r59b9fdb r239d73  
    35383538    k=__p_GetComp(h,r);
    35393539    p_SetComp(h,0,r);
    3540     (*p)[k-1]=p_Add_q((*p)[k-1],h,r);
     3540    pNext(h)=(*p)[k-1];(*p)[k-1]=h;
    35413541    pIter(v);
     3542  }
     3543  for(int i=(*len-1);i>=0;i--)
     3544  {
     3545    if ((*p)[i]!=NULL) (*p)[i]=pReverse((*p)[i]);
     3546  }
     3547}
     3548
     3549/// julia: vector to already allocated array (len=p_MaxComp(v,r))
     3550void  p_Vec2Array(poly v, poly *p, int len, const ring r)
     3551{
     3552  poly h;
     3553  int k;
     3554
     3555  while (v!=NULL)
     3556  {
     3557    h=p_Head(v,r);
     3558    k=__p_GetComp(h,r);
     3559    p_SetComp(h,0,r);
     3560    pNext(h)=p[k-1];p[k-1]=h;
     3561    pIter(v);
     3562  }
     3563  for(int i=len-1;i>=0;i--)
     3564  {
     3565    if (p[i]!=NULL) p[i]=pReverse(p[i]);
    35423566  }
    35433567}
  • libpolys/polys/monomials/p_polys.h

    r59b9fdb r239d73  
    9797
    9898void  p_Vec2Polys(poly v, poly**p, int *len, const ring r);
     99
     100/// julia: vector to already allocated array (len=p_MaxComp(v,r))
     101void  p_Vec2Array(poly v, poly *p, int len, const ring r);
    99102
    100103/***************************************************************
  • libpolys/polys/simpleideals.cc

    r59b9fdb r239d73  
    11371137   ideal result=idInit(1,1);
    11381138   omFree((ADDRESS)result->m);
    1139    result->m=NULL; // remove later
    11401139   p_Vec2Polys(vec, &(result->m), &(IDELEMS(result)),R);
    11411140   return result;
Note: See TracChangeset for help on using the changeset viewer.