version 1.142, 2006/08/09 02:43:38 |
version 1.144, 2006/08/26 03:09:55 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.141 2006/06/17 10:12:06 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.143 2006/08/09 02:48:49 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 1548 int do_diagonalize(int sugar,int m) |
|
Line 1548 int do_diagonalize(int sugar,int m) |
|
Q q,num,den; |
Q q,num,den; |
union oNDC dn; |
union oNDC dn; |
|
|
for ( i = nd_psn-1; i >= 0; i-- ) { |
for ( i = nd_psn-1; i >= 0 && SG(nd_psh[i]) == sugar; i-- ) { |
if ( SG(nd_psh[i]) != sugar ) continue; |
|
if ( nd_demand ) |
if ( nd_demand ) |
nfv = ndv_load(i); |
nfv = ndv_load(i); |
else |
else |
Line 1677 int do_diagonalize_trace(int sugar,int m) |
|
Line 1676 int do_diagonalize_trace(int sugar,int m) |
|
Q q,den,num; |
Q q,den,num; |
union oNDC dn; |
union oNDC dn; |
|
|
for ( i = nd_psn-1; i >= 0; i-- ) { |
for ( i = nd_psn-1; i >= 0 && SG(nd_psh[i]) == sugar; i-- ) { |
if ( SG(nd_psh[i]) != sugar ) continue; |
|
/* for nd_ps */ |
/* for nd_ps */ |
s = ndvtond(m,nd_ps[i]); |
s = ndvtond(m,nd_ps[i]); |
s = nd_separate_head(s,&head); |
s = nd_separate_head(s,&head); |
Line 2378 void nd_gr(LIST f,LIST v,int m,int f4,struct order_spe |
|
Line 2376 void nd_gr(LIST f,LIST v,int m,int f4,struct order_spe |
|
NDV b; |
NDV b; |
int ishomo,nalg; |
int ishomo,nalg; |
Alg alpha,dp; |
Alg alpha,dp; |
P p; |
P p,zp; |
|
Q dmy; |
LIST f1,f2; |
LIST f1,f2; |
Obj obj; |
Obj obj; |
NumberField nf; |
NumberField nf; |
Line 2424 void nd_gr(LIST f,LIST v,int m,int f4,struct order_spe |
|
Line 2423 void nd_gr(LIST f,LIST v,int m,int f4,struct order_spe |
|
nd_setup_parameters(nvar,max); |
nd_setup_parameters(nvar,max); |
ishomo = 1; |
ishomo = 1; |
for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) { |
for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) { |
b = (pointer)ptondv(CO,vv,(P)BDY(t)); |
ptozp((P)BDY(t),1,&dmy,&zp); |
|
b = (pointer)ptondv(CO,vv,zp); |
if ( ishomo ) |
if ( ishomo ) |
ishomo = ishomo && ndv_ishomo(b); |
ishomo = ishomo && ndv_ishomo(b); |
if ( m ) ndv_mod(m,b); |
if ( m ) ndv_mod(m,b); |
Line 2457 void nd_gr_postproc(LIST f,LIST v,int m,struct order_s |
|
Line 2457 void nd_gr_postproc(LIST f,LIST v,int m,struct order_s |
|
NDV b; |
NDV b; |
int ishomo,nalg; |
int ishomo,nalg; |
Alg alpha,dp; |
Alg alpha,dp; |
P p; |
P p,zp; |
|
Q dmy; |
LIST f1,f2; |
LIST f1,f2; |
Obj obj; |
Obj obj; |
NumberField nf; |
NumberField nf; |
Line 2497 void nd_gr_postproc(LIST f,LIST v,int m,struct order_s |
|
Line 2498 void nd_gr_postproc(LIST f,LIST v,int m,struct order_s |
|
nd_setup_parameters(nvar,max); |
nd_setup_parameters(nvar,max); |
ishomo = 1; |
ishomo = 1; |
for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) { |
for ( fd0 = 0, t = BDY(f); t; t = NEXT(t) ) { |
b = (pointer)ptondv(CO,vv,(P)BDY(t)); |
ptozp((P)BDY(t),1,&dmy,&zp); |
|
b = (pointer)ptondv(CO,vv,zp); |
if ( ishomo ) |
if ( ishomo ) |
ishomo = ishomo && ndv_ishomo(b); |
ishomo = ishomo && ndv_ishomo(b); |
if ( m ) ndv_mod(m,b); |
if ( m ) ndv_mod(m,b); |
Line 2536 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
Line 2538 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
int m,nocheck,nvar,mindex,e,max; |
int m,nocheck,nvar,mindex,e,max; |
NDV c; |
NDV c; |
NMV a; |
NMV a; |
P p; |
P p,zp; |
|
Q dmy; |
EPOS oepos; |
EPOS oepos; |
int obpe,oadv,wmax,i,len,cbpe,ishomo,nalg; |
int obpe,oadv,wmax,i,len,cbpe,ishomo,nalg; |
Alg alpha,dp; |
Alg alpha,dp; |
Line 2591 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
Line 2594 void nd_gr_trace(LIST f,LIST v,int trace,int homo,int |
|
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) ) { |
c = ptondv(CO,vv,(P)BDY(t)); |
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 ) { |