=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/poly3.c,v retrieving revision 1.6 retrieving revision 1.9 diff -u -p -r1.6 -r1.9 --- OpenXM/src/kan96xx/Kan/poly3.c 2002/09/08 10:49:50 1.6 +++ OpenXM/src/kan96xx/Kan/poly3.c 2020/10/06 11:33:46 1.9 @@ -1,8 +1,10 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/poly3.c,v 1.5 2002/02/09 06:21:02 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/poly3.c,v 1.8 2004/06/12 07:29:46 takayama Exp $ */ #include #include "datatype.h" #include "extern2.h" +void outputTable(void); + int Homogenize = 1; #define I(i,j) (i*N0+j) @@ -31,8 +33,8 @@ void initT(void) { DList = (int *)sGC_malloc(sizeof(int)*Lsize*N0); MList = (int *)sGC_malloc(sizeof(int)*Lsize*N0); */ - DList = (int *)malloc(sizeof(int)*Lsize*N0); - MList = (int *)malloc(sizeof(int)*Lsize*N0); + DList = (int *)sGC_malloc(sizeof(int)*Lsize*N0); + MList = (int *)sGC_malloc(sizeof(int)*Lsize*N0); RList = (POLY *)sGC_malloc(sizeof(POLY)*Lsize); RListRoot = (POLY *)sGC_malloc(sizeof(POLY)*Lsize); @@ -117,8 +119,13 @@ void monomialMult_diff(e,f) tmp.e[i] = f->m->e[i]; } if ((!weightedHomogenization) && Homogenize) { - tmp.e[0].D += EList[k]; /* homogenization. - e[0].D will be added later. */ + if (Homogenize == 3) { + tmp.e[0].D += EList[k]/2; /* Double homogenization. */ + tmp.e[0].x += EList[k]/2; /* Dx x = x Dx + h H */ + }else{ + tmp.e[0].D += EList[k]; /* homogenization. + e[0].D will be added later. */ + } }else if (weightedHomogenization && Homogenize) { tmp.e[0].D += EList[k]/2 ; /* homogenization. Weight is (1,0) (special). */ @@ -257,7 +264,7 @@ POLY mpMult_difference_org(POLY f,POLY g) return(r); } -outputTable() { +void outputTable() { int i,j; printf("Maxv = %d Plist=%d\n",Maxv,Plist); for (i=0; i