Changeset 1dc0f49 in git
- Timestamp:
- May 31, 2018, 4:30:44 PM (6 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 7312369f3415a88e192b1196dbe81096e7eb9072
- Parents:
- 1e468c8d0783ef37e36459cb18d23a428c67173c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r1e468c r1dc0f49 1469 1469 static BOOLEAN jjINDEX_V(leftv res, leftv u, leftv v) 1470 1470 { 1471 poly p=(poly)u->CopyD(VECTOR_CMD); 1472 poly r=p; // pointer to the beginning of component i 1473 poly o=NULL; 1471 poly p=(poly)u->Data(); 1474 1472 int i=(int)(long)v->Data(); 1475 while (p!=NULL) 1476 { 1477 if (pGetComp(p)!=i) 1478 { 1479 if (r==p) r=pNext(p); 1480 if (o!=NULL) 1481 { 1482 if (pNext(o)!=NULL) pLmDelete(&pNext(o)); 1483 p=pNext(o); 1484 } 1485 else 1486 pLmDelete(&p); 1487 } 1488 else 1489 { 1490 pSetComp(p, 0); 1491 p_SetmComp(p, currRing); 1492 o=p; 1493 p=pNext(o); 1494 } 1495 } 1496 res->data=(char *)r; 1473 res->data=(char *)p_Vec2Poly(p,i,currRing); 1497 1474 return FALSE; 1498 1475 } -
libpolys/polys/monomials/p_polys.cc
r1e468c r1dc0f49 3547 3547 } 3548 3548 3549 poly p_Vec2Poly(poly v, int k, const ring r) 3550 { 3551 poly h; 3552 poly res=NULL; 3553 3554 while (v!=NULL) 3555 { 3556 if (__p_GetComp(v,r)==k) 3557 { 3558 h=p_Head(v,r); 3559 p_SetComp(h,0,r); 3560 pNext(h)=res;res=h; 3561 } 3562 pIter(v); 3563 } 3564 if (res!=NULL) res=pReverse(res); 3565 return res; 3566 } 3567 3549 3568 /// julia: vector to already allocated array (len=p_MaxComp(v,r)) 3550 3569 void p_Vec2Array(poly v, poly *p, int len, const ring r) -
libpolys/polys/monomials/p_polys.h
r1e468c r1dc0f49 97 97 98 98 void p_Vec2Polys(poly v, poly**p, int *len, const ring r); 99 poly p_Vec2Poly(poly v, int k, const ring r); 99 100 100 101 /// julia: vector to already allocated array (len=p_MaxComp(v,r))
Note: See TracChangeset
for help on using the changeset viewer.