version 1.224, 2016/03/31 01:40:10 |
version 1.231, 2016/12/05 10:29:14 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.223 2015/08/14 13:51:54 fujimoto Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.230 2016/12/02 02:12:00 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 64 static int nd_gentrace,nd_gensyz,nd_nora,nd_newelim,nd |
|
Line 64 static int nd_gentrace,nd_gensyz,nd_nora,nd_newelim,nd |
|
static int *nd_gbblock; |
static int *nd_gbblock; |
static NODE nd_nzlist,nd_check_splist; |
static NODE nd_nzlist,nd_check_splist; |
static int nd_splist; |
static int nd_splist; |
|
static int *nd_sugarweight; |
|
|
NumberField get_numberfield(); |
NumberField get_numberfield(); |
UINT *nd_det_compute_bound(NDV **dm,int n,int j); |
UINT *nd_det_compute_bound(NDV **dm,int n,int j); |
Line 93 ND ndgztond(ND p); |
|
Line 94 ND ndgztond(ND p); |
|
void Pdp_set_weight(NODE,VECT *); |
void Pdp_set_weight(NODE,VECT *); |
void Pox_cmo_rpc(NODE,Obj *); |
void Pox_cmo_rpc(NODE,Obj *); |
|
|
extern int Denominator,DP_Multiple; |
extern int Denominator,DP_Multiple,MaxDeg; |
|
|
#define BLEN (8*sizeof(unsigned long)) |
#define BLEN (8*sizeof(unsigned long)) |
|
|
Line 173 INLINE int nd_length(ND p) |
|
Line 174 INLINE int nd_length(ND p) |
|
} |
} |
} |
} |
|
|
|
extern int dp_negative_weight; |
|
|
INLINE int ndl_reducible(UINT *d1,UINT *d2) |
INLINE int ndl_reducible(UINT *d1,UINT *d2) |
{ |
{ |
UINT u1,u2; |
UINT u1,u2; |
Line 180 INLINE int ndl_reducible(UINT *d1,UINT *d2) |
|
Line 183 INLINE int ndl_reducible(UINT *d1,UINT *d2) |
|
|
|
if ( nd_module && (MPOS(d1) != MPOS(d2)) ) return 0; |
if ( nd_module && (MPOS(d1) != MPOS(d2)) ) return 0; |
|
|
if ( TD(d1) < TD(d2) ) return 0; |
if ( !dp_negative_weight && TD(d1) < TD(d2) ) return 0; |
#if USE_UNROLL |
#if USE_UNROLL |
switch ( nd_bpe ) { |
switch ( nd_bpe ) { |
case 3: |
case 3: |
Line 459 int ndl_weight(UINT *d) |
|
Line 462 int ndl_weight(UINT *d) |
|
return t; |
return t; |
} |
} |
|
|
|
/* for sugarweight */ |
|
|
|
int ndl_weight2(UINT *d) |
|
{ |
|
int t,u; |
|
int i,j; |
|
|
|
for ( i = 0, t = 0; i < nd_nvar; i++ ) { |
|
u = GET_EXP(d,i); |
|
t += nd_sugarweight[i]*u; |
|
} |
|
if ( nd_module && current_module_weight_vector && MPOS(d) ) |
|
t += current_module_weight_vector[MPOS(d)]; |
|
return t; |
|
} |
|
|
void ndl_weight_mask(UINT *d) |
void ndl_weight_mask(UINT *d) |
{ |
{ |
UINT t,u; |
UINT t,u; |
Line 658 int ndl_module_weight_compare(UINT *d1,UINT *d2) |
|
Line 677 int ndl_module_weight_compare(UINT *d1,UINT *d2) |
|
s = 0; |
s = 0; |
for ( j = 0; j < nd_nvar; j++ ) |
for ( j = 0; j < nd_nvar; j++ ) |
s += (GET_EXP(d1,j)-GET_EXP(d2,j))*nd_poly_weight[j]; |
s += (GET_EXP(d1,j)-GET_EXP(d2,j))*nd_poly_weight[j]; |
s += nd_module_weight[MPOS(d1)-1]-nd_module_weight[MPOS(d2)-1]; |
if ( MPOS(d1) >= 1 && MPOS(d2) >= 1 ) { |
|
s += nd_module_weight[MPOS(d1)-1]-nd_module_weight[MPOS(d2)-1]; |
|
} |
if ( s > 0 ) return 1; |
if ( s > 0 ) return 1; |
else if ( s < 0 ) return -1; |
else if ( s < 0 ) return -1; |
else return 0; |
else return 0; |
Line 668 int ndl_module_grlex_compare(UINT *d1,UINT *d2) |
|
Line 689 int ndl_module_grlex_compare(UINT *d1,UINT *d2) |
|
{ |
{ |
int i,c; |
int i,c; |
|
|
if ( !MPOS(d1) || !MPOS(d2) ) { |
|
printf("afo\n"); |
|
} |
|
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
if ( nd_ispot ) { |
if ( nd_ispot ) { |
if ( nd_pot_nelim && MPOS(d1)>=nd_pot_nelim+1 && MPOS(d2) >= nd_pot_nelim+1 ) { |
if ( nd_pot_nelim && MPOS(d1)>=nd_pot_nelim+1 && MPOS(d2) >= nd_pot_nelim+1 ) { |
Line 2007 NODE nd_gb(int m,int ishomo,int checkonly,int gensyz,i |
|
Line 2024 NODE nd_gb(int m,int ishomo,int checkonly,int gensyz,i |
|
while ( d ) { |
while ( d ) { |
again: |
again: |
l = nd_minp(d,&d); |
l = nd_minp(d,&d); |
|
if ( MaxDeg > 0 && SG(l) > MaxDeg ) break; |
if ( SG(l) != sugar ) { |
if ( SG(l) != sugar ) { |
if ( ishomo ) { |
if ( ishomo ) { |
diag_count = 0; |
diag_count = 0; |
Line 2265 NODE nd_gb_trace(int m,int ishomo,int **indp) |
|
Line 2283 NODE nd_gb_trace(int m,int ishomo,int **indp) |
|
while ( d ) { |
while ( d ) { |
again: |
again: |
l = nd_minp(d,&d); |
l = nd_minp(d,&d); |
|
if ( MaxDeg > 0 && SG(l) > MaxDeg ) break; |
if ( SG(l) != sugar ) { |
if ( SG(l) != sugar ) { |
#if 1 |
#if 1 |
if ( ishomo ) { |
if ( ishomo ) { |
|
|
FREENDP(l); |
FREENDP(l); |
} |
} |
if ( nd_nalg ) { |
if ( nd_nalg ) { |
print_eg("monic",&eg_monic); |
if ( DP_Print ) { |
print_eg("invdalg",&eg_invdalg); |
print_eg("monic",&eg_monic); |
print_eg("le",&eg_le); |
print_eg("invdalg",&eg_invdalg); |
|
print_eg("le",&eg_le); |
|
} |
} |
} |
conv_ilist(nd_demand,1,g,indp); |
conv_ilist(nd_demand,1,g,indp); |
if ( DP_Print ) { printf("nd_gb_trace done.\n"); fflush(stdout); } |
if ( DP_Print ) { printf("nd_gb_trace done.\n"); fflush(stdout); } |
Line 2530 ND_pairs nd_newpairs( NODE g, int t ) |
|
Line 2551 ND_pairs nd_newpairs( NODE g, int t ) |
|
ndl_lcm(DL(nd_psh[r->i1]),dl,r->lcm); |
ndl_lcm(DL(nd_psh[r->i1]),dl,r->lcm); |
s = SG(nd_psh[r->i1])-TD(DL(nd_psh[r->i1])); |
s = SG(nd_psh[r->i1])-TD(DL(nd_psh[r->i1])); |
SG(r) = MAX(s,ts) + TD(LCM(r)); |
SG(r) = MAX(s,ts) + TD(LCM(r)); |
|
/* experimental */ |
|
if ( nd_sugarweight ) |
|
r->sugar2 = ndl_weight2(r->lcm); |
} |
} |
if ( r0 ) NEXT(r) = 0; |
if ( r0 ) NEXT(r) = 0; |
return r0; |
return r0; |
} |
} |
|
|
|
/* ipair = [i1,i2],[i1,i2],... */ |
|
ND_pairs nd_ipairtospair(NODE ipair) |
|
{ |
|
int s1,s2; |
|
NODE tn,t; |
|
ND_pairs r,r0; |
|
|
|
for ( r0 = 0, t = ipair; t; t = NEXT(t) ) { |
|
NEXTND_pairs(r0,r); |
|
tn = BDY((LIST)BDY(t)); |
|
r->i1 = QTOS((Q)ARG0(tn)); |
|
r->i2 = QTOS((Q)ARG1(tn)); |
|
ndl_lcm(DL(nd_psh[r->i1]),DL(nd_psh[r->i2]),r->lcm); |
|
s1 = SG(nd_psh[r->i1])-TD(DL(nd_psh[r->i1])); |
|
s2 = SG(nd_psh[r->i2])-TD(DL(nd_psh[r->i2])); |
|
SG(r) = MAX(s1,s2) + TD(LCM(r)); |
|
/* experimental */ |
|
if ( nd_sugarweight ) |
|
r->sugar2 = ndl_weight2(r->lcm); |
|
} |
|
if ( r0 ) NEXT(r) = 0; |
|
return r0; |
|
} |
|
|
/* kokokara */ |
/* kokokara */ |
|
|
ND_pairs crit_B( ND_pairs d, int s ) |
ND_pairs crit_B( ND_pairs d, int s ) |
Line 2715 ND_pairs nd_minp( ND_pairs d, ND_pairs *prest ) |
|
Line 2763 ND_pairs nd_minp( ND_pairs d, ND_pairs *prest ) |
|
NEXT(m) = 0; |
NEXT(m) = 0; |
return m; |
return m; |
} |
} |
s = SG(m); |
|
if ( !NoSugar ) { |
if ( !NoSugar ) { |
for ( ml = 0, l = m; p; p = NEXT(l = p) ) |
if ( nd_sugarweight ) { |
if ( (SG(p) < s) |
s = m->sugar2; |
|| ((SG(p) == s) && (DL_COMPARE(LCM(p),LCM(m)) < 0)) ) { |
for ( ml = 0, l = m; p; p = NEXT(l = p) ) |
ml = l; m = p; s = SG(m); |
if ( (p->sugar2 < s) |
} |
|| ((p->sugar2 == s) && (DL_COMPARE(LCM(p),LCM(m)) < 0)) ) { |
|
ml = l; m = p; s = m->sugar2; |
|
} |
|
} else { |
|
s = SG(m); |
|
for ( ml = 0, l = m; p; p = NEXT(l = p) ) |
|
if ( (SG(p) < s) |
|
|| ((SG(p) == s) && (DL_COMPARE(LCM(p),LCM(m)) < 0)) ) { |
|
ml = l; m = p; s = SG(m); |
|
} |
|
} |
} else { |
} else { |
for ( ml = 0, l = m; p; p = NEXT(l = p) ) |
for ( ml = 0, l = m; p; p = NEXT(l = p) ) |
if ( DL_COMPARE(LCM(p),LCM(m)) < 0 ) { |
if ( DL_COMPARE(LCM(p),LCM(m)) < 0 ) { |
Line 2742 ND_pairs nd_minsugarp( ND_pairs d, ND_pairs *prest ) |
|
Line 2799 ND_pairs nd_minsugarp( ND_pairs d, ND_pairs *prest ) |
|
int msugar,i; |
int msugar,i; |
ND_pairs t,dm0,dm,dr0,dr; |
ND_pairs t,dm0,dm,dr0,dr; |
|
|
for ( msugar = SG(d), t = NEXT(d); t; t = NEXT(t) ) |
if ( nd_sugarweight ) { |
if ( SG(t) < msugar ) msugar = SG(t); |
for ( msugar = d->sugar2, t = NEXT(d); t; t = NEXT(t) ) |
dm0 = 0; dr0 = 0; |
if ( t->sugar2 < msugar ) msugar = t->sugar2; |
for ( i = 0, t = d; t; t = NEXT(t) ) |
dm0 = 0; dr0 = 0; |
if ( i < nd_f4_nsp && SG(t) == msugar ) { |
for ( i = 0, t = d; t; t = NEXT(t) ) |
if ( dm0 ) NEXT(dm) = t; |
if ( i < nd_f4_nsp && t->sugar2 == msugar ) { |
else dm0 = t; |
if ( dm0 ) NEXT(dm) = t; |
dm = t; |
else dm0 = t; |
i++; |
dm = t; |
} else { |
i++; |
if ( dr0 ) NEXT(dr) = t; |
} else { |
else dr0 = t; |
if ( dr0 ) NEXT(dr) = t; |
dr = t; |
else dr0 = t; |
} |
dr = t; |
|
} |
|
} else { |
|
for ( msugar = SG(d), t = NEXT(d); t; t = NEXT(t) ) |
|
if ( SG(t) < msugar ) msugar = SG(t); |
|
dm0 = 0; dr0 = 0; |
|
for ( i = 0, t = d; t; t = NEXT(t) ) |
|
if ( i < nd_f4_nsp && SG(t) == msugar ) { |
|
if ( dm0 ) NEXT(dm) = t; |
|
else dm0 = t; |
|
dm = t; |
|
i++; |
|
} else { |
|
if ( dr0 ) NEXT(dr) = t; |
|
else dr0 = t; |
|
dr = t; |
|
} |
|
} |
NEXT(dm) = 0; |
NEXT(dm) = 0; |
if ( dr0 ) NEXT(dr) = 0; |
if ( dr0 ) NEXT(dr) = 0; |
*prest = dr0; |
*prest = dr0; |
Line 3050 void nd_gr(LIST f,LIST v,int m,int homo,int retdp,int |
|
Line 3124 void nd_gr(LIST f,LIST v,int m,int homo,int retdp,int |
|
ndv_alloc = 0; |
ndv_alloc = 0; |
#endif |
#endif |
get_vars((Obj)f,&fv); pltovl(v,&vv); vlminus(fv,vv,&nd_vc); |
get_vars((Obj)f,&fv); pltovl(v,&vv); vlminus(fv,vv,&nd_vc); |
|
if ( m && nd_vc ) |
|
error("nd_{gr,f4} : computation over Fp(X) is unsupported. Use dp_gr_mod_main()."); |
for ( nvar = 0, tv = vv; tv; tv = NEXT(tv), nvar++ ); |
for ( nvar = 0, tv = vv; tv; tv = NEXT(tv), nvar++ ); |
switch ( ord->id ) { |
switch ( ord->id ) { |
case 1: |
case 1: |
Line 3564 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
Line 3640 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
for ( t = fd0; t; t = NEXT(t) ) |
for ( t = fd0; t; t = NEXT(t) ) |
ndv_homogenize((NDV)BDY(t),obpe,oadv,oepos,ompos); |
ndv_homogenize((NDV)BDY(t),obpe,oadv,oepos,ompos); |
} |
} |
|
if ( MaxDeg > 0 ) nocheck = 1; |
while ( 1 ) { |
while ( 1 ) { |
tl1 = tl2 = tl3 = tl4 = 0; |
tl1 = tl2 = tl3 = tl4 = 0; |
if ( Demand ) |
if ( Demand ) |
Line 6177 NODE nd_f4(int m,int **indp) |
|
Line 6254 NODE nd_f4(int m,int **indp) |
|
ND spol,red; |
ND spol,red; |
NDV nf,redv; |
NDV nf,redv; |
NM s0,s; |
NM s0,s; |
NODE rp0,srp0,nflist,nzlist; |
NODE rp0,srp0,nflist,nzlist,nzlist_t; |
int nsp,nred,col,rank,len,k,j,a,i1s,i2s; |
int nsp,nred,col,rank,len,k,j,a,i1s,i2s; |
UINT c; |
UINT c; |
UINT **spmat; |
UINT **spmat; |
Line 6195 NODE nd_f4(int m,int **indp) |
|
Line 6272 NODE nd_f4(int m,int **indp) |
|
#endif |
#endif |
g = 0; d = 0; |
g = 0; d = 0; |
for ( i = 0; i < nd_psn; i++ ) { |
for ( i = 0; i < nd_psn; i++ ) { |
d = update_pairs(d,g,i,0); |
if ( !nd_nzlist ) d = update_pairs(d,g,i,0); |
g = update_base(g,i); |
g = update_base(g,i); |
} |
} |
nzlist = 0; |
nzlist = 0; |
while ( d ) { |
nzlist_t = nd_nzlist; |
|
while ( d || nzlist_t ) { |
get_eg(&eg0); |
get_eg(&eg0); |
l = nd_minsugarp(d,&d); |
|
sugar = SG(l); |
|
if ( nd_nzlist ) { |
if ( nd_nzlist ) { |
for ( tn = nd_nzlist; tn; tn = NEXT(tn) ) { |
node = BDY((LIST)BDY(nzlist_t)); |
node = BDY((LIST)BDY(tn)); |
sugar = ARG0(node); |
if ( QTOS((Q)ARG0(node)) == sugar ) break; |
tn = BDY((LIST)ARG1(node)); |
|
if ( !tn ) { |
|
nzlist_t = NEXT(nzlist_t); |
|
continue; |
} |
} |
if ( tn ) { |
/* tn = [[i1,i2],...] */ |
for ( t = l, ll0 = 0; t; t = NEXT(t) ) { |
l = nd_ipairtospair(tn); |
for ( tn = BDY((LIST)ARG1(node)); tn; tn = NEXT(tn) ) { |
} else { |
i1s = QTOS((Q)ARG0(BDY((LIST)BDY(tn)))); |
l = nd_minsugarp(d,&d); |
i2s = QTOS((Q)ARG1(BDY((LIST)BDY(tn)))); |
sugar = nd_sugarweight?l->sugar2:SG(l); |
if ( t->i1 == i1s && t->i2 == i2s ) break; |
if ( MaxDeg > 0 && sugar > MaxDeg ) break; |
} |
|
if ( tn ) { |
|
if ( !ll0 ) ll0 = t; |
|
else NEXT(ll) = t; |
|
ll = t; |
|
} |
|
} |
|
if ( ll0 ) NEXT(ll) = 0; |
|
l = ll0; |
|
} else l = 0; |
|
} |
} |
bucket = create_pbucket(); |
bucket = create_pbucket(); |
stat = nd_sp_f4(m,0,l,bucket); |
stat = nd_sp_f4(m,0,l,bucket); |
if ( !stat ) { |
if ( !stat ) { |
for ( t = l; NEXT(t); t = NEXT(t) ); |
if ( !nd_nzlist ) { |
NEXT(t) = d; d = l; |
for ( t = l; NEXT(t); t = NEXT(t) ); |
d = nd_reconstruct(0,d); |
NEXT(t) = d; d = l; |
|
d = nd_reconstruct(0,d); |
|
} |
continue; |
continue; |
} |
} |
if ( bucket->m < 0 ) continue; |
if ( bucket->m < 0 ) continue; |
Line 6259 NODE nd_f4(int m,int **indp) |
|
Line 6330 NODE nd_f4(int m,int **indp) |
|
nf = ndtondv(m,nf1); |
nf = ndtondv(m,nf1); |
} |
} |
nh = ndv_newps(m,nf,0,1); |
nh = ndv_newps(m,nf,0,1); |
d = update_pairs(d,g,nh,0); |
if ( !nd_nzlist ) d = update_pairs(d,g,nh,0); |
g = update_base(g,nh); |
g = update_base(g,nh); |
} |
} |
if ( nd_gentrace ) { |
if ( nd_gentrace ) { |
Line 6273 NODE nd_f4(int m,int **indp) |
|
Line 6344 NODE nd_f4(int m,int **indp) |
|
STOQ(sugar,sugarq); node = mknode(2,sugarq,l0); MKLIST(l1,node); |
STOQ(sugar,sugarq); node = mknode(2,sugarq,l0); MKLIST(l1,node); |
MKNODE(node,l1,nzlist); nzlist = node; |
MKNODE(node,l1,nzlist); nzlist = node; |
} |
} |
|
if ( nd_nzlist ) nzlist_t = NEXT(nzlist_t); |
} |
} |
if ( nd_gentrace ) { |
if ( nd_gentrace ) { |
MKLIST(l0,reverse_node(nzlist)); |
MKLIST(l0,reverse_node(nzlist)); |
Line 6315 NODE nd_f4_trace(int m,int **indp) |
|
Line 6387 NODE nd_f4_trace(int m,int **indp) |
|
get_eg(&eg0); |
get_eg(&eg0); |
l = nd_minsugarp(d,&d); |
l = nd_minsugarp(d,&d); |
sugar = SG(l); |
sugar = SG(l); |
|
if ( MaxDeg > 0 && sugar > MaxDeg ) break; |
bucket = create_pbucket(); |
bucket = create_pbucket(); |
stat = nd_sp_f4(m,0,l,bucket); |
stat = nd_sp_f4(m,0,l,bucket); |
if ( !stat ) { |
if ( !stat ) { |
Line 6624 init_eg(&eg_search); |
|
Line 6697 init_eg(&eg_search); |
|
} |
} |
} |
} |
mat->row = i; |
mat->row = i; |
fprintf(asir_out,"%dx%d,",mat->row,mat->col); fflush(asir_out); |
if ( DP_Print ) { |
|
fprintf(asir_out,"%dx%d,",mat->row,mat->col); fflush(asir_out); |
|
} |
size = ((col+BLEN-1)/BLEN)*sizeof(unsigned long); |
size = ((col+BLEN-1)/BLEN)*sizeof(unsigned long); |
v = CALLOC((col+BLEN-1)/BLEN,sizeof(unsigned long)); |
v = CALLOC((col+BLEN-1)/BLEN,sizeof(unsigned long)); |
for ( rp = rp0, i = 0; rp; rp = NEXT(rp), i++ ) { |
for ( rp = rp0, i = 0; rp; rp = NEXT(rp), i++ ) { |
Line 6678 init_eg(&eg_search); |
|
Line 6753 init_eg(&eg_search); |
|
for ( i = 0; i < col; i++ ) rhead[i] = 0; |
for ( i = 0; i < col; i++ ) rhead[i] = 0; |
|
|
/* construction of index arrays */ |
/* construction of index arrays */ |
fprintf(stderr,"%dx%d,",nsp+nred,col); |
if ( DP_Print ) { |
|
fprintf(stderr,"%dx%d,",nsp+nred,col); |
|
} |
rvect = (NM_ind_pair *)ALLOCA(nred*sizeof(NM_ind_pair)); |
rvect = (NM_ind_pair *)ALLOCA(nred*sizeof(NM_ind_pair)); |
s0hash = (int *)ALLOCA(col*sizeof(int)); |
s0hash = (int *)ALLOCA(col*sizeof(int)); |
for ( i = 0, s = s0vect; i < col; i++, s += nd_wpd ) |
for ( i = 0, s = s0vect; i < col; i++, s += nd_wpd ) |
Line 6692 init_eg(&eg_search); |
|
Line 6769 init_eg(&eg_search); |
|
r0 = nd_f4_red_main(m,sp0,nsp,s0vect,col,rvect,rhead,imat,nred,nz); |
r0 = nd_f4_red_main(m,sp0,nsp,s0vect,col,rvect,rhead,imat,nred,nz); |
else |
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); |
print_eg("search",&eg_search); |
if ( DP_Print ) print_eg("search",&eg_search); |
return r0; |
return r0; |
} |
} |
|
|
Line 8049 void conv_ilist(int demand,int trace,NODE g,int **indp |
|
Line 8126 void conv_ilist(int demand,int trace,NODE g,int **indp |
|
void parse_nd_option(NODE opt) |
void parse_nd_option(NODE opt) |
{ |
{ |
NODE t,p,u; |
NODE t,p,u; |
int i,s; |
int i,s,n; |
char *key; |
char *key; |
Obj value; |
Obj value; |
|
|
nd_gentrace = 0; nd_gensyz = 0; nd_nora = 0; nd_gbblock = 0; |
nd_gentrace = 0; nd_gensyz = 0; nd_nora = 0; nd_gbblock = 0; |
nd_newelim = 0; nd_intersect = 0; nd_nzlist = 0; |
nd_newelim = 0; nd_intersect = 0; nd_nzlist = 0; |
nd_splist = 0; nd_check_splist = 0; |
nd_splist = 0; nd_check_splist = 0; |
|
nd_sugarweight = 0; |
|
|
for ( t = opt; t; t = NEXT(t) ) { |
for ( t = opt; t; t = NEXT(t) ) { |
p = BDY((LIST)BDY(t)); |
p = BDY((LIST)BDY(t)); |
key = BDY((STRING)BDY(p)); |
key = BDY((STRING)BDY(p)); |
Line 8089 void parse_nd_option(NODE opt) |
|
Line 8168 void parse_nd_option(NODE opt) |
|
nd_splist = value?1:0; |
nd_splist = value?1:0; |
else if ( !strcmp(key,"check_splist") ) { |
else if ( !strcmp(key,"check_splist") ) { |
nd_check_splist = BDY((LIST)value); |
nd_check_splist = BDY((LIST)value); |
|
} else if ( !strcmp(key,"sugarweight") ) { |
|
nd_sugarweight = BDY((LIST)value); |
|
u = BDY((LIST)value); |
|
n = length(u); |
|
nd_sugarweight = MALLOC(n*sizeof(int)); |
|
for ( i = 0; i < n; i++, u = NEXT(u) ) |
|
nd_sugarweight[i] = QTOS((Q)BDY(u)); |
} |
} |
} |
} |
} |
} |