version 1.129, 2006/04/17 04:35:20 |
version 1.130, 2006/05/30 07:35:31 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.128 2005/08/03 06:10:47 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/engine/nd.c,v 1.129 2006/04/17 04:35:20 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 1707 int do_diagonalize_trace(int sugar,int m) |
|
Line 1707 int do_diagonalize_trace(int sugar,int m) |
|
|
|
static struct oEGT eg_invdalg; |
static struct oEGT eg_invdalg; |
struct oEGT eg_le; |
struct oEGT eg_le; |
|
int diag_period = 6; |
|
|
NODE nd_gb_trace(int m,int ishomo) |
NODE nd_gb_trace(int m,int ishomo) |
{ |
{ |
Line 1719 NODE nd_gb_trace(int m,int ishomo) |
|
Line 1720 NODE nd_gb_trace(int m,int ishomo) |
|
Q q,den,num; |
Q q,den,num; |
union oNDC dn; |
union oNDC dn; |
struct oEGT eg_monic,egm0,egm1; |
struct oEGT eg_monic,egm0,egm1; |
|
int diag_count = 0; |
|
|
init_eg(&eg_monic); |
init_eg(&eg_monic); |
init_eg(&eg_invdalg); |
init_eg(&eg_invdalg); |
Line 1733 NODE nd_gb_trace(int m,int ishomo) |
|
Line 1735 NODE nd_gb_trace(int m,int ishomo) |
|
again: |
again: |
l = nd_minp(d,&d); |
l = nd_minp(d,&d); |
if ( SG(l) != sugar ) { |
if ( SG(l) != sugar ) { |
|
#if 1 |
if ( ishomo ) { |
if ( ishomo ) { |
stat = do_diagonalize_trace(sugar,m); |
stat = do_diagonalize_trace(sugar,m); |
|
diag_count = 0; |
if ( !stat ) { |
if ( !stat ) { |
NEXT(l) = d; d = l; |
NEXT(l) = d; d = l; |
d = nd_reconstruct(1,d); |
d = nd_reconstruct(1,d); |
goto again; |
goto again; |
} |
} |
} |
} |
|
#endif |
sugar = SG(l); |
sugar = SG(l); |
if ( DP_Print ) fprintf(asir_out,"%d",sugar); |
if ( DP_Print ) fprintf(asir_out,"%d",sugar); |
} |
} |
|
|
nd_removecont(m,nf); nfv = ndtondv(m,nf); nd_free(nf); |
nd_removecont(m,nf); nfv = ndtondv(m,nf); nd_free(nf); |
} |
} |
nh = ndv_newps(0,nfv,nfqv); |
nh = ndv_newps(0,nfv,nfqv); |
|
if ( ishomo && ++diag_count == diag_period ) { |
|
diag_count = 0; |
|
stat = do_diagonalize_trace(sugar,m); |
|
if ( !stat ) { |
|
NEXT(l) = d; d = l; |
|
d = nd_reconstruct(1,d); |
|
goto again; |
|
} |
|
} |
d = update_pairs(d,g,nh); |
d = update_pairs(d,g,nh); |
g = update_base(g,nh); |
g = update_base(g,nh); |
} else { |
} else { |