Changeset c3005ea in git
- Timestamp:
- Dec 2, 2010, 4:44:56 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 66bff8383ec423ff4d78015828b80285a4d2888a
- Parents:
- 715f30d21dbf78d93d3b6cd041dee85992b46b61
- Location:
- kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
r715f30 rc3005ea 942 942 943 943 /*2 944 *dehomogenized the generators of the ideal id1 with the leading945 *monomial of p replaced by n946 */947 ideal idDehomogen (ideal id1,poly p,number n)948 {949 int i;950 ideal result;951 952 if (idIs0(id1))953 {954 return idInit(1,id1->rank);955 }956 result=idInit(IDELEMS(id1),id1->rank);957 for (i=0; i<IDELEMS(id1); i++)958 {959 result->m[i] = pDehomogen(id1->m[i],p,n);960 }961 return result;962 }963 964 /*2965 944 * verschiebt die Indizees der Modulerzeugenden um i 966 945 */ -
kernel/ideals.h
r715f30 rc3005ea 114 114 int pLowVar (poly p); 115 115 /*-the minimal index of used variables - 1-*/ 116 ideal idDehomogen (ideal id1,poly p,number n);117 /*dehomogenized the generators of the ideal id1 with the leading118 monomial of p replaced by n*/119 116 void pShift (poly * p,int i); 120 117 /*- verschiebt die Indizes der Modulerzeugenden um i -*/ -
kernel/polys.cc
r715f30 rc3005ea 432 432 } 433 433 } 434 /*2435 *replaces the maximal powers of the leading monomial of p2 in p1 by436 *the same powers of n, utility for dehomogenization437 */438 poly pDehomogen (poly p1,poly p2,number n)439 {440 polyset P;441 int SizeOfSet=5;442 int i;443 poly p;444 number nn;445 446 P = (polyset)omAlloc0(5*sizeof(poly));447 //for (i=0; i<5; i++)448 //{449 // P[i] = NULL;450 //}451 pCancelPolyByMonom(p1,p2,&P,&SizeOfSet);452 p = P[0];453 //P[0] = NULL ;// for safety, may be removed later454 for (i=1; i<SizeOfSet; i++)455 {456 if (P[i] != NULL)457 {458 nPower(n,i,&nn);459 pMult_nn(P[i],nn);460 p = pAdd(p,P[i]);461 //P[i] =NULL; // for safety, may be removed later462 nDelete(&nn);463 }464 }465 omFreeSize((ADDRESS)P,SizeOfSet*sizeof(poly));466 return p;467 }468 469 434 470 435 /*----------utilities for syzygies--------------*/ -
kernel/polys.h
r715f30 rc3005ea 361 361 poly pHomogen (poly p, int varnum); 362 362 363 // replaces the maximal powers of the leading monomial of p2 in p1 by364 // the same powers of n, utility for dehomogenization365 poly pDehomogen (poly p1,poly p2,number n);366 363 BOOLEAN pIsHomogeneous (poly p); 367 364
Note: See TracChangeset
for help on using the changeset viewer.