[BACK]Return to gr.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/gr.c between version 1.41 and 1.42

version 1.41, 2002/01/28 00:54:41 version 1.42, 2002/07/17 09:45:49
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/gr.c,v 1.40 2001/11/19 01:40:04 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/gr.c,v 1.41 2002/01/28 00:54:41 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 108  static int Denominator = 1;
Line 108  static int Denominator = 1;
 static int Top = 0;  static int Top = 0;
 static int Reverse = 0;  static int Reverse = 0;
 static int Max_mag = 0;  static int Max_mag = 0;
   static int Max_coef = 0;
 static char *Demand = 0;  static char *Demand = 0;
 static int PtozpRA = 0;  static int PtozpRA = 0;
   
Line 338  void dp_gr_main(LIST f,LIST v,Num homo,int modular,int
Line 339  void dp_gr_main(LIST f,LIST v,Num homo,int modular,int
         }          }
         print_stat();          print_stat();
         if ( ShowMag )          if ( ShowMag )
                 fprintf(asir_out,"\nMax_mag=%d\n",Max_mag);                  fprintf(asir_out,"\nMax_mag=%d, Max_coef=%d\n",Max_mag, Max_coef);
 }  }
   
 void dp_gr_mod_main(LIST f,LIST v,Num homo,int m,struct order_spec *ord,LIST *rp)  void dp_gr_mod_main(LIST f,LIST v,Num homo,int m,struct order_spec *ord,LIST *rp)
Line 1537  void minsugar(DP_pairs d,DP_pairs *dm,DP_pairs *dr)
Line 1538  void minsugar(DP_pairs d,DP_pairs *dm,DP_pairs *dr)
   
 NODE gb(NODE f,int m,NODE subst)  NODE gb(NODE f,int m,NODE subst)
 {  {
         int i,nh,prev,mag;          int i,nh,prev,mag,mag0,magt;
         NODE r,g,gall;          NODE r,g,gall;
         DP_pairs d;          DP_pairs d;
         DP_pairs l;          DP_pairs l;
Line 1551  NODE gb(NODE f,int m,NODE subst)
Line 1552  NODE gb(NODE f,int m,NODE subst)
         static prev_sugar = -1;          static prev_sugar = -1;
   
         Max_mag = 0;          Max_mag = 0;
           Max_coef = 0;
         prev = 1;          prev = 1;
         doing_f4 = 0;          doing_f4 = 0;
         if ( m ) {          if ( m ) {
Line 1625  skip_nf:
Line 1627  skip_nf:
                         g = updbase(g,nh);                          g = updbase(g,nh);
                         gall = append_one(gall,nh);                          gall = append_one(gall,nh);
                         if ( !dp_fcoeffs && ShowMag ) {                          if ( !dp_fcoeffs && ShowMag ) {
                                 for ( mag = 0, mp = BDY(h); mp; mp = NEXT(mp) )                                  for ( mag = 0, mag0 = 0, mp = BDY(h); mp; mp = NEXT(mp) ) {
                                         mag += p_mag((P)mp->c);                                          magt = p_mag((P)mp->c);
                                           mag0 = MAX(mag0,magt);
                                           mag += magt;
                                   }
                                   Max_coef = MAX(Max_coef,mag0);
                                 Max_mag = MAX(Max_mag,mag);                                  Max_mag = MAX(Max_mag,mag);
                         }                          }
                         if ( DP_Print ) {                          if ( DP_Print ) {
Line 1638  skip_nf:
Line 1644  skip_nf:
                                         l->dp1,l->dp2,length(g),length(gall),DPPlength(d),                                          l->dp1,l->dp2,length(g),length(gall),DPPlength(d),
                                         pss[nh]);                                          pss[nh]);
                                 if ( ShowMag )                                  if ( ShowMag )
                                         fprintf(asir_out,",mag=%d",mag);                                          fprintf(asir_out,",mag=(%d,%d)",mag,mag0);
                                 fprintf(asir_out,"\n"); fflush(asir_out);                                  fprintf(asir_out,"\n"); fflush(asir_out);
                         } else if ( DP_PrintShort ) {                          } else if ( DP_PrintShort ) {
                                 fprintf(asir_out,"+"); fflush(asir_out);                                  fprintf(asir_out,"+"); fflush(asir_out);

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

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