[BACK]Return to new_pd.rr CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / testing / noro

Diff for /OpenXM/src/asir-contrib/testing/noro/Attic/new_pd.rr between version 1.1 and 1.3

version 1.1, 2011/01/16 08:46:10 version 1.3, 2011/01/19 04:52:03
Line 6  static GBCheck,F4,EProcs,Procs,SatHomo,GBRat$
Line 6  static GBCheck,F4,EProcs,Procs,SatHomo,GBRat$
 localf get_lc,tomonic$  localf get_lc,tomonic$
 localf para_exec,nd_gr_rat,competitive_exec,call_func$  localf para_exec,nd_gr_rat,competitive_exec,call_func$
 localf call_ideal_list_intersection$  localf call_ideal_list_intersection$
   localf call_colon,call_prime_dec$
 localf first_second$  localf first_second$
 localf third$  localf third$
 localf locsat,iso_comp_para,extract_qj,colon_prime_dec,extract_comp$  localf locsat,iso_comp_para,extract_qj,colon_prime_dec,extract_comp$
 localf colon_prime_dec1$  
 localf separator$  localf separator$
 localf member,mingen,compute_gbsyz,redcoef,recompute_trace3,dtop,topnum$  localf member,mingen,compute_gbsyz,redcoef,recompute_trace3,dtop,topnum$
 localf ideal_colon1$  localf ideal_colon1$
Line 284  T0 = time();
Line 284  T0 = time();
                 if ( First ) {                  if ( First ) {
                         PtR = prime_dec(G,V|indep=1,lexdec=Lexdec,mod=Mod,radical=1);                          PtR = prime_dec(G,V|indep=1,lexdec=Lexdec,mod=Mod,radical=1);
                         Pt = PtR[0]; IntPt = PtR[1]; Rad = IntPt;                          Pt = PtR[0]; IntPt = PtR[1]; Rad = IntPt;
                           if ( gen_gb_comp(G,Rad,Mod) ) {
                                   /* Gt is radical and Gt = cap Pt */
                                   for ( T = Pt, Qt = []; T != []; T = cdr(T) )
                                           Qt = cons([car(T)[0],car(T)[0],car(T)[1]],Qt);
                                   return [reverse(Qt)];
                           }
                 } else                  } else
                         Pt = colon_prime_dec(G,IntQ,V|lexdec=Lexdec,mod=Mod,para=Para);                          Pt = colon_prime_dec(G,IntQ,V|lexdec=Lexdec,mod=Mod,para=Para);
 ACCUM_TIME(Tpd,RTpd)  ACCUM_TIME(Tpd,RTpd)
