[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.8 and 1.9

version 1.8, 2011/11/01 00:35:56 version 1.9, 2014/09/05 11:55:19
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/asir-contrib/testing/noro/new_pd.rr,v 1.7 2011/08/09 07:49:38 noro Exp $ */  /* $OpenXM: OpenXM/src/asir-contrib/testing/noro/new_pd.rr,v 1.8 2011/11/01 00:35:56 noro Exp $ */
 import("gr")$  import("gr")$
 module noro_pd$  module noro_pd$
 static GBCheck,F4,EProcs,Procs,SatHomo,GBRat,SuccSat,RepColon$  static GBCheck,F4,EProcs,Procs,SatHomo,GBRat,SuccSat,RepColon$
Line 712  def find_si1(C,G,Q,Rad,V,Ord) {
Line 712  def find_si1(C,G,Q,Rad,V,Ord) {
         /* check whether (Q cap (G+S)) = G */          /* check whether (Q cap (G+S)) = G */
         if ( gen_gb_comp(Int,G,Mod) ) { print([0]); return reverse(S); }          if ( gen_gb_comp(Int,G,Mod) ) { print([0]); return reverse(S); }
   
         C = qsort(C,comp_tdeg);          C = qsort(C,noro_pd.comp_tdeg);
   
         Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]];          Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]];
         Int0 = incremental_gb(append(vtol(ltov(G)*Tmp),vtol(ltov(Q)*(1-Tmp))),          Int0 = incremental_gb(append(vtol(ltov(G)*Tmp),vtol(ltov(Q)*(1-Tmp))),
Line 755  def find_si2(C,G,Q,Rad,V,Ord) {
Line 755  def find_si2(C,G,Q,Rad,V,Ord) {
         /* check whether (Q cap (G+S)) = G */          /* check whether (Q cap (G+S)) = G */
         if ( gen_gb_comp(Int,G,Mod) ) { print([0]); return reverse(S); }          if ( gen_gb_comp(Int,G,Mod) ) { print([0]); return reverse(S); }
   
         C = qsort(C,comp_tdeg);          C = qsort(C,noro_pd.comp_tdeg);
   
         Dp = dp_gr_print(); dp_gr_print(0);          Dp = dp_gr_print(); dp_gr_print(0);
         Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]];          Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]];
Line 775  def find_si2(C,G,Q,Rad,V,Ord) {
Line 775  def find_si2(C,G,Q,Rad,V,Ord) {
                 print([length(T),I],2);                  print([length(T),I],2);
                 S = cons(Ui,S);                  S = cons(Ui,S);
         }          }
         S = qsort(S,comp_tdeg);          S = qsort(S,noro_pd.comp_tdeg);
         print("");          print("");
         End = Len = length(S);          End = Len = length(S);
   
