version 1.15, 2003/01/04 09:06:17 |
version 1.18, 2003/01/17 00:17:10 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/Fgfs.c,v 1.14 2002/12/18 06:15:40 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/Fgfs.c,v 1.17 2003/01/13 06:40:41 noro Exp $ */ |
|
|
#include "ca.h" |
#include "ca.h" |
|
|
Line 25 void gfsn_poly_to_poly_main(P f,V v,P *r); |
|
Line 25 void gfsn_poly_to_poly_main(P f,V v,P *r); |
|
void gfsn_univariate_to_sfbm(P f,int dy,BM *r); |
void gfsn_univariate_to_sfbm(P f,int dy,BM *r); |
void sfbm_to_gfsn_univariate(BM f,V x,V y,P *r); |
void sfbm_to_gfsn_univariate(BM f,V x,V y,P *r); |
|
|
|
void monomialfctr_sf(VL vl,P p,P *pr,DCP *dcp) |
|
{ |
|
VL nvl,avl; |
|
Q d; |
|
P f,t,s; |
|
DCP dc0,dc; |
|
Obj obj; |
|
|
|
clctv(vl,p,&nvl); |
|
for ( dc0 = 0, avl = nvl, f = p; avl; avl = NEXT(avl) ) { |
|
getmindeg(avl->v,f,&d); |
|
if ( d ) { |
|
MKV(avl->v,t); |
|
simp_ff((Obj)t,&obj); t = (P)obj; |
|
NEXTDC(dc0,dc); DEG(dc) = d; COEF(dc) = t; |
|
pwrp(vl,t,d,&s); divsp(vl,f,s,&t); f = t; |
|
} |
|
} |
|
if ( dc0 ) |
|
NEXT(dc) = 0; |
|
*pr = f; *dcp = dc0; |
|
} |
|
|
void lex_lc(P f,P *c) |
void lex_lc(P f,P *c) |
{ |
{ |
if ( !f || NUM(f) ) |
if ( !f || NUM(f) ) |
Line 55 void sqfrsf(VL vl, P f, DCP *dcp) |
|
Line 78 void sqfrsf(VL vl, P f, DCP *dcp) |
|
|
|
simp_ff((Obj)f,&obj); f = (P)obj; |
simp_ff((Obj)f,&obj); f = (P)obj; |
lex_lc(f,&c); divsp(vl,f,c,&t); f = t; |
lex_lc(f,&c); divsp(vl,f,c,&t); f = t; |
monomialfctr(vl,f,&t,&dc); f = t; |
monomialfctr_sf(vl,f,&t,&dc); f = t; |
clctv(vl,f,&tvl); vl = tvl; |
clctv(vl,f,&tvl); vl = tvl; |
NEWVL(onevl); NEXT(onevl)=0; |
NEWVL(onevl); NEXT(onevl)=0; |
if ( !vl ) |
if ( !vl ) |
Line 474 void cont_pp_mv_sf(VL vl,VL rvl,P p,P *c,P *pp) |
|
Line 497 void cont_pp_mv_sf(VL vl,VL rvl,P p,P *c,P *pp) |
|
MP t; |
MP t; |
int i,m; |
int i,m; |
P *ps; |
P *ps; |
struct order_spec spec; |
struct order_spec spec, currentspec; |
|
extern struct order_spec dp_current_spec; |
|
|
|
currentspec = dp_current_spec; |
create_order_spec(0,&spec); |
create_order_spec(0,&spec); |
initd(&spec); |
initd(&spec); |
ptod(vl,rvl,p,&dp); |
ptod(vl,rvl,p,&dp); |
Line 485 void cont_pp_mv_sf(VL vl,VL rvl,P p,P *c,P *pp) |
|
Line 510 void cont_pp_mv_sf(VL vl,VL rvl,P p,P *c,P *pp) |
|
ps[i] = C(t); |
ps[i] = C(t); |
gcdsf(vl,ps,m,c); |
gcdsf(vl,ps,m,c); |
divsp(vl,p,*c,pp); |
divsp(vl,p,*c,pp); |
|
initd(¤tspec); |
} |
} |
|
|
void mfctrsf(VL vl, P f, DCP *dcp) |
void mfctrsf(VL vl, P f, DCP *dcp) |
Line 953 void mfctrsf_hensel(VL vl,VL rvl,P f,P pp0,P u0,P v0,P |
|
Line 979 void mfctrsf_hensel(VL vl,VL rvl,P f,P pp0,P u0,P v0,P |
|
addp(vl,v,wv,&t); v = t; |
addp(vl,v,wv,&t); v = t; |
addp(vl,vh[j],wv,&t); vh[j] = t; |
addp(vl,vh[j],wv,&t); vh[j] = t; |
} |
} |
|
gfsn_poly_to_poly(vl,u,vy,&t); |
|
shift_sf(vl,rvl,t,mev,-1,&s); |
|
if ( divtp(vl,fin,s,&q) ) |
|
cont_pp_mv_sf(vl,onevl,s,&cont,up); |
|
else |
|
*up = 0; |
} |
} |
|
|
void adjust_coef_sf(VL vl,VL rvl,P lcu,P u0,int *mev,P *r) |
void adjust_coef_sf(VL vl,VL rvl,P lcu,P u0,int *mev,P *r) |