=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/kanExport1.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -p -r1.1.1.1 -r1.2 --- OpenXM/src/kan96xx/Kan/kanExport1.c 1999/10/08 02:12:02 1.1.1.1 +++ OpenXM/src/kan96xx/Kan/kanExport1.c 2001/05/04 01:06:24 1.2 @@ -13,8 +13,8 @@ extern int KanGBmessage; /** :kan, :ring */ struct object Kreduction(f,set) -struct object f; -struct object set; + struct object f; + struct object set; { POLY r; struct gradedPolySet *grG; @@ -54,7 +54,7 @@ struct object set; } struct object Kgroebner(ob) -struct object ob; + struct object ob; { int needSyz = 0; int needBack = 0; @@ -112,45 +112,45 @@ struct object ob; for (i=0; isize; }else{ for (j=0; jsize; j++) { - if (ps->del[j] == 0) ++size; + if (ps->del[j] == 0) ++size; } } } @@ -470,8 +470,8 @@ int keepRedundant; ps = gps->polys[i]; for (j=0; jsize; j++) { if (keepRedundant || (ps->del[j] == 0)) { - putoa(ob,k,KpoPOLY(ps->g[j])); - k++; + putoa(ob,k,KpoPOLY(ps->g[j])); + k++; } } } @@ -481,9 +481,9 @@ int keepRedundant; /* serial == -1 : It's not in the marix input. */ struct object syzPolyToArray(size,f,grG) -int size; -POLY f; -struct gradedPolySet *grG; + int size; + POLY f; + struct gradedPolySet *grG; { struct object ob; int i,g0,i0,serial; @@ -510,7 +510,7 @@ struct gradedPolySet *grG; } struct object getBackwardArray(grG) -struct gradedPolySet *grG; + struct gradedPolySet *grG; { /* use serial, del. cf. getBackwardTransformation(). */ int inputSize,outputSize; @@ -533,8 +533,8 @@ struct gradedPolySet *grG; ps = grG->polys[i]; for (j=0; jsize; j++) { if (ps->del[j] == 0) { - putoa(ob,k,syzPolyToArray(inputSize,ps->syz[j]->syz,grG)); - k++; + putoa(ob,k,syzPolyToArray(inputSize,ps->syz[j]->syz,grG)); + k++; } } } @@ -543,7 +543,7 @@ struct gradedPolySet *grG; POLY arrayToPOLY(ob) -struct object ob; + struct object ob; { int size,i; struct object f; @@ -563,15 +563,15 @@ struct object ob; if (ff != ZERO) { tf = ff->m; if (tf->ringp != cr) { - n = tf->ringp->n; - m = tf->ringp->m; - l = tf->ringp->l; - c = tf->ringp->c; - nn = tf->ringp->nn; - mm = tf->ringp->mm; - ll = tf->ringp->ll; - cc = tf->ringp->cc; - cr = tf->ringp; + n = tf->ringp->n; + m = tf->ringp->m; + l = tf->ringp->l; + c = tf->ringp->c; + nn = tf->ringp->nn; + mm = tf->ringp->mm; + ll = tf->ringp->ll; + cc = tf->ringp->cc; + cr = tf->ringp; } if (n-nn >0) ee = cxx(1,n-1,i,tf->ringp); else if (m-mm >0) ee = cxx(1,m-1,i,tf->ringp); @@ -585,7 +585,7 @@ struct object ob; } struct object POLYToArray(ff) -POLY ff; + POLY ff; { static int nn,mm,ll,cc,n,m,l,c; @@ -639,7 +639,7 @@ POLY ff; } static int isThereh(f) -POLY f; + POLY f; { POLY t; if (f == 0) return(0); @@ -652,8 +652,8 @@ POLY f; } struct object homogenizeObject(ob,gradep) -struct object ob; -int *gradep; + struct object ob; + int *gradep; { struct object rob,ob1; int maxg; @@ -690,7 +690,7 @@ int *gradep; ob1 = getoa(ob,i); ob1 = homogenizeObject(ob1,&gr); if (gr > maxg) { - maxg = gr; + maxg = gr; } getoa(rob,i) = ob1; } @@ -699,12 +699,12 @@ int *gradep; rp = oRingp(rob); if (rp == (struct ring *)NULL) rp = CurrentRingp; for (i=0; i gr) { - f = cdd(1,0,maxg-gr-i,rp); /* h^{maxg-gr-i} */ - getoa(rob,i) = KooMult(KpoPOLY(f),getoa(rob,i)); - } + gr = oGrade(getoa(rob,i)); + /**printf("maxg=%d, gr=%d(i=%d) ",maxg,gr,i); fflush(stdout);**/ + if (maxg > gr) { + f = cdd(1,0,maxg-gr-i,rp); /* h^{maxg-gr-i} */ + getoa(rob,i) = KooMult(KpoPOLY(f),getoa(rob,i)); + } } } *gradep = maxg; @@ -717,8 +717,8 @@ int *gradep; } struct object homogenizeObject_vec(ob,gradep) -struct object ob; -int *gradep; + struct object ob; + int *gradep; { struct object rob,ob1; int maxg; @@ -750,7 +750,7 @@ int *gradep; ob1 = homogenizeObject_vec(ob1,&gr); if (i==0) maxg = gr; else { - maxg = (maxg > gr? maxg: gr); + maxg = (maxg > gr? maxg: gr); } putoa(rob,i,ob1); } @@ -764,7 +764,7 @@ int *gradep; } struct ring *oRingp(ob) -struct object ob; + struct object ob; { struct ring *rp,*rptmp; int i,size; @@ -791,7 +791,7 @@ struct object ob; } int oGrade(ob) -struct object ob; + struct object ob; { int i,size; POLY f; @@ -819,7 +819,7 @@ struct object ob; struct object oPrincipalPart(ob) -struct object ob; + struct object ob; { POLY f; struct object rob; @@ -835,8 +835,8 @@ struct object ob; } } struct object oInitW(ob,oWeight) -struct object ob; -struct object oWeight; + struct object ob; + struct object oWeight; { POLY f; struct object rob; @@ -993,7 +993,7 @@ struct object KvectorToSchreyer_es(struct object obarr /* g = es^i g */ g = mpMult_poly(cxx(1,nn,i,rp), g); if (!isOrdered(g)) { - errorKan1("%s\n","KvectorToSchreyer_es(): given polynomial is not ordered properly by the given Schreyer order."); + errorKan1("%s\n","KvectorToSchreyer_es(): given polynomial is not ordered properly by the given Schreyer order."); } f = ppAdd(f,g); }