version 1.10, 2019/10/11 03:45:57 |
version 1.11, 2019/11/01 04:28:53 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2018/engine/dist.c,v 1.9 2019/09/19 06:29:47 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2018/engine/dist.c,v 1.10 2019/10/11 03:45:57 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
|
|
Line 3153 int compdpm(VL vl,DPM p1,DPM p2) |
|
Line 3153 int compdpm(VL vl,DPM p1,DPM p2) |
|
} |
} |
} |
} |
|
|
|
void dpm_removecont2(DPM p1,DPM p2,DPM *r1p,DPM *r2p,Z *contp); |
|
|
// p = ...+c*<<0,...0:pos>>+... |
// p = ...+c*<<0,...0:pos>>+... |
DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
{ |
{ |
Line 3160 DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
|
Line 3162 DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
|
DL dl; |
DL dl; |
DMM m; |
DMM m; |
DP f; |
DP f; |
DPM a1,p1,r; |
DPM a1,p1,r,r1,dmy; |
|
Z dmyz; |
|
|
if ( !a ) return 0; |
if ( !a ) return 0; |
d0 = 0; |
d0 = 0; |
Line 3168 DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
|
Line 3171 DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
|
if ( m->pos == pos ) { |
if ( m->pos == pos ) { |
NEXTMP(d0,d); |
NEXTMP(d0,d); |
arf_chsgn(m->c,&d->c); |
arf_chsgn(m->c,&d->c); |
if ( !dp_current_spec ) d->dl = m->dl; |
if ( !dp_current_spec || !dp_current_spec->module_rank ) |
|
d->dl = m->dl; |
else { |
else { |
NEWDL(dl,NV(a)); |
NEWDL(dl,NV(a)); |
_copydl(NV(a),m->dl,dl); |
_copydl(NV(a),m->dl,dl); |
Line 3181 DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
|
Line 3185 DPM dpm_eliminate_term(DPM a,DPM p,Obj c,int pos) |
|
mulcdpm(CO,c,a,&a1); |
mulcdpm(CO,c,a,&a1); |
mulobjdpm(CO,(Obj)f,p,&p1); |
mulobjdpm(CO,(Obj)f,p,&p1); |
adddpm(CO,a1,p1,&r); |
adddpm(CO,a1,p1,&r); |
return r; |
dpm_removecont2(0,r,&dmy,&r1,&dmyz); |
|
return r1; |
} else |
} else |
return a; |
return a; |
} |
} |
Line 3261 void dpm_simplify_syz(LIST s,LIST m,LIST *s1,LIST *m1, |
|
Line 3266 void dpm_simplify_syz(LIST s,LIST m,LIST *s1,LIST *m1, |
|
} |
} |
MKLIST(*s1,t); |
MKLIST(*s1,t); |
|
|
if ( dp_current_spec->module_rank ) { |
if ( dp_current_spec && dp_current_spec->module_rank ) { |
new_w = (int *)MALLOC(j*sizeof(int)); |
new_w = (int *)MALLOC(j*sizeof(int)); |
for ( j = 0, i = 1; i <= lm; i++ ) |
for ( j = 0, i = 1; i <= lm; i++ ) |
if ( tab[i] ) { new_w[j++] = dp_current_spec->module_top_weight[i-1]; } |
if ( tab[i] ) { new_w[j++] = dp_current_spec->module_top_weight[i-1]; } |