Changeset c3005ea in git


Ignore:
Timestamp:
Dec 2, 2010, 4:44:56 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
66bff8383ec423ff4d78015828b80285a4d2888a
Parents:
715f30d21dbf78d93d3b6cd041dee85992b46b61
Message:
code cleanup: pDehomgen, idDehomgen

git-svn-id: file:///usr/local/Singular/svn/trunk@13700 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r715f30 rc3005ea  
    942942
    943943/*2
    944 *dehomogenized the generators of the ideal id1 with the leading
    945 *monomial of p replaced by n
    946 */
    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 /*2
    965944* verschiebt die Indizees der Modulerzeugenden um i
    966945*/
  • kernel/ideals.h

    r715f30 rc3005ea  
    114114int pLowVar (poly p);
    115115  /*-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 leading
    118   monomial of p replaced by n*/
    119116void pShift (poly * p,int i);
    120117  /*- verschiebt die Indizes der Modulerzeugenden um i -*/
  • kernel/polys.cc

    r715f30 rc3005ea  
    432432  }
    433433}
    434 /*2
    435 *replaces the maximal powers of the leading monomial of p2 in p1 by
    436 *the same powers of n, utility for dehomogenization
    437 */
    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 later
    454   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 later
    462       nDelete(&nn);
    463     }
    464   }
    465   omFreeSize((ADDRESS)P,SizeOfSet*sizeof(poly));
    466   return p;
    467 }
    468 
    469434
    470435/*----------utilities for syzygies--------------*/
  • kernel/polys.h

    r715f30 rc3005ea  
    361361poly      pHomogen (poly p, int varnum);
    362362
    363 // replaces the maximal powers of the leading monomial of p2 in p1 by
    364 // the same powers of n, utility for dehomogenization
    365 poly      pDehomogen (poly p1,poly p2,number n);
    366363BOOLEAN   pIsHomogeneous (poly p);
    367364
Note: See TracChangeset for help on using the changeset viewer.