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

Diff for /OpenXM_contrib2/asir2018/engine/nd.c between version 1.52 and 1.53

version 1.52, 2021/03/09 08:48:50 version 1.53, 2021/03/12 01:18:33
Line 1 
Line 1 
 /* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.51 2021/03/09 07:07:02 noro Exp $ */  /* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.52 2021/03/09 08:48:50 noro Exp $ */
   
 #include "nd.h"  #include "nd.h"
   
Line 2754  int nd_nf_s(int mod,ND d,ND g,NDV *ps,int full,ND *nf)
Line 2754  int nd_nf_s(int mod,ND d,ND g,NDV *ps,int full,ND *nf)
 void _copydl(int n,DL d1,DL d2);  void _copydl(int n,DL d1,DL d2);
 void _subfromdl(int n,DL d1,DL d2);  void _subfromdl(int n,DL d1,DL d2);
 extern int (*cmpdl)(int n,DL d1,DL d2);  extern int (*cmpdl)(int n,DL d1,DL d2);
   int _dl_redble_ext(DL,DL,DL,int);
   
   int primitive_irred(ND p,SIG sig)
   {
     static int wpd=0,dlen=0;
     static DL dquo,squo;
     static UINT *quo;
     int i;
   
     if ( dlen < nd_nvar ) {
       NEWDL(dquo,nd_nvar);
       NEWDL(squo,nd_nvar);
       dlen = nd_nvar;
     }
     if ( wpd != nd_wpd ) {
       wpd = nd_wpd;
       quo = (UINT *)MALLOC(wpd*sizeof(UINT));
     }
     for ( i = 0; i < nd_psn; i++ ) {
       if ( sig->pos == nd_psh[i]->sig->pos &&
         _dl_redble_ext(DL(nd_psh[i]->sig),DL(sig),squo,nd_nvar) )
         if ( ndl_reducible(HDL(p),DL(nd_psh[i])) ) {
           if ( DP_Print ) fprintf(asir_out,"D");
           ndl_sub(HDL(p),DL(nd_psh[i]),quo);
           _ndltodl(quo,dquo);
           if ( _eqdl(nd_nvar,squo,dquo) )
             return 0;
         }
     }
     return 1;
   }
   
 NODE insert_sig(NODE l,SIG s)  NODE insert_sig(NODE l,SIG s)
 {  {
   int pos;    int pos;
Line 2807  ND_pairs remove_spair_s(ND_pairs d,SIG sig)
Line 2838  ND_pairs remove_spair_s(ND_pairs d,SIG sig)
   return (ND_pairs)root.next;    return (ND_pairs)root.next;
 }  }
   
 int _dl_redble_ext(DL,DL,DL,int);  
   
 int small_lcm(ND_pairs l)  int small_lcm(ND_pairs l)
 {  {
   SIG sig;    SIG sig;
Line 3050  init_eg(&eg_hpdata);
Line 3079  init_eg(&eg_hpdata);
 init_eg(&eg_sbabuch);  init_eg(&eg_sbabuch);
 get_eg(&eg3);  get_eg(&eg3);
   while ( 1 ) {    while ( 1 ) {
     if ( DP_Print && !nd_hpdata && dlen%100 == 0 ) fprintf(asir_out,"(%d)",dlen);      if ( DP_Print && !nd_hpdata && dlen%1000 == 0 ) fprintf(asir_out,"(%d)",dlen);
 again :  again :
 get_eg(&eg1);  get_eg(&eg1);
     ind = nd_minsig(d);      ind = nd_minsig(d);
Line 3063  get_eg(&eg1);
Line 3092  get_eg(&eg1);
 get_eg(&eg2); add_eg(&eg_smallest,&eg1,&eg2);  get_eg(&eg2); add_eg(&eg_smallest,&eg1,&eg2);
     if ( l1 == 0 ) {      if ( l1 == 0 ) {
       d[ind] = d[ind]->next; dlen--;        d[ind] = d[ind]->next; dlen--;
       if ( DP_Print && !nd_hpdata ) fprintf(asir_out,"M");  //      if ( DP_Print && !nd_hpdata ) fprintf(asir_out,"M");
       Nnominimal++;        Nnominimal++;
       continue;        continue;
     }      }
Line 3120  get_eg(&eg2); 
Line 3149  get_eg(&eg2); 
       get_eg(&eg2); add_eg(&eg_removecont,&eg1,&eg2);        get_eg(&eg2); add_eg(&eg_removecont,&eg1,&eg2);
       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);
   
       get_eg(&eg1);        get_eg(&eg1);
       dlen += update_pairs_array_s(d,nh,syzlist);        dlen += update_pairs_array_s(d,nh,syzlist);
       get_eg(&eg2); add_eg(&eg_updatepairs,&eg1,&eg2);        get_eg(&eg2); add_eg(&eg_updatepairs,&eg1,&eg2);
Line 3131  get_eg(&eg2); 
Line 3160  get_eg(&eg2); 
         get_eg(&eg2); add_eg(&eg_hpdata,&eg1,&eg2);          get_eg(&eg2); add_eg(&eg_hpdata,&eg1,&eg2);
         if ( !compp(CO,final_hpdata.hn,current_hpdata.hn) ) {          if ( !compp(CO,final_hpdata.hn,current_hpdata.hn) ) {
           if ( DP_Print ) { printf("\nWe found a gb.\n"); }            if ( DP_Print ) { printf("\nWe found a gb.\n"); }
           break;              break;
         }          }
       }        }
    } else {     } else {

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

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