version 1.4, 2004/12/03 07:16:34 |
version 1.5, 2004/12/04 09:39:27 |
|
|
/* |
/* |
* $OpenXM: OpenXM_contrib2/asir2000/engine/dalg.c,v 1.3 2004/12/02 13:48:43 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/engine/dalg.c,v 1.4 2004/12/03 07:16:34 noro Exp $ |
*/ |
*/ |
|
|
#include "ca.h" |
#include "ca.h" |
Line 11 void simpdalg(DAlg da,DAlg *r); |
|
Line 11 void simpdalg(DAlg da,DAlg *r); |
|
void invdalg(DAlg a,DAlg *c); |
void invdalg(DAlg a,DAlg *c); |
void rmcontdalg(DAlg a, DAlg *c); |
void rmcontdalg(DAlg a, DAlg *c); |
|
|
|
NumberField get_numberfield() |
|
{ |
|
return current_numberfield; |
|
} |
|
|
void setfield_dalg(NODE alist) |
void setfield_dalg(NODE alist) |
{ |
{ |
NumberField nf; |
NumberField nf; |
Line 165 void simpdalg(DAlg da,DAlg *r) |
|
Line 170 void simpdalg(DAlg da,DAlg *r) |
|
DP nm; |
DP nm; |
DAlg d; |
DAlg d; |
Q dn,dn1; |
Q dn,dn1; |
|
struct order_spec *current_spec; |
|
|
if ( !(nf=current_numberfield) ) |
if ( !(nf=current_numberfield) ) |
error("simpdalg : current_numberfield is not set"); |
error("simpdalg : current_numberfield is not set"); |
Line 172 void simpdalg(DAlg da,DAlg *r) |
|
Line 178 void simpdalg(DAlg da,DAlg *r) |
|
*r = 0; |
*r = 0; |
return; |
return; |
} |
} |
|
current_spec = dp_current_spec; initd(nf->spec); |
dp_true_nf(nf->ind,da->nm,nf->ps,1,&nm,&dn); |
dp_true_nf(nf->ind,da->nm,nf->ps,1,&nm,&dn); |
|
initd(current_spec); |
mulq(da->dn,dn,&dn1); |
mulq(da->dn,dn,&dn1); |
MKDAlg(nm,dn1,d); |
MKDAlg(nm,dn1,d); |
rmcontdalg(d,r); |
rmcontdalg(d,r); |
Line 325 void invdalg(DAlg a,DAlg *c) |
|
Line 333 void invdalg(DAlg a,DAlg *c) |
|
MP mp0,mp; |
MP mp0,mp; |
int *rinfo,*cinfo; |
int *rinfo,*cinfo; |
struct order_spec *current_spec; |
struct order_spec *current_spec; |
|
struct oEGT eg0,eg1; |
|
extern struct oEGT eg_le; |
|
|
if ( !(nf=current_numberfield) ) |
if ( !(nf=current_numberfield) ) |
error("invdalg : current_numberfield is not set"); |
error("invdalg : current_numberfield is not set"); |
Line 371 void invdalg(DAlg a,DAlg *c) |
|
Line 381 void invdalg(DAlg a,DAlg *c) |
|
mp = NEXT(mp); |
mp = NEXT(mp); |
} |
} |
} |
} |
|
get_eg(&eg0); |
generic_gauss_elim_hensel(mobj,&sol,&dnsol,&rinfo,&cinfo); |
generic_gauss_elim_hensel(mobj,&sol,&dnsol,&rinfo,&cinfo); |
|
get_eg(&eg1); add_eg(&eg_le,&eg0,&eg1); |
solmat = (Q **)BDY(sol); |
solmat = (Q **)BDY(sol); |
for ( i = 0, mp0 = 0; i < dim; i++ ) |
for ( i = 0, mp0 = 0; i < dim; i++ ) |
if ( solmat[i][0] ) { |
if ( solmat[i][0] ) { |