version 1.236, 2017/03/27 09:05:46 |
version 1.238, 2017/08/31 02:36:21 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.235 2017/02/28 07:06:28 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.237 2017/04/09 02:23:12 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 3120 void preprocess_algcoef(VL vv,VL av,struct order_spec |
|
Line 3120 void preprocess_algcoef(VL vv,VL av,struct order_spec |
|
if ( NID(hc) == N_DA ) { |
if ( NID(hc) == N_DA ) { |
invdalg(hc,&inv); |
invdalg(hc,&inv); |
for ( m = BDY(d); m; m = NEXT(m) ) { |
for ( m = BDY(d); m; m = NEXT(m) ) { |
muldalg(inv,(DAlg)m->c,&da); m->c = (P)da; |
muldalg(inv,(DAlg)m->c,&da); m->c = (Obj)da; |
} |
} |
} |
} |
initd(ord); dtop(vv,vv,d,&poly); BDY(f) = (pointer)poly; |
initd(ord); dtop(vv,vv,d,(Obj *)&poly); BDY(f) = (pointer)poly; |
} |
} |
obj_dalgtoalg((Obj)f1,(Obj *)&f); |
obj_dalgtoalg((Obj)f1,(Obj *)&f); |
|
|
Line 3903 void nmtodp(int mod,NM m,DP *r) |
|
Line 3903 void nmtodp(int mod,NM m,DP *r) |
|
|
|
NEWMP(mr); |
NEWMP(mr); |
mr->dl = ndltodl(nd_nvar,DL(m)); |
mr->dl = ndltodl(nd_nvar,DL(m)); |
mr->c = ndctop(mod,m->c); |
mr->c = (Obj)ndctop(mod,m->c); |
NEXT(mr) = 0; MKDP(nd_nvar,mr,dp); dp->sugar = mr->dl->td; |
NEXT(mr) = 0; MKDP(nd_nvar,mr,dp); dp->sugar = mr->dl->td; |
*r = dp; |
*r = dp; |
} |
} |
Line 5317 P ndvtop(int mod,VL vl,VL dvl,NDV p) |
|
Line 5317 P ndvtop(int mod,VL vl,VL dvl,NDV p) |
|
if ( mod == -1 ) { |
if ( mod == -1 ) { |
e = IFTOF(CM(m)); MKGFS(e,gfs); c = (P)gfs; |
e = IFTOF(CM(m)); MKGFS(e,gfs); c = (P)gfs; |
} else if ( mod == -2 ) { |
} else if ( mod == -2 ) { |
c = gztoz(CZ(m)); |
c = (P)gztoz(CZ(m)); |
} else if ( mod > 0 ) { |
} else if ( mod > 0 ) { |
STOQ(CM(m),q); c = (P)q; |
STOQ(CM(m),q); c = (P)q; |
} else |
} else |
Line 5436 DP ndvtodp(int mod,NDV p) |
|
Line 5436 DP ndvtodp(int mod,NDV p) |
|
for ( t = BDY(p), i = 0; i < len; NMV_ADV(t), i++ ) { |
for ( t = BDY(p), i = 0; i < len; NMV_ADV(t), i++ ) { |
NEXTMP(m0,m); |
NEXTMP(m0,m); |
m->dl = ndltodl(nd_nvar,DL(t)); |
m->dl = ndltodl(nd_nvar,DL(t)); |
m->c = ndctop(mod,t->c); |
m->c = (Obj)ndctop(mod,t->c); |
} |
} |
NEXT(m) = 0; |
NEXT(m) = 0; |
MKDP(nd_nvar,m0,d); |
MKDP(nd_nvar,m0,d); |
Line 5457 DP ndtodp(int mod,ND p) |
|
Line 5457 DP ndtodp(int mod,ND p) |
|
for ( t = BDY(p); t; t = NEXT(t) ) { |
for ( t = BDY(p); t; t = NEXT(t) ) { |
NEXTMP(m0,m); |
NEXTMP(m0,m); |
m->dl = ndltodl(nd_nvar,DL(t)); |
m->dl = ndltodl(nd_nvar,DL(t)); |
m->c = ndctop(mod,t->c); |
m->c = (Obj)ndctop(mod,t->c); |
} |
} |
NEXT(m) = 0; |
NEXT(m) = 0; |
MKDP(nd_nvar,m0,d); |
MKDP(nd_nvar,m0,d); |
Line 7084 init_eg(&eg_search); |
|
Line 7084 init_eg(&eg_search); |
|
else if ( m == -2 ) |
else if ( m == -2 ) |
r0 = nd_f4_red_lf_main(m,sp0,nsp,trace,s0vect,col,rvect,rhead,imat,nred); |
r0 = nd_f4_red_lf_main(m,sp0,nsp,trace,s0vect,col,rvect,rhead,imat,nred); |
else |
else |
|
#if defined(VISUAL) |
|
r0 = nd_f4_red_q_main(sp0,nsp,trace,s0vect,col,rvect,rhead,imat,nred); |
|
#else |
r0 = nd_f4_red_gz_main(sp0,nsp,trace,s0vect,col,rvect,rhead,imat,nred); |
r0 = nd_f4_red_gz_main(sp0,nsp,trace,s0vect,col,rvect,rhead,imat,nred); |
|
#endif |
if ( DP_Print ) print_eg("search",&eg_search); |
if ( DP_Print ) print_eg("search",&eg_search); |
return r0; |
return r0; |
} |
} |
Line 8196 int nd_monic(int mod,ND *p) |
|
Line 8200 int nd_monic(int mod,ND *p) |
|
is_lc = 1; |
is_lc = 1; |
while ( 1 ) { |
while ( 1 ) { |
NEWMP(mp0); mp = mp0; |
NEWMP(mp0); mp = mp0; |
mp->c = (P)CQ(m); |
mp->c = (Obj)CQ(m); |
mp->dl = nd_separate_d(DL(m),DL(ma)); |
mp->dl = nd_separate_d(DL(m),DL(ma)); |
NEWNM(mb); |
NEWNM(mb); |
for ( m = NEXT(m); m; m = NEXT(m) ) { |
for ( m = NEXT(m); m; m = NEXT(m) ) { |
alg = nd_separate_d(DL(m),DL(mb)); |
alg = nd_separate_d(DL(m),DL(mb)); |
if ( !ndl_equal(DL(ma),DL(mb)) ) |
if ( !ndl_equal(DL(ma),DL(mb)) ) |
break; |
break; |
NEXTMP(mp0,mp); mp->c = (P)CQ(m); mp->dl = alg; |
NEXTMP(mp0,mp); mp->c = (Obj)CQ(m); mp->dl = alg; |
} |
} |
NEXT(mp) = 0; |
NEXT(mp) = 0; |
MKDP(nd_nalg,mp0,nm); |
MKDP(nd_nalg,mp0,nm); |