Line 359  def colon_prime_dec(G,IntQ,V) {
Line 365  def colon_prime_dec(G,IntQ,V) {
         if ( type(Mod=getopt(mod)) == -1 ) Mod = 0;          if ( type(Mod=getopt(mod)) == -1 ) Mod = 0;
         if ( type(Lexdec=getopt(lexdec)) == -1 ) Lexdec = 0;          if ( type(Lexdec=getopt(lexdec)) == -1 ) Lexdec = 0;
         if ( type(Para=getopt(para)) == -1 ) Para = 0;          if ( type(Para=getopt(para)) == -1 ) Para = 0;
           if ( !Para ) {
                   print("colon_pd:",2); print(length(IntQ),2);
           }
         if ( !Mod ) M = mingen(IntQ,V);          if ( !Mod ) M = mingen(IntQ,V);
         else M = IntQ;          else M = IntQ;
         if ( Para ) {          if ( Para ) {
                 L = length(M);                  L = length(M);
                 for ( Task = [], J = 0, RI = []; J < L; J++ )                  for ( Task = [], J = 0; J < L; J++ )
                         if ( gen_nf(M[J],G,V,Ord,Mod) ) {                          if ( gen_nf(M[J],G,V,Ord,Mod) ) {
                                 T = ["noro_pd.colon_prime_dec1",G,M[J],Mod,V];                                  T = ["noro_pd.call_colon",G,M[J],V,Mod,1];
                                 Task = cons(T,Task);                                  Task = cons(T,Task);
                         }                          }
                 Task = reverse(Task);                  Task = reverse(Task);
                 R = para_exec(Para,Task);                  R = para_exec(Para,Task);
                   R = pd_simp_comp(R,V|mod=Mod); L = length(R);
   
                   for ( Task = [], J = 0; J < L; J++ ) {
                           T = ["noro_pd.call_prime_dec",R[J],V,1,Lexdec,Mod];
                           Task = cons(T,Task);
                   }
                   Task = reverse(Task);
                   R = para_exec(Para,Task);
   
                 for ( Pt = [], T = R; T != []; T = cdr(T) ) Pt = append(Pt,car(T));                  for ( Pt = [], T = R; T != []; T = cdr(T) ) Pt = append(Pt,car(T));
         } else {          } else {
                 for ( Pt = [], T = M; T != []; T = cdr(T) ) {                  for ( R = [], T = M; T != []; T = cdr(T) ) {
                         Pi = colon_prime_dec1(G,car(T),Mod,V);                          Ci = colon(G,car(T),V|isgb=1,mod=Mod);
                           R = cons(Ci,R);
                   }
                   print("->",2); print(length(M),2);
                   R = pd_simp_comp(R,V|mod=Mod);
                   print("->",2); print(length(R));
                   for ( Pt = [], T = R; T != []; T = cdr(T) ) {
                           Pi = prime_dec(car(T),V|indep=1,lexdec=Lexdec,mod=Mod);
                         Pt = append(Pt,Pi);                          Pt = append(Pt,Pi);
                 }                  }
         }          }
Line 381  def colon_prime_dec(G,IntQ,V) {
Line 406  def colon_prime_dec(G,IntQ,V) {
         return Pt;          return Pt;
 }  }
   
 def colon_prime_dec1(G,F,Mod,V)  def call_colon(G,F,V,Mod,IsGB)
 {  {
         Ci = colon(G,F,V|isgb=1,mod=Mod);          return colon(G,F,V|isgb=1,mod=Mod);
         if ( type(Ci[0]) != 1 )  }
                 Pi = prime_dec(Ci,V|indep=1,lexdec=Lexdec,mod=Mod);  
   def call_prime_dec(G,V,Indep,Lexdec,Mod)
   {
           if ( type(G[0]) != 1 )
                   Pi = prime_dec(G,V|indep=Indep,lexdec=Lexdec,mod=Mod);
         else          else
                 Pi = [];                  Pi = [];
         return Pi;          return Pi;
Line 1458  def elim_gb(G,V,PV,Mod,Ord)
Line 1487  def elim_gb(G,V,PV,Mod,Ord)
                 return G1;                  return G1;
         } else          } else
 #if 1  #if 1
 #if 1  #if 0
                 G = dp_gr_main(G,V,0,0,Ord);                  G = dp_gr_main(G,V,0,0,Ord);
 #else  #else
                 G = nd_gr_trace(G,V,1,1,Ord);                  G = nd_gr_trace(G,V,1,1,Ord);
Line 1656  def ideal_list_intersection(L,V,Ord)
Line 1685  def ideal_list_intersection(L,V,Ord)
         N = length(L);          N = length(L);
         if ( N == 0 ) return [1];          if ( N == 0 ) return [1];
         if ( N == 1 ) return fast_gb(L[0],V,Mod,Ord);          if ( N == 1 ) return fast_gb(L[0],V,Mod,Ord);
         N2 = idiv(N,2);          if ( N > 2 && (Len = length(Para)) >= 2 ) {
         for ( L1 = [], I = 0; I < N2; I++ ) L1 = cons(L[I],L1);                  Div = N >= 2*Len ? Len : 2;
         for ( L2 = []; I < N; I++ ) L2 = cons(L[I],L2);                  QR = iqr(N,Div); Q = QR[0]; R = QR[1];
         if ( length(Para) >= 2 ) {                  T = []; K = 0;
                 T1 = ["noro_pd.call_ideal_list_intersection",L1,V,Mod,Ord];                  for ( I = 0; I < Div; I++ ) {
                 T2 = ["noro_pd.call_ideal_list_intersection",L2,V,Mod,Ord];                          LenI = I<R? Q+1 : Q;
                 R = para_exec(Para,[T1,T2]);                          if ( LenI ) {
                 I1 = R[0]; I2 = R[1];                                  for ( LI = [], J = 0; J < LenI; J++ ) LI = cons(L[K++],LI);
                                   TI = ["noro_pd.call_ideal_list_intersection",LI,V,Mod,Ord];
                                   T = cons(TI,T);
                           }
                   }
                   Tint = para_exec(Para,T);
                   return ideal_list_intersection(Tint,V,Ord|mod=Mod,para=Para);
         } else {          } else {
                   N2 = idiv(N,2);
                   for ( L1 = [], I = 0; I < N2; I++ ) L1 = cons(L[I],L1);
                   for ( L2 = []; I < N; I++ ) L2 = cons(L[I],L2);
                 I1 = ideal_list_intersection(L1,V,Ord|mod=Mod);                  I1 = ideal_list_intersection(L1,V,Ord|mod=Mod);
                 I2 = ideal_list_intersection(L2,V,Ord|mod=Mod);                  I2 = ideal_list_intersection(L2,V,Ord|mod=Mod);
                   return ideal_intersection(I1,I2,V,Ord|mod=Mod,
                           gbblock=[[0,length(I1)],[length(I1),length(I2)]]);
         }          }
         return ideal_intersection(I1,I2,V,Ord|mod=Mod,  
                 gbblock=[[0,length(I1)],[length(I1),length(I2)]]);  
 }  }
   
 def call_ideal_list_intersection(L,V,Mod,Ord)  def call_ideal_list_intersection(L,V,Mod,Ord)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

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