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

Diff for /OpenXM/src/kan96xx/Kan/gb.c between version 1.8 and 1.9

version 1.8, 2003/08/19 08:02:09 version 1.9, 2005/06/09 04:09:22
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/gb.c,v 1.7 2003/07/30 09:00:52 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/gb.c,v 1.8 2003/08/19 08:02:09 takayama Exp $ */
 /*  untabify on May 4, 2001 */  /*  untabify on May 4, 2001 */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
Line 162  struct gradedPairs *updatePairs(grD,gt,gtGrade,t,grG)
Line 162  struct gradedPairs *updatePairs(grD,gt,gtGrade,t,grG)
   return(grD);    return(grD);
 }  }
   
 struct gradedPolySet *groebner_gen(f,needBack,needSyz,grP,countDown,forceReduction)  struct gradedPolySet *groebner_gen(f,needBack,needSyz,grP,countDown,forceReduction,reduceOnly)
      struct arrayOfPOLY *f;       struct arrayOfPOLY *f;
      int needBack;       int needBack;
      int needSyz;       int needSyz;
      struct pair **grP;  /* if (needSyz), it is set. */       struct pair **grP;  /* if (needSyz), it is set. */
      int countDown;       int countDown;
      int forceReduction;       int forceReduction;
        int reduceOnly;
 {  {
   int r;    int r;
   struct gradedPolySet *g;    struct gradedPolySet *g;
Line 197  struct gradedPolySet *groebner_gen(f,needBack,needSyz,
Line 198  struct gradedPolySet *groebner_gen(f,needBack,needSyz,
   int first;    int first;
   int statisticsPL, statisticsCount;    int statisticsPL, statisticsCount;
   
   
   if (Statistics) {    if (Statistics) {
     for (i=0; i<DMAX; i++) MaxLength[i] = SpNumber[i] = 0;      for (i=0; i<DMAX; i++) MaxLength[i] = SpNumber[i] = 0;
   }    }
Line 269  struct gradedPolySet *groebner_gen(f,needBack,needSyz,
Line 271  struct gradedPolySet *groebner_gen(f,needBack,needSyz,
     gj = g->polys[jg]->g[ji];      gj = g->polys[jg]->g[ji];
   
     Spairs++;      Spairs++;
     h = (*sp)(gi,gj);          if (reduceOnly && (!needSyz) && (!needBack)) h = spZero(); /* rd = 0 */
           else h = (*sp)(gi,gj);
     rd = ppAddv(ppMult(h.a,gi),ppMult(h.b,gj));      rd = ppAddv(ppMult(h.a,gi),ppMult(h.b,gj));
   
     if (Statistics) {      if (Statistics) {
Line 409  struct gradedPolySet *groebner_gen(f,needBack,needSyz,
Line 412  struct gradedPolySet *groebner_gen(f,needBack,needSyz,
     printf("\n");      printf("\n");
   }    }
   
   if (AutoReduce) {    if (AutoReduce || reduceOnly) {
     toReducedBasis(g,needBack,needSyz);      toReducedBasis(g,needBack,needSyz);
   }    }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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