=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/kanExport1.c,v retrieving revision 1.13 retrieving revision 1.17 diff -u -p -r1.13 -r1.17 --- OpenXM/src/kan96xx/Kan/kanExport1.c 2004/07/31 02:23:02 1.13 +++ OpenXM/src/kan96xx/Kan/kanExport1.c 2005/06/09 04:09:22 1.17 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.12 2004/07/30 11:21:55 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.16 2004/09/05 07:42:43 takayama Exp $ */ #include #include "datatype.h" #include "stackm.h" @@ -85,6 +85,7 @@ struct object Kgroebner(ob) extern int StopDegree; int sdflag = 0; int forceReduction = 0; + int reduceOnly = 0; int ob1Size, ob2Size, noZeroEntry; int *ob1ToOb2; @@ -130,6 +131,8 @@ struct object Kgroebner(ob) needSyz = needBack = 1; }else if (strcmp(ob2c.lc.str,"forceReduction")==0) { forceReduction = 1; + }else if (strcmp(ob2c.lc.str,"reduceOnly")==0) { + reduceOnly = 1; }else if (strcmp(ob2c.lc.str,"countDown")==0) { countDown = 1; cdflag = 1; if (needSyz) { @@ -251,7 +254,7 @@ struct object Kgroebner(ob) } a = arrayToArrayOfPOLY(ob2); - grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction); + grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction,reduceOnly); if (strcmp(F_groebner,"gm") == 0 && (needBack || needSyz)) { warningKan("The options needBack and needSyz are ignored."); @@ -997,6 +1000,7 @@ struct object oInitW(ob,oWeight) if (oWeight.tag != Sarray) { errorKan1("%s\n","oInitW(): the second argument must be array."); } + oWeight = Kto_int32(oWeight); n = getoaSize(oWeight); if (n == 0) { m = getoaSize(ob); @@ -1151,6 +1155,7 @@ struct object KordWsAll(ob,oWeight) if (oWeight.tag != Sarray) { errorKan1("%s\n","ordWsAll(): the second argument must be array."); } + oWeight = Kto_int32(oWeight); n = getoaSize(oWeight); if (n == 0) { m = getoaSize(ob); @@ -1403,7 +1408,7 @@ struct object KgetExponents(struct object obPoly,struc } /* type == 0 x,y,Dx,Dy (no commutative, no vector) - type == 1 x,y,h,Dx,Dy,H (commutative & no vector) + type == 1 x,y,Dx,Dy,h,H (commutative & no vector) type == 2 x,y,Dx,Dy,h (commutative & no vector) */ if (f ISZERO) { @@ -1442,7 +1447,11 @@ struct object KgetExponents(struct object obPoly,struc }else{ errorKan1("%s\n","KgetExponent, unknown type."); } - hsize = size/2; + if (type == 1 || type == 2) { + hsize = (size-cc)/2; + }else{ + hsize = size/2; + } if (f ISZERO) { tob = newObjectArray(size); for (i=0; i=0; i--) { + putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); + r++; putoa(tob,hsize+r,KpoInteger(tf->e[i].x)); - putoa(tob,r,KpoInteger(tf->e[i].D)); r++; } }else if (type == 2) {