version 1.19, 2019/11/21 04:03:16 |
version 1.27, 2021/01/25 00:39:51 |
|
|
* 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/asir2018/builtin/dp.c,v 1.18 2019/11/19 10:50:31 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2018/builtin/dp.c,v 1.26 2020/10/26 02:41:05 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
Line 59 extern struct order_spec *dp_current_spec; |
|
Line 59 extern struct order_spec *dp_current_spec; |
|
extern struct modorder_spec *dp_current_modspec; |
extern struct modorder_spec *dp_current_modspec; |
extern int nd_rref2; |
extern int nd_rref2; |
|
|
int do_weyl; |
extern int do_weyl; |
|
|
void Pdp_monomial_hilbert_poincare(); |
void Pdp_monomial_hilbert_poincare(); |
void Pdp_sort(); |
void Pdp_sort(); |
Line 79 void Pdp_nf_mod(),Pdp_true_nf_mod(); |
|
Line 79 void Pdp_nf_mod(),Pdp_true_nf_mod(); |
|
void Pdp_criB(),Pdp_nelim(); |
void Pdp_criB(),Pdp_nelim(); |
void Pdp_minp(),Pdp_sp_mod(); |
void Pdp_minp(),Pdp_sp_mod(); |
void Pdp_homo(),Pdp_dehomo(); |
void Pdp_homo(),Pdp_dehomo(); |
void Pdpm_homo(),Pdpm_dehomo(); |
void Pdpm_homo(),Pdpm_dehomo(),Pdpm_mod(); |
void Pdp_gr_mod_main(),Pdp_gr_f_main(); |
void Pdp_gr_mod_main(),Pdp_gr_f_main(); |
void Pdp_gr_main(),Pdp_gr_hm_main(),Pdp_gr_d_main(),Pdp_gr_flags(); |
void Pdp_gr_main(),Pdp_gr_hm_main(),Pdp_gr_d_main(),Pdp_gr_flags(); |
void Pdp_interreduce(); |
void Pdp_interreduce(); |
Line 93 void Pdp_ltod(),Pdpv_ord(),Pdpv_ht(),Pdpv_hm(),Pdpv_hc |
|
Line 93 void Pdp_ltod(),Pdpv_ord(),Pdpv_ht(),Pdpv_hm(),Pdpv_hc |
|
void Pdpm_ltod(),Pdpm_dtol(),Pdpm_set_schreyer(),Pdpm_nf(),Pdpm_weyl_nf(),Pdpm_sp(),Pdpm_weyl_sp(),Pdpm_nf_and_quotient(),Pdpm_nf_and_quotient2(); |
void Pdpm_ltod(),Pdpm_dtol(),Pdpm_set_schreyer(),Pdpm_nf(),Pdpm_weyl_nf(),Pdpm_sp(),Pdpm_weyl_sp(),Pdpm_nf_and_quotient(),Pdpm_nf_and_quotient2(); |
void Pdpm_schreyer_frame(),Pdpm_set_schreyer_level(); |
void Pdpm_schreyer_frame(),Pdpm_set_schreyer_level(); |
void Pdpm_list_to_array(),Pdpm_sp_nf(),Pdpm_insert_to_zlist(); |
void Pdpm_list_to_array(),Pdpm_sp_nf(),Pdpm_insert_to_zlist(); |
void Pdpm_hm(),Pdpm_ht(),Pdpm_hc(),Pdpm_hp(),Pdpm_rest(),Pdpm_shift(),Pdpm_split(),Pdpm_sort(),Pdpm_dptodpm(),Pdpm_redble(); |
void Pdpm_hm(),Pdpm_ht(),Pdpm_hc(),Pdpm_hp(),Pdpm_rest(),Pdpm_shift(),Pdpm_split(),Pdpm_extract(),Pdpm_sort(),Pdpm_dptodpm(),Pdpm_redble(); |
void Pdpm_schreyer_base(),Pdpm_simplify_syz(),Pdpm_td(); |
void Pdpm_schreyer_base(),Pdpm_simplify_syz(),Pdpm_td(); |
|
void Pdpm_remove_cont(); |
|
|
void Pdp_weyl_red(); |
void Pdp_weyl_red(); |
void Pdp_weyl_sp(); |
void Pdp_weyl_sp(); |
Line 112 void Pdp_nf_f(),Pdp_weyl_nf_f(); |
|
Line 113 void Pdp_nf_f(),Pdp_weyl_nf_f(); |
|
void Pdpm_nf_f(),Pdpm_weyl_nf_f(); |
void Pdpm_nf_f(),Pdpm_weyl_nf_f(); |
void Pdp_lnf_f(); |
void Pdp_lnf_f(); |
void Pnd_gr(),Pnd_gr_trace(),Pnd_f4(),Pnd_f4_trace(); |
void Pnd_gr(),Pnd_gr_trace(),Pnd_f4(),Pnd_f4_trace(); |
|
void Pnd_sba(),Pnd_sba_f4(); |
|
void Pnd_weyl_sba(); |
void Pnd_gr_postproc(), Pnd_weyl_gr_postproc(); |
void Pnd_gr_postproc(), Pnd_weyl_gr_postproc(); |
void Pnd_gr_recompute_trace(), Pnd_btog(); |
void Pnd_gr_recompute_trace(), Pnd_btog(); |
void Pnd_weyl_gr(),Pnd_weyl_gr_trace(); |
void Pnd_weyl_gr(),Pnd_weyl_gr_trace(); |
Line 143 struct ftab dp_tab[] = { |
|
Line 146 struct ftab dp_tab[] = { |
|
{"dp_prim",Pdp_prim,1}, |
{"dp_prim",Pdp_prim,1}, |
{"dp_red_coef",Pdp_red_coef,2}, |
{"dp_red_coef",Pdp_red_coef,2}, |
{"dp_cont",Pdp_cont,1}, |
{"dp_cont",Pdp_cont,1}, |
|
{"dpm_remove_cont",Pdpm_remove_cont,1}, |
|
|
/* polynomial ring */ |
/* polynomial ring */ |
/* special operations */ |
/* special operations */ |
Line 192 struct ftab dp_tab[] = { |
|
Line 196 struct ftab dp_tab[] = { |
|
{"dp_gr_checklist",Pdp_gr_checklist,2}, |
{"dp_gr_checklist",Pdp_gr_checklist,2}, |
{"nd_f4",Pnd_f4,-4}, |
{"nd_f4",Pnd_f4,-4}, |
{"nd_gr",Pnd_gr,-4}, |
{"nd_gr",Pnd_gr,-4}, |
|
{"nd_sba",Pnd_sba,-4}, |
|
{"nd_weyl_sba",Pnd_weyl_sba,-4}, |
|
{"nd_sba_f4",Pnd_sba_f4,-4}, |
{"nd_gr_trace",Pnd_gr_trace,-5}, |
{"nd_gr_trace",Pnd_gr_trace,-5}, |
{"nd_f4_trace",Pnd_f4_trace,-5}, |
{"nd_f4_trace",Pnd_f4_trace,-5}, |
{"nd_gr_postproc",Pnd_gr_postproc,5}, |
{"nd_gr_postproc",Pnd_gr_postproc,5}, |
Line 286 struct ftab dp_supp_tab[] = { |
|
Line 293 struct ftab dp_supp_tab[] = { |
|
{"dpm_dtol",Pdpm_dtol,2}, |
{"dpm_dtol",Pdpm_dtol,2}, |
{"dpm_homo",Pdpm_homo,1}, |
{"dpm_homo",Pdpm_homo,1}, |
{"dpm_dehomo",Pdpm_dehomo,1}, |
{"dpm_dehomo",Pdpm_dehomo,1}, |
|
{"dpm_mod",Pdpm_mod,2}, |
|
|
/* criteria */ |
/* criteria */ |
{"dp_cri1",Pdp_cri1,2}, |
{"dp_cri1",Pdp_cri1,2}, |
Line 308 struct ftab dp_supp_tab[] = { |
|
Line 316 struct ftab dp_supp_tab[] = { |
|
{"dpm_rest",Pdpm_rest,1}, |
{"dpm_rest",Pdpm_rest,1}, |
{"dpm_shift",Pdpm_shift,2}, |
{"dpm_shift",Pdpm_shift,2}, |
{"dpm_split",Pdpm_split,2}, |
{"dpm_split",Pdpm_split,2}, |
|
{"dpm_extract",Pdpm_extract,2}, |
{"dpm_sort",Pdpm_sort,1}, |
{"dpm_sort",Pdpm_sort,1}, |
{"dp_rest",Pdp_rest,1}, |
{"dp_rest",Pdp_rest,1}, |
{"dp_initial_term",Pdp_initial_term,1}, |
{"dp_initial_term",Pdp_initial_term,1}, |
Line 821 void Pdp_cont(NODE arg,Z *rp) |
|
Line 830 void Pdp_cont(NODE arg,Z *rp) |
|
dp_cont((DP)ARG0(arg),rp); |
dp_cont((DP)ARG0(arg),rp); |
} |
} |
|
|
|
void dpm_ptozp(DPM p,Z *cont,DPM *r); |
|
|
|
void Pdpm_remove_cont(NODE arg,LIST *rp) |
|
{ |
|
NODE nd; |
|
Z cont; |
|
DPM p; |
|
|
|
dpm_ptozp((DPM)ARG0(arg),&cont,&p); |
|
nd = mknode(2,cont,p); |
|
MKLIST(*rp,nd); |
|
} |
|
|
void Pdp_dtov(NODE arg,VECT *rp) |
void Pdp_dtov(NODE arg,VECT *rp) |
{ |
{ |
dp_dtov((DP)ARG0(arg),rp); |
dp_dtov((DP)ARG0(arg),rp); |
Line 1118 void Pdpm_dptodpm(NODE arg,DPM *rp) |
|
Line 1140 void Pdpm_dptodpm(NODE arg,DPM *rp) |
|
for ( m0 = 0, mp = BDY(p); mp; mp = NEXT(mp) ) { |
for ( m0 = 0, mp = BDY(p); mp; mp = NEXT(mp) ) { |
NEXTDMM(m0,m); m->dl = mp->dl; m->c = mp->c; m->pos = pos; |
NEXTDMM(m0,m); m->dl = mp->dl; m->c = mp->c; m->pos = pos; |
} |
} |
if ( dp_current_spec->module_rank ) { |
if ( dp_current_spec->module_top_weight ) { |
if ( pos > dp_current_spec->module_rank ) |
if ( pos > dp_current_spec->module_rank ) |
error("dpm_dptodpm : inconsistent order spec"); |
error("dpm_dptodpm : inconsistent order spec"); |
shift = dp_current_spec->module_top_weight[pos-1]; |
shift = dp_current_spec->module_top_weight[pos-1]; |
Line 1276 void Pdp_mod(NODE arg,DP *rp) |
|
Line 1298 void Pdp_mod(NODE arg,DP *rp) |
|
dp_mod(p,mod,subst,rp); |
dp_mod(p,mod,subst,rp); |
} |
} |
|
|
|
void dpm_mod(DPM,int,DPM *); |
|
|
|
void Pdpm_mod(NODE arg,DPM *rp) |
|
{ |
|
DPM p; |
|
int mod; |
|
NODE subst; |
|
|
|
asir_assert(ARG0(arg),O_DP,"dp_mod"); |
|
asir_assert(ARG1(arg),O_N,"dp_mod"); |
|
p = (DPM)ARG0(arg); mod = ZTOS((Q)ARG1(arg)); |
|
dpm_mod(p,mod,rp); |
|
} |
|
|
|
|
void Pdp_rat(NODE arg,DP *rp) |
void Pdp_rat(NODE arg,DP *rp) |
{ |
{ |
asir_assert(ARG0(arg),O_DP,"dp_rat"); |
asir_assert(ARG0(arg),O_DP,"dp_rat"); |
Line 1949 void Pdpm_list_to_array(NODE arg,LIST *rp) |
|
Line 1986 void Pdpm_list_to_array(NODE arg,LIST *rp) |
|
MKLIST(*rp,nd); |
MKLIST(*rp,nd); |
} |
} |
|
|
/* [quo,nf] = dpm_sp_nf(psv,psiv,i,j) */ |
/* [quo,nf] = dpm_sp_nf(psv,psiv,i,j,top) */ |
DPM dpm_sp_nf_zlist(VECT psv,VECT psiv,int i,int j,DPM *nf); |
DPM dpm_sp_nf_zlist(VECT psv,VECT psiv,int i,int j,int top,DPM *nf); |
|
|
void Pdpm_sp_nf(NODE arg,LIST *rp) |
void Pdpm_sp_nf(NODE arg,LIST *rp) |
{ |
{ |
VECT psv,psiv; |
VECT psv,psiv; |
DPM quo,nf; |
DPM quo,nf; |
int i,j; |
Obj val; |
|
int i,j,top; |
NODE nd; |
NODE nd; |
|
|
asir_assert(ARG0(arg),O_VECT,"dpm_sp_nf"); psv = (VECT)ARG0(arg); |
asir_assert(ARG0(arg),O_VECT,"dpm_sp_nf"); psv = (VECT)ARG0(arg); |
asir_assert(ARG1(arg),O_VECT,"dpm_sp_nf"); psiv = (VECT)ARG1(arg); |
asir_assert(ARG1(arg),O_VECT,"dpm_sp_nf"); psiv = (VECT)ARG1(arg); |
asir_assert(ARG2(arg),O_N,"dpm_sp_nf"); i = ZTOS((Q)ARG2(arg)); |
asir_assert(ARG2(arg),O_N,"dpm_sp_nf"); i = ZTOS((Q)ARG2(arg)); |
asir_assert(ARG3(arg),O_N,"dpm_sp_nf"); j = ZTOS((Q)ARG3(arg)); |
asir_assert(ARG3(arg),O_N,"dpm_sp_nf"); j = ZTOS((Q)ARG3(arg)); |
quo = dpm_sp_nf_zlist(psv,psiv,i,j,&nf); |
if ( get_opt("top",&val) && val ) |
|
top = 1; |
|
else |
|
top = 0; |
|
quo = dpm_sp_nf_zlist(psv,psiv,i,j,top,&nf); |
nd = mknode(2,quo,nf); |
nd = mknode(2,quo,nf); |
MKLIST(*rp,nd); |
MKLIST(*rp,nd); |
} |
} |
Line 2987 void Pnd_gr(NODE arg,LIST *rp) |
|
Line 3029 void Pnd_gr(NODE arg,LIST *rp) |
|
nd_gr(f,v,m,homo,retdp,0,ord,rp); |
nd_gr(f,v,m,homo,retdp,0,ord,rp); |
} |
} |
|
|
|
void nd_sba(LIST f,LIST v,int m,int homo,int retdp,int f4,struct order_spec *ord,LIST *rp); |
|
|
|
void Pnd_sba(NODE arg,LIST *rp) |
|
{ |
|
LIST f,v; |
|
int m,homo,retdp,ac; |
|
Obj val; |
|
Z mq,z; |
|
Num nhomo; |
|
NODE node; |
|
struct order_spec *ord; |
|
|
|
do_weyl = 0; |
|
retdp = 0; |
|
if ( (ac=argc(arg)) == 4 ) { |
|
asir_assert(ARG0(arg),O_LIST,"nd_sba"); |
|
asir_assert(ARG1(arg),O_LIST,"nd_sba"); |
|
asir_assert(ARG2(arg),O_N,"nd_sba"); |
|
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
|
f = remove_zero_from_list(f); |
|
if ( !BDY(f) ) { |
|
*rp = f; return; |
|
} |
|
mq = (Z)ARG2(arg); |
|
STOZ(0x40000000,z); |
|
if ( cmpz(mq,z) >= 0 ) { |
|
node = mknode(1,mq); |
|
Psetmod_ff(node,&val); |
|
m = -2; |
|
} else |
|
m = ZTOS(mq); |
|
create_order_spec(0,ARG3(arg),&ord); |
|
homo = 0; |
|
if ( get_opt("homo",&val) && val ) homo = 1; |
|
if ( get_opt("dp",&val) && val ) retdp = 1; |
|
} else if ( ac == 1 ) { |
|
f = (LIST)ARG0(arg); |
|
parse_gr_option(f,current_option,&v,&nhomo,&m,&ord); |
|
homo = ZTOS((Q)nhomo); |
|
if ( get_opt("dp",&val) && val ) retdp = 1; |
|
} else |
|
error("nd_gr : invalid argument"); |
|
nd_sba(f,v,m,homo,retdp,0,ord,rp); |
|
} |
|
|
|
void Pnd_weyl_sba(NODE arg,LIST *rp) |
|
{ |
|
LIST f,v; |
|
int m,homo,retdp,ac; |
|
Obj val; |
|
Z mq,z; |
|
Num nhomo; |
|
NODE node; |
|
struct order_spec *ord; |
|
|
|
do_weyl = 1; |
|
retdp = 0; |
|
if ( (ac=argc(arg)) == 4 ) { |
|
asir_assert(ARG0(arg),O_LIST,"nd_sba"); |
|
asir_assert(ARG1(arg),O_LIST,"nd_sba"); |
|
asir_assert(ARG2(arg),O_N,"nd_sba"); |
|
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
|
f = remove_zero_from_list(f); |
|
if ( !BDY(f) ) { |
|
*rp = f; do_weyl = 0; return; |
|
} |
|
mq = (Z)ARG2(arg); |
|
STOZ(0x40000000,z); |
|
if ( cmpz(mq,z) >= 0 ) { |
|
node = mknode(1,mq); |
|
Psetmod_ff(node,&val); |
|
m = -2; |
|
} else |
|
m = ZTOS(mq); |
|
create_order_spec(0,ARG3(arg),&ord); |
|
homo = 0; |
|
if ( get_opt("homo",&val) && val ) homo = 1; |
|
if ( get_opt("dp",&val) && val ) retdp = 1; |
|
} else if ( ac == 1 ) { |
|
f = (LIST)ARG0(arg); |
|
parse_gr_option(f,current_option,&v,&nhomo,&m,&ord); |
|
homo = ZTOS((Q)nhomo); |
|
if ( get_opt("dp",&val) && val ) retdp = 1; |
|
} else |
|
error("nd_gr : invalid argument"); |
|
nd_sba(f,v,m,homo,retdp,0,ord,rp); |
|
do_weyl = 0; |
|
} |
|
|
|
void Pnd_sba_f4(NODE arg,LIST *rp) |
|
{ |
|
LIST f,v; |
|
int m,homo,retdp,ac; |
|
Obj val; |
|
Z mq,z; |
|
Num nhomo; |
|
NODE node; |
|
struct order_spec *ord; |
|
|
|
do_weyl = 0; |
|
retdp = 0; |
|
if ( (ac=argc(arg)) == 4 ) { |
|
asir_assert(ARG0(arg),O_LIST,"nd_sba"); |
|
asir_assert(ARG1(arg),O_LIST,"nd_sba"); |
|
asir_assert(ARG2(arg),O_N,"nd_sba"); |
|
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
|
f = remove_zero_from_list(f); |
|
if ( !BDY(f) ) { |
|
*rp = f; return; |
|
} |
|
mq = (Z)ARG2(arg); |
|
STOZ(0x40000000,z); |
|
if ( cmpz(mq,z) >= 0 ) { |
|
node = mknode(1,mq); |
|
Psetmod_ff(node,&val); |
|
m = -2; |
|
} else |
|
m = ZTOS(mq); |
|
create_order_spec(0,ARG3(arg),&ord); |
|
homo = 0; |
|
if ( get_opt("homo",&val) && val ) homo = 1; |
|
if ( get_opt("dp",&val) && val ) retdp = 1; |
|
} else if ( ac == 1 ) { |
|
f = (LIST)ARG0(arg); |
|
parse_gr_option(f,current_option,&v,&nhomo,&m,&ord); |
|
homo = ZTOS((Q)nhomo); |
|
if ( get_opt("dp",&val) && val ) retdp = 1; |
|
} else |
|
error("nd_gr : invalid argument"); |
|
nd_sba(f,v,m,homo,retdp,1,ord,rp); |
|
} |
|
|
void Pnd_gr_postproc(NODE arg,LIST *rp) |
void Pnd_gr_postproc(NODE arg,LIST *rp) |
{ |
{ |
LIST f,v; |
LIST f,v; |
Line 4063 void Pdpm_set_schreyer(NODE arg,LIST *rp) |
|
Line 4237 void Pdpm_set_schreyer(NODE arg,LIST *rp) |
|
} |
} |
|
|
DMMstack_array Schreyer_Frame; |
DMMstack_array Schreyer_Frame; |
DMMstack_array dpm_schreyer_frame(NODE n); |
DMMstack_array dpm_schreyer_frame(NODE n,int lex); |
void set_schreyer_level(DMMstack_array array,int level); |
void set_schreyer_level(DMMstack_array array,int level); |
|
|
void Pdpm_set_schreyer_level(NODE arg,Q *rp) |
void Pdpm_set_schreyer_level(NODE arg,Q *rp) |
Line 4076 void Pdpm_schreyer_frame(NODE arg,LIST *rp) |
|
Line 4250 void Pdpm_schreyer_frame(NODE arg,LIST *rp) |
|
{ |
{ |
DMMstack_array a; |
DMMstack_array a; |
DMMstack *body; |
DMMstack *body; |
NODE b,b1; |
DMM *in,*sum; |
|
DPM f,s; |
|
NODE b,b1,nd; |
LIST l; |
LIST l; |
int len,i; |
VECT v; |
|
Z lev,deg,ind; |
|
int len,i,nv,rank,j,lex; |
|
NODE tt,p; |
|
char *key; |
|
Obj value; |
|
|
Schreyer_Frame = a = dpm_schreyer_frame(BDY((LIST)ARG0(arg))); |
lex = 0; |
|
if ( current_option ) { |
|
for ( tt = current_option; tt; tt = NEXT(tt) ) { |
|
p = BDY((LIST)BDY(tt)); |
|
key = BDY((STRING)BDY(p)); |
|
value = (Obj)BDY(NEXT(p)); |
|
if ( !strcmp(key,"lex") ) |
|
lex = value!=0?1:0; |
|
else { |
|
error("dpm_schreyer_frame: unknown option."); |
|
} |
|
} |
|
} |
|
Schreyer_Frame = a = dpm_schreyer_frame(BDY((LIST)ARG0(arg)),lex); |
len = a->len; |
len = a->len; |
body = a->body; |
body = a->body; |
|
/* XXX */ |
|
nv = ((DPM)BDY(BDY((LIST)body[0]->obj)))->nv; |
b = 0; |
b = 0; |
for ( i = 0; i < len; i++ ) { |
for ( i = 0; i < len; i++ ) { |
MKNODE(b1,(pointer)body[i]->obj,b); |
rank = body[i]->rank; |
|
in = body[i]->in; |
|
sum = body[i]->sum; |
|
MKVECT(v,rank+1); |
|
STOZ(i+1,lev); |
|
for ( j = 1; j <= rank; j++ ) { |
|
MKDPM(nv,in[j],f); f->sugar = in[j]->dl->td; |
|
MKDPM(nv,sum[j],s);s->sugar = sum[j]->dl->td; |
|
STOZ(s->sugar,deg); |
|
STOZ(j,ind); |
|
nd = mknode(5,f,s,ind,lev,deg); |
|
MKLIST(l,nd); |
|
BDY(v)[j] = (pointer)l; |
|
} |
|
MKNODE(b1,(pointer)v,b); |
b = b1; |
b = b1; |
} |
} |
MKLIST(l,b); |
MKLIST(l,b); |
Line 4151 void Pdpm_sort(NODE arg,DPM *rp) |
|
Line 4361 void Pdpm_sort(NODE arg,DPM *rp) |
|
|
|
p = (DPM)ARG0(arg); |
p = (DPM)ARG0(arg); |
if ( !p ) *rp = 0; |
if ( !p ) *rp = 0; |
dpm_sort(p,rp); |
else dpm_sort(p,rp); |
} |
} |
|
|
void dpm_split(DPM p,int s,DPM *up,DPM *lo); |
void dpm_split(DPM p,int s,DPM *up,DPM *lo); |
|
void dpm_extract(DPM p,int s,DP *r); |
|
|
void Pdpm_split(NODE arg,LIST *rp) |
void Pdpm_split(NODE arg,LIST *rp) |
{ |
{ |
Line 4167 void Pdpm_split(NODE arg,LIST *rp) |
|
Line 4378 void Pdpm_split(NODE arg,LIST *rp) |
|
dpm_split(p,s,&up,&lo); |
dpm_split(p,s,&up,&lo); |
nd = mknode(2,up,lo); |
nd = mknode(2,up,lo); |
MKLIST(*rp,nd); |
MKLIST(*rp,nd); |
|
} |
|
|
|
void Pdpm_extract(NODE arg,DP *rp) |
|
{ |
|
DPM p; |
|
int s; |
|
|
|
p = (DPM)ARG0(arg); |
|
s = ZTOS((Z)ARG1(arg)); |
|
dpm_extract(p,s,rp); |
} |
} |
|
|
|
|