version 1.33, 2020/07/09 02:33:38 |
version 1.34, 2020/07/10 08:09:05 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.32 2020/07/07 08:08:26 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/engine/nd.c,v 1.33 2020/07/09 02:33:38 noro Exp $ */ |
|
|
#include "nd.h" |
#include "nd.h" |
|
|
Line 4337 void nd_sba(LIST f,LIST v,int m,int homo,int retdp,int |
|
Line 4337 void nd_sba(LIST f,LIST v,int m,int homo,int retdp,int |
|
for ( r0 = 0, t = x; t; t = NEXT(t) ) { |
for ( r0 = 0, t = x; t; t = NEXT(t) ) { |
NEXTNODE(r0,r); |
NEXTNODE(r0,r); |
if ( retdp ) BDY(r) = ndvtodp(m,BDY(t)); |
if ( retdp ) BDY(r) = ndvtodp(m,BDY(t)); |
BDY(r) = ndvtop(m,CO,vv,BDY(t)); |
else BDY(r) = ndvtop(m,CO,vv,BDY(t)); |
} |
} |
if ( r0 ) NEXT(r) = 0; |
if ( r0 ) NEXT(r) = 0; |
MKLIST(*rp,r0); |
MKLIST(*rp,r0); |
Line 10875 int nd_symbolic_preproc_s(PGeoBucket bucket,int trace, |
|
Line 10875 int nd_symbolic_preproc_s(PGeoBucket bucket,int trace, |
|
|
|
NODE nd_sba_f4(int m,int **indp) |
NODE nd_sba_f4(int m,int **indp) |
{ |
{ |
int i,nh,stat,index,f4red; |
int i,nh,stat,index,f4red,f4step; |
int col,rank,len,k,j,a,sugar,nbase,psugar,ms; |
int col,rank,len,k,j,a,sugar,nbase,psugar,ms; |
NODE r,g,rp0,nflist; |
NODE r,g,rp0,nflist; |
ND_pairs d,l,t; |
ND_pairs d,l,t; |
Line 10899 NODE nd_sba_f4(int m,int **indp) |
|
Line 10899 NODE nd_sba_f4(int m,int **indp) |
|
nd_nbase = nd_psn; |
nd_nbase = nd_psn; |
f4red = 1; |
f4red = 1; |
psugar = 0; |
psugar = 0; |
|
f4step = 0; |
while ( d ) { |
while ( d ) { |
for ( t = d, ms = SG(d); t; t = NEXT(t) ) |
for ( t = d, ms = SG(d); t; t = NEXT(t) ) |
if ( SG(t) < ms ) ms = SG(t); |
if ( SG(t) < ms ) ms = SG(t); |
if ( ms == psugar ) { |
if ( ms == psugar && f4step >= 2 ) { |
again: |
again: |
l = d; d = d->next; |
l = d; d = d->next; |
if ( small_lcm(l) ) { |
if ( small_lcm(l) ) { |
|
|
FREENDP(l); |
FREENDP(l); |
} |
} |
} else { |
} else { |
|
if ( ms != psugar ) f4step = 1; |
|
else f4step++; |
again2: |
again2: |
if ( DP_Print ) { printf("\n"); fflush(stdout); } |
|
psugar = ms; |
psugar = ms; |
l = nd_minsugarp_s(d,&d); |
l = nd_minsugarp_s(d,&d); |
sugar = nd_sugarweight?d->sugar2:SG(d); |
sugar = nd_sugarweight?d->sugar2:SG(d); |
|
|
d = nd_reconstruct(0,d); |
d = nd_reconstruct(0,d); |
goto again2; |
goto again2; |
} |
} |
if ( DP_Print ) fprintf(asir_out,"sugar=%d,",psugar); |
if ( DP_Print ) fprintf(asir_out,"\nsugar=%d,",psugar); |
nflist = nd_f4_red_s(m,l,0,s0vect,col,rp0,syzlist); |
nflist = nd_f4_red_s(m,l,0,s0vect,col,rp0,syzlist); |
/* adding new bases */ |
/* adding new bases */ |
for ( r = nflist; r; r = NEXT(r) ) { |
for ( r = nflist; r; r = NEXT(r) ) { |
|
|
d = remove_spair_s(d,(SIG)BDY(r)); |
d = remove_spair_s(d,(SIG)BDY(r)); |
d = remove_large_lcm(d); |
d = remove_large_lcm(d); |
if ( DP_Print ) { |
if ( DP_Print ) { |
fprintf(asir_out,"f4red=%d,gblen=%d\n",f4red,nd_psn); fflush(asir_out); |
fprintf(asir_out,"f4red=%d,gblen=%d",f4red,nd_psn); fflush(asir_out); |
} |
} |
f4red++; |
f4red++; |
} |
} |
} |
} |
if ( DP_Print ) { |
if ( DP_Print ) { |
fprintf(asir_out,"number of red=%d,",Nf4_red); |
fprintf(asir_out,"\nnumber of red=%d,",Nf4_red); |
} |
} |
g = conv_ilist_s(nd_demand,0,indp); |
g = conv_ilist_s(nd_demand,0,indp); |
return g; |
return g; |