version 1.17, 2019/08/28 23:27:34 |
version 1.22, 2019/11/21 01:54:01 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.16 2019/08/21 00:37:47 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.21 2019/09/19 06:29:48 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 8 struct oEGT eg_search,f4_symb,f4_conv,f4_elim1,f4_elim |
|
Line 8 struct oEGT eg_search,f4_symb,f4_conv,f4_elim1,f4_elim |
|
int diag_period = 6; |
int diag_period = 6; |
int weight_check = 1; |
int weight_check = 1; |
int (*ndl_compare_function)(UINT *a1,UINT *a2); |
int (*ndl_compare_function)(UINT *a1,UINT *a2); |
|
/* for general module order */ |
|
int (*ndl_base_compare_function)(UINT *a1,UINT *a2); |
|
int (*dl_base_compare_function)(int nv,DL a,DL b); |
|
int nd_base_ordtype; |
int nd_dcomp; |
int nd_dcomp; |
int nd_rref2; |
int nd_rref2; |
NM _nm_free_list; |
NM _nm_free_list; |
Line 55 static int nd_worb_len; |
|
Line 59 static int nd_worb_len; |
|
static int nd_found,nd_create,nd_notfirst; |
static int nd_found,nd_create,nd_notfirst; |
static int nmv_adv; |
static int nmv_adv; |
static int nd_demand; |
static int nd_demand; |
static int nd_module,nd_ispot,nd_mpos,nd_pot_nelim; |
static int nd_module,nd_module_ordtype,nd_mpos,nd_pot_nelim; |
static int nd_module_rank,nd_poly_weight_len; |
static int nd_module_rank,nd_poly_weight_len; |
static int *nd_poly_weight,*nd_module_weight; |
static int *nd_poly_weight,*nd_module_weight; |
static NODE nd_tracelist; |
static NODE nd_tracelist; |
Line 476 int ndl_weight(UINT *d) |
|
Line 480 int ndl_weight(UINT *d) |
|
for ( j = 0; j < nd_epw; j++, u>>=nd_bpe ) |
for ( j = 0; j < nd_epw; j++, u>>=nd_bpe ) |
t += (u&nd_mask0); |
t += (u&nd_mask0); |
} |
} |
if ( nd_module && current_module_weight_vector && MPOS(d) ) |
if ( nd_module && nd_module_rank && MPOS(d) ) |
t += current_module_weight_vector[MPOS(d)]; |
t += nd_module_weight[MPOS(d)-1]; |
|
for ( i = nd_exporigin; i < nd_wpd; i++ ) |
|
if ( d[i] && !t ) |
|
printf("afo\n"); |
return t; |
return t; |
} |
} |
|
|
Line 492 int ndl_weight2(UINT *d) |
|
Line 499 int ndl_weight2(UINT *d) |
|
u = GET_EXP(d,i); |
u = GET_EXP(d,i); |
t += nd_sugarweight[i]*u; |
t += nd_sugarweight[i]*u; |
} |
} |
if ( nd_module && current_module_weight_vector && MPOS(d) ) |
if ( nd_module && nd_module_rank && MPOS(d) ) |
t += current_module_weight_vector[MPOS(d)]; |
t += nd_module_weight[MPOS(d)-1]; |
return t; |
return t; |
} |
} |
|
|
Line 521 void ndl_weight_mask(UINT *d) |
|
Line 528 void ndl_weight_mask(UINT *d) |
|
} |
} |
} |
} |
|
|
|
int ndl_glex_compare(UINT *d1,UINT *d2) |
|
{ |
|
if ( TD(d1) > TD(d2) ) return 1; |
|
else if ( TD(d1) < TD(d2) ) return -1; |
|
else return ndl_lex_compare(d1,d2); |
|
} |
|
|
int ndl_lex_compare(UINT *d1,UINT *d2) |
int ndl_lex_compare(UINT *d1,UINT *d2) |
{ |
{ |
int i; |
int i; |
Line 690 int ndl_ww_lex_compare(UINT *d1,UINT *d2) |
|
Line 704 int ndl_ww_lex_compare(UINT *d1,UINT *d2) |
|
return ndl_lex_compare(d1,d2); |
return ndl_lex_compare(d1,d2); |
} |
} |
|
|
int ndl_module_weight_compare(UINT *d1,UINT *d2) |
// common function for module glex and grlex comparison |
|
int ndl_module_glex_compare(UINT *d1,UINT *d2) |
{ |
{ |
int s,j; |
int c; |
|
|
if ( nd_nvar != nd_poly_weight_len ) |
switch ( nd_module_ordtype ) { |
error("invalid module weight : the length of polynomial weight != the number of variables"); |
case 0: |
s = 0; |
if ( TD(d1) > TD(d2) ) return 1; |
for ( j = 0; j < nd_nvar; j++ ) |
else if ( TD(d1) < TD(d2) ) return -1; |
s += (GET_EXP(d1,j)-GET_EXP(d2,j))*nd_poly_weight[j]; |
else if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
if ( MPOS(d1) >= 1 && MPOS(d2) >= 1 ) { |
else if ( MPOS(d1) < MPOS(d2) ) return 1; |
s += nd_module_weight[MPOS(d1)-1]-nd_module_weight[MPOS(d2)-1]; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
} |
else return 0; |
if ( s > 0 ) return 1; |
break; |
else if ( s < 0 ) return -1; |
|
else return 0; |
|
} |
|
|
|
int ndl_module_grlex_compare(UINT *d1,UINT *d2) |
case 1: |
{ |
if ( nd_pot_nelim && MPOS(d1)>=nd_pot_nelim+1 && MPOS(d2) >= nd_pot_nelim+1 ) { |
int i,c; |
if ( TD(d1) > TD(d2) ) return 1; |
|
else if ( TD(d1) < TD(d2) ) return -1; |
|
if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
else if ( TD(d1) > TD(d2) ) return 1; |
|
else if ( TD(d1) < TD(d2) ) return -1; |
|
else return ndl_lex_compare(d1,d2); |
|
break; |
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
case 2: // weight -> POT |
if ( nd_ispot ) { |
if ( TD(d1) > TD(d2) ) return 1; |
if ( nd_pot_nelim && MPOS(d1)>=nd_pot_nelim+1 && MPOS(d2) >= nd_pot_nelim+1 ) { |
else if ( TD(d1) < TD(d2) ) return -1; |
if ( TD(d1) > TD(d2) ) return 1; |
else if ( MPOS(d1) < MPOS(d2) ) return 1; |
else if ( TD(d1) < TD(d2) ) return -1; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
else return ndl_lex_compare(d1,d2); |
if ( MPOS(d1) < MPOS(d2) ) return 1; |
break; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
return 0; |
|
} |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
if ( TD(d1) > TD(d2) ) return 1; |
|
else if ( TD(d1) < TD(d2) ) return -1; |
|
if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
|
if ( !nd_ispot ) { |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
return 0; |
|
} |
|
|
|
int ndl_module_glex_compare(UINT *d1,UINT *d2) |
default: |
{ |
error("ndl_module_glex_compare : invalid module_ordtype"); |
int i,c; |
} |
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
|
if ( nd_ispot ) { |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
if ( TD(d1) > TD(d2) ) return 1; |
|
else if ( TD(d1) < TD(d2) ) return -1; |
|
if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
|
if ( !nd_ispot ) { |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
return 0; |
|
} |
} |
|
|
int ndl_module_lex_compare(UINT *d1,UINT *d2) |
// common for module comparison |
|
int ndl_module_compare(UINT *d1,UINT *d2) |
{ |
{ |
int i,c; |
int c; |
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
switch ( nd_module_ordtype ) { |
if ( nd_ispot ) { |
case 0: |
if ( MPOS(d1) < MPOS(d2) ) return 1; |
if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
} |
else if ( MPOS(d1) < MPOS(d2) ) return 1; |
if ( (c = ndl_lex_compare(d1,d2)) != 0 ) return c; |
else return 0; |
if ( !nd_ispot ) { |
break; |
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
return 0; |
|
} |
|
|
|
int ndl_module_block_compare(UINT *d1,UINT *d2) |
case 1: |
{ |
if ( MPOS(d1) < MPOS(d2) ) return 1; |
int i,c; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
else return (*ndl_base_compare_function)(d1,d2); |
|
break; |
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
case 2: // weight -> POT |
if ( nd_ispot ) { |
if ( TD(d1) > TD(d2) ) return 1; |
if ( MPOS(d1) < MPOS(d2) ) return 1; |
else if ( TD(d1) < TD(d2) ) return -1; |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
else if ( MPOS(d1) < MPOS(d2) ) return 1; |
} |
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
if ( (c = ndl_block_compare(d1,d2)) != 0 ) return c; |
else return (*ndl_base_compare_function)(d1,d2); |
if ( !nd_ispot ) { |
break; |
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
return 0; |
|
} |
|
|
|
int ndl_module_matrix_compare(UINT *d1,UINT *d2) |
default: |
{ |
error("ndl_module_compare : invalid module_ordtype"); |
int i,c; |
} |
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
|
if ( nd_ispot ) { |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
if ( (c = ndl_matrix_compare(d1,d2)) != 0 ) return c; |
|
if ( !nd_ispot ) { |
|
if ( MPOS(d1) < MPOS(d2) ) return 1; |
|
else if ( MPOS(d1) > MPOS(d2) ) return -1; |
|
} |
|
return 0; |
|
} |
} |
|
|
int ndl_module_composite_compare(UINT *d1,UINT *d2) |
extern DMMstack dmm_stack; |
|
void _addtodl(int n,DL d1,DL d2); |
|
int _eqdl(int n,DL d1,DL d2); |
|
|
|
int ndl_module_schreyer_compare(UINT *m1,UINT *m2) |
{ |
{ |
int i,c; |
int pos1,pos2,t,j; |
|
DMM *in; |
|
DMMstack s; |
|
static DL d1=0; |
|
static DL d2=0; |
|
static int dlen=0; |
|
|
if ( nd_module_rank && (c = ndl_module_weight_compare(d1,d2)) ) return c; |
pos1 = MPOS(m1); pos2 = MPOS(m2); |
if ( nd_ispot ) { |
if ( pos1 == pos2 ) return (*ndl_base_compare_function)(m1,m2); |
if ( MPOS(d1) > MPOS(d2) ) return 1; |
if ( nd_nvar > dlen ) { |
else if ( MPOS(d1) < MPOS(d2) ) return -1; |
NEWDL(d1,nd_nvar); |
|
NEWDL(d2,nd_nvar); |
|
dlen = nd_nvar; |
|
} |
|
d1->td = TD(m1); |
|
for ( j = 0; j < nd_nvar; j++ ) d1->d[j] = GET_EXP(m1,j); |
|
d2->td = TD(m2); |
|
for ( j = 0; j < nd_nvar; j++ ) d2->d[j] = GET_EXP(m2,j); |
|
for ( s = dmm_stack; s; s = NEXT(s) ) { |
|
in = s->in; |
|
_addtodl(nd_nvar,in[pos1]->dl,d1); |
|
_addtodl(nd_nvar,in[pos2]->dl,d2); |
|
if ( in[pos1]->pos == in[pos2]->pos && _eqdl(nd_nvar,d1,d2)) { |
|
if ( pos1 < pos2 ) return 1; |
|
else if ( pos1 > pos2 ) return -1; |
|
else return 0; |
} |
} |
if ( (c = ndl_composite_compare(d1,d2)) != 0 ) return c; |
pos1 = in[pos1]->pos; |
if ( !nd_ispot ) { |
pos2 = in[pos2]->pos; |
if ( MPOS(d1) > MPOS(d2) ) return 1; |
if ( pos1 == pos2 ) return (*dl_base_compare_function)(nd_nvar,d1,d2); |
else if ( MPOS(d1) < MPOS(d2) ) return -1; |
} |
} |
// comparison by the bottom order |
return 0; |
LAST: |
|
switch ( nd_base_ordtype ) { |
|
case 0: |
|
t = (*dl_base_compare_function)(nd_nvar,d1,d2); |
|
if ( t ) return t; |
|
else if ( pos1 < pos2 ) return 1; |
|
else if ( pos1 > pos2 ) return -1; |
|
else return 0; |
|
break; |
|
case 1: |
|
if ( pos1 < pos2 ) return 1; |
|
else if ( pos1 > pos2 ) return -1; |
|
else return (*dl_base_compare_function)(nd_nvar,d1,d2); |
|
break; |
|
case 2: |
|
if ( d1->td > d2->td ) return 1; |
|
else if ( d1->td < d2->td ) return -1; |
|
else if ( pos1 < pos2 ) return 1; |
|
else if ( pos1 > pos2 ) return -1; |
|
else return (*dl_base_compare_function)(nd_nvar,d1,d2); |
|
break; |
|
default: |
|
error("ndl_schreyer_compare : invalid base ordtype"); |
|
} |
} |
} |
|
|
INLINE int ndl_equal(UINT *d1,UINT *d2) |
INLINE int ndl_equal(UINT *d1,UINT *d2) |
Line 4482 UINT *nd_compute_bound(ND p) |
|
Line 4504 UINT *nd_compute_bound(ND p) |
|
int nd_get_exporigin(struct order_spec *ord) |
int nd_get_exporigin(struct order_spec *ord) |
{ |
{ |
switch ( ord->id ) { |
switch ( ord->id ) { |
case 0: case 2: case 256: case 258: |
case 0: case 2: case 256: case 258: case 300: |
return 1+nd_module; |
return 1+nd_module; |
case 1: case 257: |
case 1: case 257: |
/* block order */ |
/* block order */ |
Line 5514 void dpm_sort(DPM p,DPM *rp) |
|
Line 5536 void dpm_sort(DPM p,DPM *rp) |
|
*rp = d; |
*rp = d; |
} |
} |
|
|
|
int dpm_comp(DPM *a,DPM *b) |
|
{ |
|
return -compdpm(CO,*a,*b); |
|
} |
|
|
|
NODE dpm_sort_list(NODE l) |
|
{ |
|
int i,len; |
|
NODE t,t1; |
|
DPM *a; |
|
|
|
len = length(l); |
|
a = (DPM *)MALLOC(len*sizeof(DPM)); |
|
for ( t = l, i = 0; i < len; i++, t = NEXT(t) ) a[i] = (DPM)BDY(t); |
|
qsort(a,len,sizeof(DPM),(int (*)(const void *,const void *))dpm_comp); |
|
t = 0; |
|
for ( i = len-1; i >= 0; i-- ) { |
|
MKNODE(t1,(pointer)a[i],t); t = t1; |
|
} |
|
return t; |
|
} |
|
|
|
int nmv_comp(NMV a,NMV b) |
|
{ |
|
int t; |
|
t = DL_COMPARE(a->dl,b->dl); |
|
return -t; |
|
} |
|
|
NDV dpmtondv(int mod,DPM p) |
NDV dpmtondv(int mod,DPM p) |
{ |
{ |
NDV d; |
NDV d; |
Line 5538 NDV dpmtondv(int mod,DPM p) |
|
Line 5589 NDV dpmtondv(int mod,DPM p) |
|
for ( i = 0; i < len; i++, NMV_ADV(m) ) { |
for ( i = 0; i < len; i++, NMV_ADV(m) ) { |
dltondl(n,a[i]->dl,DL(m)); |
dltondl(n,a[i]->dl,DL(m)); |
MPOS(DL(m)) = a[i]->pos; |
MPOS(DL(m)) = a[i]->pos; |
|
TD(DL(m)) = ndl_weight(DL(m)); |
CZ(m) = (Z)a[i]->c; |
CZ(m) = (Z)a[i]->c; |
} |
} |
|
qsort(m0,len,nmv_adv,(int (*)(const void *,const void *))nmv_comp); |
MKNDV(NV(p),m0,len,d); |
MKNDV(NV(p),m0,len,d); |
SG(d) = SG(p); |
SG(d) = SG(p); |
return d; |
return d; |
Line 5697 NODE ndv_reducebase(NODE x,int *perm) |
|
Line 5750 NODE ndv_reducebase(NODE x,int *perm) |
|
|
|
/* XXX incomplete */ |
/* XXX incomplete */ |
|
|
extern int dpm_ordtype; |
extern DMMstack dmm_stack; |
|
int ndl_module_schreyer_compare(UINT *a,UINT *b); |
|
|
void nd_init_ord(struct order_spec *ord) |
void nd_init_ord(struct order_spec *ord) |
{ |
{ |
nd_module = (ord->id >= 256); |
nd_module = (ord->id >= 256); |
if ( nd_module ) { |
if ( nd_module ) { |
nd_dcomp = -1; |
nd_dcomp = -1; |
nd_ispot = ord->ispot; |
nd_module_ordtype = ord->module_ordtype; |
nd_pot_nelim = ord->pot_nelim; |
nd_pot_nelim = ord->pot_nelim; |
nd_poly_weight_len = ord->nv; |
nd_poly_weight_len = ord->nv; |
nd_poly_weight = ord->top_weight; |
nd_poly_weight = ord->top_weight; |
nd_module_rank = ord->module_rank; |
nd_module_rank = ord->module_rank; |
nd_module_weight = ord->module_top_weight; |
nd_module_weight = ord->module_top_weight; |
dpm_ordtype = ord->ispot; |
|
} |
} |
nd_matrix = 0; |
nd_matrix = 0; |
nd_matrix_len = 0; |
nd_matrix_len = 0; |
Line 5769 void nd_init_ord(struct order_spec *ord) |
|
Line 5822 void nd_init_ord(struct order_spec *ord) |
|
case 256: |
case 256: |
switch ( ord->ord.simple ) { |
switch ( ord->ord.simple ) { |
case 0: |
case 0: |
|
nd_dcomp = 0; |
nd_isrlex = 1; |
nd_isrlex = 1; |
ndl_compare_function = ndl_module_grlex_compare; |
ndl_compare_function = ndl_module_glex_compare; |
break; |
break; |
case 1: |
case 1: |
|
nd_dcomp = 0; |
nd_isrlex = 0; |
nd_isrlex = 0; |
ndl_compare_function = ndl_module_glex_compare; |
ndl_compare_function = ndl_module_glex_compare; |
break; |
break; |
case 2: |
case 2: |
|
nd_dcomp = 0; |
nd_isrlex = 0; |
nd_isrlex = 0; |
ndl_compare_function = ndl_module_lex_compare; |
ndl_compare_function = ndl_module_compare; |
|
ndl_base_compare_function = ndl_lex_compare; |
break; |
break; |
default: |
default: |
error("nd_gr : unsupported order"); |
error("nd_init_ord : unsupported order"); |
} |
} |
break; |
break; |
case 257: |
case 257: |
/* block order */ |
/* block order */ |
nd_isrlex = 0; |
nd_isrlex = 0; |
ndl_compare_function = ndl_module_block_compare; |
ndl_compare_function = ndl_module_compare; |
|
ndl_base_compare_function = ndl_block_compare; |
break; |
break; |
case 258: |
case 258: |
/* matrix order */ |
/* matrix order */ |
nd_isrlex = 0; |
nd_isrlex = 0; |
nd_matrix_len = ord->ord.matrix.row; |
nd_matrix_len = ord->ord.matrix.row; |
nd_matrix = ord->ord.matrix.matrix; |
nd_matrix = ord->ord.matrix.matrix; |
ndl_compare_function = ndl_module_matrix_compare; |
ndl_compare_function = ndl_module_compare; |
|
ndl_base_compare_function = ndl_matrix_compare; |
break; |
break; |
case 259: |
case 259: |
/* composite order */ |
/* composite order */ |
nd_isrlex = 0; |
nd_isrlex = 0; |
nd_worb_len = ord->ord.composite.length; |
nd_worb_len = ord->ord.composite.length; |
nd_worb = ord->ord.composite.w_or_b; |
nd_worb = ord->ord.composite.w_or_b; |
ndl_compare_function = ndl_module_composite_compare; |
ndl_compare_function = ndl_module_compare; |
|
ndl_base_compare_function = ndl_composite_compare; |
break; |
break; |
|
case 300: |
|
/* schreyer order */ |
|
if ( ord->base->id != 256 ) |
|
error("nd_init_ord : unsupported base order"); |
|
ndl_compare_function = ndl_module_schreyer_compare; |
|
dmm_stack = ord->dmmstack; |
|
switch ( ord->base->ord.simple ) { |
|
case 0: |
|
nd_isrlex = 1; |
|
ndl_base_compare_function = ndl_glex_compare; |
|
dl_base_compare_function = cmpdl_revgradlex; |
|
break; |
|
case 1: |
|
nd_isrlex = 0; |
|
ndl_base_compare_function = ndl_glex_compare; |
|
dl_base_compare_function = cmpdl_gradlex; |
|
break; |
|
case 2: |
|
nd_isrlex = 0; |
|
ndl_base_compare_function = ndl_lex_compare; |
|
dl_base_compare_function = cmpdl_lex; |
|
break; |
|
default: |
|
error("nd_init_ord : unsupported order"); |
|
} |
|
break; |
} |
} |
nd_ord = ord; |
nd_ord = ord; |
} |
} |
Line 5838 EPOS nd_create_epos(struct order_spec *ord) |
|
Line 5924 EPOS nd_create_epos(struct order_spec *ord) |
|
|
|
epos = (EPOS)MALLOC_ATOMIC(nd_nvar*sizeof(struct oEPOS)); |
epos = (EPOS)MALLOC_ATOMIC(nd_nvar*sizeof(struct oEPOS)); |
switch ( ord->id ) { |
switch ( ord->id ) { |
case 0: case 256: |
case 0: case 256: case 300: |
if ( nd_isrlex ) { |
if ( nd_isrlex ) { |
for ( i = 0; i < nd_nvar; i++ ) { |
for ( i = 0; i < nd_nvar; i++ ) { |
epos[i].i = nd_exporigin + (nd_nvar-1-i)/nd_epw; |
epos[i].i = nd_exporigin + (nd_nvar-1-i)/nd_epw; |
Line 7841 int ndv_ishomo(NDV p) |
|
Line 7927 int ndv_ishomo(NDV p) |
|
h = TD(DL(m)); |
h = TD(DL(m)); |
NMV_ADV(m); |
NMV_ADV(m); |
for ( len--; len; len--, NMV_ADV(m) ) |
for ( len--; len; len--, NMV_ADV(m) ) |
if ( TD(DL(m)) != h ) return 0; |
if ( TD(DL(m)) != h ) { |
|
return 0; |
|
} |
return 1; |
return 1; |
} |
} |
|
|