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

Diff for /OpenXM/src/kan96xx/Kan/ecart.c between version 1.9 and 1.11

version 1.9, 2003/08/20 01:39:17 version 1.11, 2003/08/21 02:30:23
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/ecart.c,v 1.8 2003/08/19 08:02:09 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/ecart.c,v 1.10 2003/08/20 05:18:35 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "extern2.h"  #include "extern2.h"
Line 42  extern int TraceLift;
Line 42  extern int TraceLift;
 struct ring *TraceLift_ringmod;  struct ring *TraceLift_ringmod;
 extern DoCancel;  extern DoCancel;
 int DebugReductionEcart = 0;  int DebugReductionEcart = 0;
   extern DebugContentReduction;
   
 /* This is used for goHomogenization */  /* This is used for goHomogenization */
 extern int DegreeShifto_size;  extern int DegreeShifto_size;
Line 422  static POLY reduction_ecart1(r,gset,needSyz,syzp)
Line 423  static POLY reduction_ecart1(r,gset,needSyz,syzp)
   
   r = goHomogenize11(r,DegreeShifto_vec,DegreeShifto_size,-1,1);    r = goHomogenize11(r,DegreeShifto_vec,DegreeShifto_size,-1,1);
   /* 1 means homogenize only s */    /* 1 means homogenize only s */
     if (DoCancel && (r != POLYNULL)) shouldReduceContent(r,1);
   
   if (DebugReductionEcart&1) printf("=======================================\n");    if (DebugReductionEcart&1) printf("=======================================\n");
   do {    do {
Line 443  static POLY reduction_ecart1(r,gset,needSyz,syzp)
Line 445  static POLY reduction_ecart1(r,gset,needSyz,syzp)
       }        }
       if (ell > 0) r = mpMult(cxx(1,0,ell,rp),r); /* r = s^ell r */        if (ell > 0) r = mpMult(cxx(1,0,ell,rp),r); /* r = s^ell r */
       r = (*reduction1)(r,pp,needSyz,&cc,&cg);        r = (*reduction1)(r,pp,needSyz,&cc,&cg);
   
         if (DoCancel && (r != POLYNULL)) { /* BUG: syzygy should be corrected. */
           if (shouldReduceContent(r,0)) {
             r = reduceContentOfPoly(r,&cont);
             shouldReduceContent(r,1);
             if (DebugReductionEcart || DebugReductionRed || DebugContentReduction) printf("CONT=%s ",coeffToString(cont));
           }
         }
   
       if (needSyz) {        if (needSyz) {
         if (ells.first) {          if (ells.first) {
           cf = ppMult(cc,cf);            cf = ppMult(cc,cf);
Line 470  static POLY reduction_ecart1(r,gset,needSyz,syzp)
Line 481  static POLY reduction_ecart1(r,gset,needSyz,syzp)
   
   r = goDeHomogenizeS(r);    r = goDeHomogenizeS(r);
   if (DoCancel && (r != POLYNULL)) { /* BUG: syzygy should be corrected. */    if (DoCancel && (r != POLYNULL)) { /* BUG: syzygy should be corrected. */
         if (r->m->ringp->p == 0) {      if (r->m->ringp->p == 0) {
           if (coeffSizeMin(r) >= DoCancel) {            r = reduceContentOfPoly(r,&cont);
                 r = reduceContentOfPoly(r,&cont);            if (DebugReductionEcart || DebugReductionRed || DebugContentReduction) printf("cont=%s ",coeffToString(cont));
         if (DebugReductionEcart || DebugReductionRed) printf("cont=%d ",coeffToString(cont));      }
           }  
         }  
   }    }
   
   return(r);    return(r);
Line 625  static POLY reduction_ecart1_mod(r,gset)
Line 634  static POLY reduction_ecart1_mod(r,gset)
   
   return(r);    return(r);
 }  }
   

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

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