Line 866  def find_ssi1(C,G,Q,Rad,V,Ord) {
Line 866  def find_ssi1(C,G,Q,Rad,V,Ord) {
         if ( gen_gb_comp(Int,G,Mod) ) { print([0]); return reverse(S); }          if ( gen_gb_comp(Int,G,Mod) ) { print([0]); return reverse(S); }
   
         dp_ord(Ord); DC = map(dp_ptod,C,V);          dp_ord(Ord); DC = map(dp_ptod,C,V);
         DC = qsort(DC,comp_tord); C = map(dp_dtop,DC,V);          DC = qsort(DC,noro_pd.comp_tord); C = map(dp_dtop,DC,V);
         print(length(C),2);          print(length(C),2);
         if ( Reduce ) {          if ( Reduce ) {
                 SC = map(sq,C,Mod);                  SC = map(sq,C,Mod);
Line 924  def find_ssi2(C,G,Q,Rad,V,Ord) {
Line 924  def find_ssi2(C,G,Q,Rad,V,Ord) {
   
 #if 0  #if 0
         dp_ord(Ord); DC = map(dp_ptod,C,V);          dp_ord(Ord); DC = map(dp_ptod,C,V);
         DC = qsort(DC,comp_tord); C = map(dp_dtop,DC,V);          DC = qsort(DC,noro_pd.comp_tord); C = map(dp_dtop,DC,V);
 #else  #else
         C = qsort(C,comp_tdeg);          C = qsort(C,noro_pd.comp_tdeg);
 #endif  #endif
         if ( Reduce ) {          if ( Reduce ) {
                 for ( T = C, C1 = [], R1 = Rad; T != []; T = cdr(T) ) {                  for ( T = C, C1 = [], R1 = Rad; T != []; T = cdr(T) ) {
Line 944  def find_ssi2(C,G,Q,Rad,V,Ord) {
Line 944  def find_ssi2(C,G,Q,Rad,V,Ord) {
                 Ui = U = car(T);                  Ui = U = car(T);
                 S = cons([Ui,U],S);                  S = cons([Ui,U],S);
         }          }
         S = qsort(S,comp_tdeg_first);          S = qsort(S,noro_pd.comp_tdeg_first);
         print("");          print("");
   
         Dp = dp_gr_print(); dp_gr_print(0);          Dp = dp_gr_print(); dp_gr_print(0);
Line 1043  def pseudo_dec(G,L,V,Ord)
Line 1043  def pseudo_dec(G,L,V,Ord)
         for ( I = 0; I < N; I++ ) {          for ( I = 0; I < N; I++ ) {
                 LI = setminus(L0,[L0[I]]);                  LI = setminus(L0,[L0[I]]);
                 PI = ideal_list_intersection(LI,V,Ord|mod=Mod);                  PI = ideal_list_intersection(LI,V,Ord|mod=Mod);
                 PI = qsort(PI,comp_tdeg);                  PI = qsort(PI,noro_pd.comp_tdeg);
                 for ( T = PI; T != []; T = cdr(T) )                  for ( T = PI; T != []; T = cdr(T) )
                         if ( gen_nf(car(T),L0[I],V,Ord,Mod) ) break;                          if ( gen_nf(car(T),L0[I],V,Ord,Mod) ) break;
                 if ( T == [] ) error("separator : cannot happen");                  if ( T == [] ) error("separator : cannot happen");
Line 1263  def prime_dec_main(B,V)
Line 1263  def prime_dec_main(B,V)
 T0=time();  T0=time();
                 IntP = ideal_intersection_m(IntP,Int,V,0|mod=Mod);                  IntP = ideal_intersection_m(IntP,Int,V,0|mod=Mod);
                 dp_ord(0); DC = map(dp_ptod,IntP,V);                  dp_ord(0); DC = map(dp_ptod,IntP,V);
                 DC = qsort(DC,comp_tord); IntP = map(dp_dtop,DC,V);                  DC = qsort(DC,noro_pd.comp_tord); IntP = map(dp_dtop,DC,V);
 ACCUM_TIME(Tpint,RTpint)  ACCUM_TIME(Tpint,RTpint)
 #else  #else
                 IntP = ideal_intersection(IntP,Int,V,0|mod=Mod,gbblock=[[0,length(IntP)]]);                  IntP = ideal_intersection(IntP,Int,V,0|mod=Mod,gbblock=[[0,length(IntP)]]);
Line 2164  def ideal_product(A,B,V)
Line 2164  def ideal_product(A,B,V)
         for ( T = PA; T != []; T = cdr(T) )          for ( T = PA; T != []; T = cdr(T) )
                 for ( S = PB; S != []; S = cdr(S) )                  for ( S = PB; S != []; S = cdr(S) )
                         R = cons([car(T)[0]*car(S)[0],car(T)[1]+car(S)[1]],R);                          R = cons([car(T)[0]*car(S)[0],car(T)[1]+car(S)[1]],R);
         T = qsort(R,comp_by_second);          T = qsort(R,noro_pd.comp_by_second);
         T = map(first,T);          T = map(first,T);
         Len = length(A)>length(B)?length(A):length(B);          Len = length(A)>length(B)?length(A):length(B);
         Len *= 2;          Len *= 2;
Line 2306  def ideal_colon(G,F,V)
Line 2306  def ideal_colon(G,F,V)
         G = nd_gr(G,V,Mod,0);          G = nd_gr(G,V,Mod,0);
         C = [1];          C = [1];
         TV = ttttt;          TV = ttttt;
         F = qsort(F,comp_tdeg);          F = qsort(F,noro_pd.comp_tdeg);
         for ( T = F; T != []; T = cdr(T) ) {          for ( T = F; T != []; T = cdr(T) ) {
                 S = colon(G,car(T),V|isgb=1,mod=Mod);                  S = colon(G,car(T),V|isgb=1,mod=Mod);
                 if ( type(S[0])!= 1 ) {                  if ( type(S[0])!= 1 ) {
Line 2837  def separator(P,V)
Line 2837  def separator(P,V)
         N = length(P);          N = length(P);
         dp_ord(0);          dp_ord(0);
         DP = vector(N);          DP = vector(N);
         for ( I = 0; I < N; I++ ) DP[I] = qsort(ltov(map(dp_ptod,P[I][0],V)),comp_tord);          for ( I = 0; I < N; I++ ) DP[I] = qsort(ltov(map(dp_ptod,P[I][0],V)),noro_pd.comp_tord);
         if ( Mod )          if ( Mod )
                 for ( I = 0; I < N; I++ ) DP[I] = map(dp_mod,DP[I],Mod,[]);                  for ( I = 0; I < N; I++ ) DP[I] = map(dp_mod,DP[I],Mod,[]);
         Ind = vector(N);          Ind = vector(N);
Line 2953  def para_exec(Proc,Task) {
Line 2953  def para_exec(Proc,Task) {
                 Free = append(Free,Finish0);                  Free = append(Free,Finish0);
         }          }
         print("");          print("");
         R = qsort(R,comp_by_second);          R = qsort(R,noro_pd.comp_by_second);
         R = map(first,R);          R = map(first,R);
         return R;          return R;
 }  }
Line 2972  def redbase(B,V,Mod,Ord)
Line 2972  def redbase(B,V,Mod,Ord)
                 D = Mod?dp_nf_mod(Ind,D,DM,1,Mod):dp_nf(Ind,D,DM,1);                  D = Mod?dp_nf_mod(Ind,D,DM,1,Mod):dp_nf(Ind,D,DM,1);
                 if ( D ) R = cons(D,R);                  if ( D ) R = cons(D,R);
         }          }
         D = qsort(R,comp_tord);          D = qsort(R,noro_pd.comp_tord);
         return map(dp_dtop,D,V);          return map(dp_dtop,D,V);
 }  }
   

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

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