version 1.9, 2003/07/25 09:04:47 |
version 1.10, 2003/07/25 14:48:16 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.9 2003/07/25 09:04:47 noro Exp $ */ |
|
|
#include "ca.h" |
#include "ca.h" |
#include "inline.h" |
#include "inline.h" |
Line 1022 int nd_nf(ND g,int full,ND *rp) |
|
Line 1022 int nd_nf(ND g,int full,ND *rp) |
|
ND p,d; |
ND p,d; |
NM m,mrd,tail; |
NM m,mrd,tail; |
NM mul; |
NM mul; |
int n,sugar,psugar,stat,index; |
int n,sugar,psugar,sugar0,stat,index; |
int c,c1,c2; |
int c,c1,c2; |
#if USE_NDV |
#if USE_NDV |
NDV red; |
NDV red; |
Line 1034 int nd_nf(ND g,int full,ND *rp) |
|
Line 1034 int nd_nf(ND g,int full,ND *rp) |
|
*rp = 0; |
*rp = 0; |
return 1; |
return 1; |
} |
} |
sugar = g->sugar; |
sugar0 = sugar = g->sugar; |
n = NV(g); |
n = NV(g); |
mul = (NM)ALLOCA(sizeof(struct oNM)+(nd_wpd-1)*sizeof(unsigned int)); |
mul = (NM)ALLOCA(sizeof(struct oNM)+(nd_wpd-1)*sizeof(unsigned int)); |
for ( d = 0; g; ) { |
for ( d = 0; g; ) { |
Line 1043 int nd_nf(ND g,int full,ND *rp) |
|
Line 1043 int nd_nf(ND g,int full,ND *rp) |
|
p = nd_ps[index]; |
p = nd_ps[index]; |
ndl_sub(HDL(g),HDL(p),mul->dl); |
ndl_sub(HDL(g),HDL(p),mul->dl); |
mul->td = HTD(g)-HTD(p); |
mul->td = HTD(g)-HTD(p); |
|
#if 0 |
|
if ( d && (p->sugar+mul->td) > sugar ) { |
|
goto afo; |
|
} |
|
#endif |
if ( ndl_check_bound2(index,mul->dl) ) { |
if ( ndl_check_bound2(index,mul->dl) ) { |
nd_free(g); nd_free(d); |
nd_free(g); nd_free(d); |
return 0; |
return 0; |
Line 1062 int nd_nf(ND g,int full,ND *rp) |
|
Line 1067 int nd_nf(ND g,int full,ND *rp) |
|
*rp = g; |
*rp = g; |
return 1; |
return 1; |
} else { |
} else { |
|
afo: |
m = BDY(g); |
m = BDY(g); |
if ( NEXT(m) ) { |
if ( NEXT(m) ) { |
BDY(g) = NEXT(m); NEXT(m) = 0; |
BDY(g) = NEXT(m); NEXT(m) = 0; |
Line 1544 ND_pairs nd_minp( ND_pairs d, ND_pairs *prest ) |
|
Line 1550 ND_pairs nd_minp( ND_pairs d, ND_pairs *prest ) |
|
c = ndl_compare(p->lcm,lcm); |
c = ndl_compare(p->lcm,lcm); |
if ( c < 0 ) |
if ( c < 0 ) |
goto find; |
goto find; |
|
#if 0 |
else if ( c == 0 ) { |
else if ( c == 0 ) { |
tlen = nd_psl[p->i1]+nd_psl[p->i2]; |
tlen = nd_psl[p->i1]+nd_psl[p->i2]; |
if ( tlen < len ) |
if ( tlen < len ) |
goto find; |
goto find; |
} |
} |
|
#endif |
} |
} |
} |
} |
continue; |
continue; |