version 1.157, 2009/01/04 05:44:51 |
version 1.158, 2009/01/04 10:02:00 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.156 2008/05/23 01:24:21 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.157 2009/01/04 05:44:51 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 2895 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
Line 2895 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
P p,zp; |
P p,zp; |
Q dmy; |
Q dmy; |
EPOS oepos; |
EPOS oepos; |
int obpe,oadv,wmax,i,len,cbpe,ishomo,nalg; |
int obpe,oadv,wmax,i,len,cbpe,ishomo,nalg,mrank,trank; |
Alg alpha,dp; |
Alg alpha,dp; |
P poly; |
P poly; |
LIST f1,f2; |
LIST f1,f2,zpl; |
Obj obj; |
Obj obj; |
NumberField nf; |
NumberField nf; |
struct order_spec *ord1; |
struct order_spec *ord1; |
Line 2942 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
Line 2942 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
nocheck = 1; |
nocheck = 1; |
} |
} |
m = trace > 1 ? trace : get_lprime(mindex); |
m = trace > 1 ? trace : get_lprime(mindex); |
|
nd_init_ord(ord); |
|
mrank = 0; |
for ( t = BDY(f), max = 0; t; t = NEXT(t) ) |
for ( t = BDY(f), max = 0; t; t = NEXT(t) ) |
for ( tv = vv; tv; tv = NEXT(tv) ) { |
for ( tv = vv; tv; tv = NEXT(tv) ) { |
e = getdeg(tv->v,(P)BDY(t)); |
if ( nd_module ) { |
max = MAX(e,max); |
s = BDY((LIST)BDY(t)); |
|
trank = length(s); |
|
mrank = MAX(mrank,trank); |
|
for ( ; s; s = NEXT(s) ) { |
|
e = getdeg(tv->v,(P)BDY(s)); |
|
max = MAX(e,max); |
|
} |
|
} else { |
|
e = getdeg(tv->v,(P)BDY(t)); |
|
max = MAX(e,max); |
|
} |
} |
} |
nd_init_ord(ord); |
|
nd_setup_parameters(nvar,max); |
nd_setup_parameters(nvar,max); |
obpe = nd_bpe; oadv = nmv_adv; oepos = nd_epos; |
obpe = nd_bpe; oadv = nmv_adv; oepos = nd_epos; |
ishomo = 1; |
ishomo = 1; |
for ( in0 = 0, fd0 = 0, t = BDY(f); t; t = NEXT(t) ) { |
for ( in0 = 0, fd0 = 0, t = BDY(f); t; t = NEXT(t) ) { |
ptozp((P)BDY(t),1,&dmy,&zp); |
if ( nd_module ) { |
c = (pointer)ptondv(CO,vv,zp); |
pltozpl((LIST)BDY(t),&dmy,&zpl); |
|
c = (pointer)pltondv(CO,vv,zpl); |
|
} else { |
|
ptozp((P)BDY(t),1,&dmy,&zp); |
|
c = (pointer)ptondv(CO,vv,zp); |
|
} |
if ( ishomo ) |
if ( ishomo ) |
ishomo = ishomo && ndv_ishomo(c); |
ishomo = ishomo && ndv_ishomo(c); |
if ( c ) { |
if ( c ) { |
Line 3024 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
Line 3040 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
/* dp->p */ |
/* dp->p */ |
nd_bpe = cbpe; |
nd_bpe = cbpe; |
nd_setup_parameters(nd_nvar,0); |
nd_setup_parameters(nd_nvar,0); |
for ( r = cand; r; r = NEXT(r) ) |
for ( r = cand; r; r = NEXT(r) ) { |
BDY(r) = (pointer)ndvtop(0,CO,vv,BDY(r)); |
if ( nd_module ) BDY(r) = ndvtopl(0,CO,vv,BDY(r),mrank); |
|
else BDY(r) = (pointer)ndvtop(0,CO,vv,BDY(r)); |
|
} |
if ( nalg ) |
if ( nalg ) |
cand = postprocess_algcoef(av,alist,cand); |
cand = postprocess_algcoef(av,alist,cand); |
MKLIST(*rp,cand); |
MKLIST(*rp,cand); |