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

Diff for /OpenXM_contrib2/asir2000/engine/nd.c between version 1.129 and 1.131

version 1.129, 2006/04/17 04:35:20 version 1.131, 2006/06/05 01:01:41
Line 1 
Line 1 
 /* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.128 2005/08/03 06:10:47 noro Exp $ */  /* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.130 2006/05/30 07:35:31 noro Exp $ */
   
 #include "nd.h"  #include "nd.h"
   
   int diag_period = 6;
 int (*ndl_compare_function)(UINT *a1,UINT *a2);  int (*ndl_compare_function)(UINT *a1,UINT *a2);
 int nd_dcomp;  int nd_dcomp;
 NM _nm_free_list;  NM _nm_free_list;
Line 1591  NODE nd_gb(int m,int ishomo,int checkonly)
Line 1592  NODE nd_gb(int m,int ishomo,int checkonly)
         NDV nfv;          NDV nfv;
         Q q,num,den;          Q q,num,den;
         union oNDC dn;          union oNDC dn;
           int diag_count = 0;
   
         g = 0; d = 0;          g = 0; d = 0;
         for ( i = 0; i < nd_psn; i++ ) {          for ( i = 0; i < nd_psn; i++ ) {
Line 1638  again:
Line 1640  again:
                         }                          }
                         nfv = ndtondv(m,nf); nd_free(nf);                          nfv = ndtondv(m,nf); nd_free(nf);
                         nh = ndv_newps(m,nfv,0);                          nh = ndv_newps(m,nfv,0);
                           if ( ishomo && ++diag_count == diag_period ) {
                                   diag_count = 0;
                                   stat = do_diagonalize(sugar,m);
                                   if ( !stat ) {
                                           NEXT(l) = d; d = l;
                                           d = nd_reconstruct(0,d);
                                           goto again;
                                   }
                           }
                         d = update_pairs(d,g,nh);                          d = update_pairs(d,g,nh);
                         g = update_base(g,nh);                          g = update_base(g,nh);
                         FREENDP(l);                          FREENDP(l);
Line 1719  NODE nd_gb_trace(int m,int ishomo)
Line 1730  NODE nd_gb_trace(int m,int ishomo)
         Q q,den,num;          Q q,den,num;
         union oNDC dn;          union oNDC dn;
         struct oEGT eg_monic,egm0,egm1;          struct oEGT eg_monic,egm0,egm1;
           int diag_count = 0;
   
         init_eg(&eg_monic);          init_eg(&eg_monic);
         init_eg(&eg_invdalg);          init_eg(&eg_invdalg);
Line 1733  NODE nd_gb_trace(int m,int ishomo)
Line 1745  NODE nd_gb_trace(int m,int ishomo)
 again:  again:
                 l = nd_minp(d,&d);                  l = nd_minp(d,&d);
                 if ( SG(l) != sugar ) {                  if ( SG(l) != sugar ) {
   #if 1
                         if ( ishomo ) {                          if ( ishomo ) {
                                 stat = do_diagonalize_trace(sugar,m);                                  stat = do_diagonalize_trace(sugar,m);
                                   diag_count = 0;
                                 if ( !stat ) {                                  if ( !stat ) {
                                         NEXT(l) = d; d = l;                                          NEXT(l) = d; d = l;
                                         d = nd_reconstruct(1,d);                                          d = nd_reconstruct(1,d);
                                         goto again;                                          goto again;
                                 }                                  }
                         }                          }
   #endif
                         sugar = SG(l);                          sugar = SG(l);
                         if ( DP_Print ) fprintf(asir_out,"%d",sugar);                          if ( DP_Print ) fprintf(asir_out,"%d",sugar);
                 }                  }
Line 1789  again:
Line 1804  again:
                                         nd_removecont(m,nf); nfv = ndtondv(m,nf); nd_free(nf);                                          nd_removecont(m,nf); nfv = ndtondv(m,nf); nd_free(nf);
                                 }                                  }
                                 nh = ndv_newps(0,nfv,nfqv);                                  nh = ndv_newps(0,nfv,nfqv);
                                   if ( ishomo && ++diag_count == diag_period ) {
                                           diag_count = 0;
                                           stat = do_diagonalize_trace(sugar,m);
                                           if ( !stat ) {
                                                   NEXT(l) = d; d = l;
                                                   d = nd_reconstruct(1,d);
                                                   goto again;
                                           }
                                   }
                                 d = update_pairs(d,g,nh);                                  d = update_pairs(d,g,nh);
                                 g = update_base(g,nh);                                  g = update_base(g,nh);
                         } else {                          } else {

Legend:
Removed from v.1.129  
changed lines
  Added in v.1.131

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