version 1.22, 2003/04/20 08:54:28 |
version 1.23, 2003/04/20 11:59:57 |
|
|
* 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.21 2002/01/30 02:12:58 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_GR_LOADED$ |
extern LIBRARY_PRIMDEC_LOADED$ |
extern LIBRARY_PRIMDEC_LOADED$ |
|
|
Line 59 if(!LIBRARY_PRIMDEC_LOADED) load("primdec"); else ; LI |
|
Line 64 if(!LIBRARY_PRIMDEC_LOADED) load("primdec"); else ; LI |
|
|
|
def bfunction(F) |
def bfunction(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); |
|
|
|
|
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); |
|
|
|
|
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 389 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); |
|
|
|
|
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 441 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 478 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 513 def bfct_via_gbfct_weight_1(F,V) |
|
Line 541 def bfct_via_gbfct_weight_1(F,V) |
|
|
|
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 832 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; |
} |
} |