[BACK]Return to kanExport1.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/kanExport1.c between version 1.18 and 1.20

version 1.18, 2005/06/16 05:07:23 version 1.20, 2005/06/16 08:40:04
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.17 2005/06/09 04:09:22 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.19 2005/06/16 06:54:55 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 88  struct object Kgroebner(ob)
Line 88  struct object Kgroebner(ob)
   int sdflag = 0;    int sdflag = 0;
   int forceReduction = 0;    int forceReduction = 0;
   int reduceOnly = 0;    int reduceOnly = 0;
     int gbCheck = 0;  /* see @s/2005/06/16-note.pdf */
   
   int ob1Size, ob2Size, noZeroEntry;    int ob1Size, ob2Size, noZeroEntry;
   int *ob1ToOb2;    int *ob1ToOb2;
Line 121  struct object Kgroebner(ob)
Line 122  struct object Kgroebner(ob)
     if (ob2.tag != Sarray) {      if (ob2.tag != Sarray) {
       errorKan1("%s\n","Kgroebner(): The options must be given by an array.");        errorKan1("%s\n","Kgroebner(): The options must be given by an array.");
     }      }
       /* Note: If you add a new option, change /configureGroebnerOption, too */
     for (i=0; i<getoaSize(ob2); i++) {      for (i=0; i<getoaSize(ob2); i++) {
       ob2c = getoa(ob2,i);        ob2c = getoa(ob2,i);
       if (ob2c.tag == Sdollar) {        if (ob2c.tag == Sdollar) {
Line 135  struct object Kgroebner(ob)
Line 137  struct object Kgroebner(ob)
           forceReduction = 1;            forceReduction = 1;
         }else if (strcmp(ob2c.lc.str,"reduceOnly")==0) {          }else if (strcmp(ob2c.lc.str,"reduceOnly")==0) {
           reduceOnly = 1;            reduceOnly = 1;
           }else if (strcmp(ob2c.lc.str,"gbCheck")==0) {
             gbCheck = 1;
         }else if (strcmp(ob2c.lc.str,"countDown")==0) {          }else if (strcmp(ob2c.lc.str,"countDown")==0) {
           countDown = 1; cdflag = 1;            countDown = 1; cdflag = 1;
           if (needSyz) {            if (needSyz) {
Line 256  struct object Kgroebner(ob)
Line 260  struct object Kgroebner(ob)
   }    }
   
   a = arrayToArrayOfPOLY(ob2);    a = arrayToArrayOfPOLY(ob2);
   grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction,reduceOnly);    grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction,reduceOnly,gbCheck);
   
   if (strcmp(F_groebner,"gm") == 0 && (needBack || needSyz)) {    if (strcmp(F_groebner,"gm") == 0 && (needBack || needSyz)) {
     warningKan("The options needBack and needSyz are ignored.");      warningKan("The options needBack and needSyz are ignored.");
Line 301  struct object Kgroebner(ob)
Line 305  struct object Kgroebner(ob)
   }    }
   
   /* To handle zero entries in the input. */    /* To handle zero entries in the input. */
     rob=KsetAttribute(rob,KpoString("gb"),KpoInteger(grG->gb));
     putoa(rob,0,KsetAttribute(getoa(rob,0),KpoString("gb"),KpoInteger(grG->gb)));
   if (noZeroEntry) {    if (noZeroEntry) {
     return(rob);      return(rob);
   }    }
Line 318  struct object Kgroebner(ob)
Line 324  struct object Kgroebner(ob)
     rob2 = newObjectArray(2);      rob2 = newObjectArray(2);
     putoa(rob2,0,getoa(rob,0));      putoa(rob2,0,getoa(rob,0));
     putoa(rob2,1,newB);      putoa(rob2,1,newB);
       rob2=KsetAttribute(rob2,KpoString("gb"),KpoInteger(grG->gb));
     return(rob2);      return(rob2);
     break;      break;
   case 3:    case 3:
Line 338  struct object Kgroebner(ob)
Line 345  struct object Kgroebner(ob)
     putoa(rob2,0,getoa(rob,0));      putoa(rob2,0,getoa(rob,0));
     putoa(rob2,1,newB);      putoa(rob2,1,newB);
     putoa(rob2,2,newC);      putoa(rob2,2,newC);
       rob2=KsetAttribute(rob2,KpoString("gb"),KpoInteger(grG->gb));
     return(rob2);      return(rob2);
     break;      break;
   default:    default:

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.20

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>