version 1.1, 2018/09/19 05:45:06 |
version 1.2, 2018/09/28 08:20:28 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/engine/Fgfs.c,v 1.1 2018/09/19 05:45:06 noro Exp $ */ |
|
|
#include "ca.h" |
#include "ca.h" |
|
|
Line 118 void sqfrsfmain(VL vl,P f,DCP *dcp) |
|
Line 118 void sqfrsfmain(VL vl,P f,DCP *dcp) |
|
dc = append_dc(dc,dct); |
dc = append_dc(dc,dct); |
} |
} |
if ( !NUM(t) ) { |
if ( !NUM(t) ) { |
STOQ(characteristic_sf(),m); |
STOZ(characteristic_sf(),m); |
pthrootsf(t,m,&s); |
pthrootsf(t,m,&s); |
sqfrsfmain(vl,s,&dct); |
sqfrsfmain(vl,s,&dct); |
for ( dcs = dct; dcs; dcs = NEXT(dcs) ) { |
for ( dcs = dct; dcs; dcs = NEXT(dcs) ) { |
Line 184 void partial_sqfrsf(VL vl,V v,P f,P *r,DCP *dcp) |
|
Line 184 void partial_sqfrsf(VL vl,V v,P f,P *r,DCP *dcp) |
|
flat = flat1; |
flat = flat1; |
NEXTDC(dc0,dc); |
NEXTDC(dc0,dc); |
COEF(dc) = g; |
COEF(dc) = g; |
STOQ(m,DEG(dc)); |
STOZ(m,DEG(dc)); |
} |
} |
NEXT(dc) = 0; |
NEXT(dc) = 0; |
*dcp = dc0; |
*dcp = dc0; |
Line 318 int gethdeg(VL vl,V v,P p) |
|
Line 318 int gethdeg(VL vl,V v,P p) |
|
if ( compp(vl,COEF(dc),cmax) > 0 ) { |
if ( compp(vl,COEF(dc),cmax) > 0 ) { |
dmax = DEG(dc); cmax = COEF(dc); |
dmax = DEG(dc); cmax = COEF(dc); |
} |
} |
return QTOS(dmax); |
return ZTOS(dmax); |
} |
} |
} |
} |
|
|
Line 780 void estimatelc_sf(VL vl,VL rvl,P c,DCP dc,int *mev,P |
|
Line 780 void estimatelc_sf(VL vl,VL rvl,P c,DCP dc,int *mev,P |
|
continue; |
continue; |
/* constant part */ |
/* constant part */ |
substvp_sf(vl,rvl,COEF(dct),mev,&f); |
substvp_sf(vl,rvl,COEF(dct),mev,&f); |
d = QTOS(DEG(dct)); |
d = ZTOS(DEG(dct)); |
for ( i = 0, c1 = c; i < d; i++ ) |
for ( i = 0, c1 = c; i < d; i++ ) |
if ( !divtp(vl,c1,f,&c2) ) |
if ( !divtp(vl,c1,f,&c2) ) |
break; |
break; |
else |
else |
c1 = c2; |
c1 = c2; |
if ( i ) { |
if ( i ) { |
STOQ(i,q); |
STOZ(i,q); |
pwrp(vl,COEF(dct),q,&s); mulp(vl,r,s,&t); r = t; |
pwrp(vl,COEF(dct),q,&s); mulp(vl,r,s,&t); r = t; |
} |
} |
} |
} |
Line 1034 void gfsn_univariate_to_sfbm(P f,int dy,BM *r) |
|
Line 1034 void gfsn_univariate_to_sfbm(P f,int dy,BM *r) |
|
DEG(b) = dy; |
DEG(b) = dy; |
for ( dc = DC(f); dc; dc = NEXT(dc) ) { |
for ( dc = DC(f); dc; dc = NEXT(dc) ) { |
/* d : degree in x, cy : poly in y */ |
/* d : degree in x, cy : poly in y */ |
d = QTOS(DEG(dc)); |
d = ZTOS(DEG(dc)); |
cy = BDY((GFSN)COEF(dc)); |
cy = BDY((GFSN)COEF(dc)); |
for ( i = DEG(cy); i >= 0; i-- ) |
for ( i = DEG(cy); i >= 0; i-- ) |
COEF(COEF(b)[i])[d] = COEF(cy)[i]; |
COEF(COEF(b)[i])[d] = COEF(cy)[i]; |