[BACK]Return to bfct CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / lib

Diff for /OpenXM_contrib2/asir2000/lib/bfct between version 1.20 and 1.23

version 1.20, 2002/01/29 05:37:12 version 1.23, 2003/04/20 11:59:57
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/lib/bfct,v 1.19 2002/01/29 02:03:41 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/lib/bfct,v 1.22 2003/04/20 08:54:28 noro Exp $
  */   */
 /* requires 'primdec' */  /* requires 'primdec' */
   
   #define TMP_S ssssssss
   #define TMP_T tttttttt
   #define TMP_Y1 yyyyyyyy1
   #define TMP_Y2 yyyyyyyy2
   
   extern LIBRARY_GR_LOADED$
   extern LIBRARY_PRIMDEC_LOADED$
   
   if(!LIBRARY_GR_LOADED) load("gr"); else ; LIBRARY_GR_LOADED = 1$
   if(!LIBRARY_PRIMDEC_LOADED) load("primdec"); else ; LIBRARY_PRIMDEC_LOADED = 1$
   
   /* toplevel */
   
   def bfunction(F)
   {
           /* XXX */
           F = replace_vars_f(F);
   
           V = vars(F);
           N = length(V);
           D = newvect(N);
   
           for ( I = 0; I < N; I++ )
                   D[I] = [deg(F,V[I]),V[I]];
           qsort(D,compare_first);
           for ( V = [], I = 0; I < N; I++ )
                   V = cons(D[I][1],V);
           return bfct_via_gbfct_weight(F,V);
   }
   
 /* annihilating ideal of F^s */  /* annihilating ideal of F^s */
   
 def ann(F)  def ann(F)
 {  {
           /* XXX */
           F = replace_vars_f(F);
   
         V = vars(F);          V = vars(F);
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
Line 95  def ann(F)
Line 128  def ann(F)
   
 def ann0(F)  def ann0(F)
 {  {
           /* XXX */
           F = replace_vars_f(F);
   
         V = vars(F);          V = vars(F);
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
Line 249  def generic_bfct(F,V,DV,W)
Line 285  def generic_bfct(F,V,DV,W)
         FH = map(dp_dtop,map(dp_homo,map(dp_ptod,F,VDV)),VDVH);          FH = map(dp_dtop,map(dp_homo,map(dp_ptod,F,VDV)),VDVH);
   
         /* compute a groebner basis of FH w.r.t. MWH */          /* compute a groebner basis of FH w.r.t. MWH */
         dp_gr_flags(["Top",1]);          dp_gr_flags(["Top",1,"NoRA",1]);
         GH = dp_weyl_gr_main(FH,VDVH,0,1,11);          GH = dp_weyl_gr_main(FH,VDVH,0,1,11);
         dp_gr_flags(["Top",0]);          dp_gr_flags(["Top",0,"NoRA",0]);
   
         /* dehomigenize GH */          /* dehomigenize GH */
         G = map(subst,GH,h,1);          G = map(subst,GH,h,1);
Line 367  def initial_part(F,V,MW,W)
Line 403  def initial_part(F,V,MW,W)
   
 def bfct(F)  def bfct(F)
 {  {
           /* XXX */
           F = replace_vars_f(F);
   
         V = vars(F);          V = vars(F);
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
Line 390  def bfct(F)
Line 429  def bfct(F)
   
 def bfct_via_gbfct(F)  def bfct_via_gbfct(F)
 {  {
           /* XXX */
           F = replace_vars_f(F);
   
         V = vars(F);          V = vars(F);
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
Line 410  def bfct_via_gbfct(F)
Line 452  def bfct_via_gbfct(F)
         V1 = cons(t,V); DV1 = cons(dt,DV);          V1 = cons(t,V); DV1 = cons(dt,DV);
         W = newvect(N+1);          W = newvect(N+1);
         W[0] = 1;          W[0] = 1;
         R = generic_bfct_1(B,V1,DV1,W);          R = generic_bfct(B,V1,DV1,W);
   
         return subst(R,s,-s-1);          return subst(R,s,-s-1);
 }  }
Line 419  def bfct_via_gbfct(F)
Line 461  def bfct_via_gbfct(F)
   
 def bfct_via_gbfct_weight(F,V)  def bfct_via_gbfct_weight(F,V)
 {  {
           /* XXX */
           F = replace_vars_f(F);
           V = replace_vars_v(V);
   
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
         Wt = getopt(weight);          Wt = getopt(weight);
Line 456  def bfct_via_gbfct_weight(F,V)
Line 502  def bfct_via_gbfct_weight(F,V)
   
 def bfct_via_gbfct_weight_1(F,V)  def bfct_via_gbfct_weight_1(F,V)
 {  {
           /* XXX */
           F = replace_vars_f(F);
           V = replace_vars_v(V);
   
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
         Wt = getopt(weight);          Wt = getopt(weight);
Line 484  def bfct_via_gbfct_weight_1(F,V)
Line 534  def bfct_via_gbfct_weight_1(F,V)
         V1 = append(V,[t]); DV1 = append(DV,[dt]);          V1 = append(V,[t]); DV1 = append(DV,[dt]);
         W = newvect(N+1);          W = newvect(N+1);
         W[N] = 1;          W[N] = 1;
         R = generic_bfct(B,V1,DV1,W);          R = generic_bfct_1(B,V1,DV1,W);
         dp_set_weight(0);          dp_set_weight(0);
         return subst(R,s,-s-1);          return subst(R,s,-s-1);
 }  }
   
 def bfct_via_gbfct_weight_2(F,V)  def bfct_via_gbfct_weight_2(F,V)
 {  {
           /* XXX */
           F = replace_vars_f(F);
           V = replace_vars_v(V);
   
         N = length(V);          N = length(V);
         D = newvect(N);          D = newvect(N);
         Wt = getopt(weight);          Wt = getopt(weight);
Line 810  def w_tdeg(F,V,W)
Line 864  def w_tdeg(F,V,W)
         for ( R = 0; T; T = cdr(T) ) {          for ( R = 0; T; T = cdr(T) ) {
                 D = dp_td(T);                  D = dp_td(T);
                 if ( D > R ) R = D;                  if ( D > R ) R = D;
           }
           return R;
   }
   
   def replace_vars_f(F)
   {
           return subst(F,s,TMP_S,t,TMP_T,y1,TMP_Y1,y2,TMP_Y2);
   }
   
   def replace_vars_v(V)
   {
           V = replace_var(V,s,TMP_S);
           V = replace_var(V,t,TMP_T);
           V = replace_var(V,y1,TMP_Y1);
           V = replace_var(V,y2,TMP_Y2);
           return V;
   }
   
   def replace_var(V,X,Y)
   {
           V = reverse(V);
           for ( R = []; V != []; V = cdr(V) ) {
                   Z = car(V);
                   if ( Z == X )
                           R = cons(Y,R);
                   else
                           R = cons(Z,R);
         }          }
         return R;          return R;
 }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.23

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