version 1.1, 2018/09/19 05:45:07 |
version 1.2, 2018/09/28 08:20:28 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/engine/Mgfs.c,v 1.1 2018/09/19 05:45:07 noro Exp $ */ |
|
|
#include "ca.h" |
#include "ca.h" |
#include "inline.h" |
#include "inline.h" |
Line 649 void sfmintdeg(VL vl,P fx,int dy,int c,P *fr) |
|
Line 649 void sfmintdeg(VL vl,P fx,int dy,int c,P *fr) |
|
for ( dc = DC(fx); dc; dc = NEXT(dc)) { |
for ( dc = DC(fx); dc; dc = NEXT(dc)) { |
chsgnp(COEF(dc),&t); |
chsgnp(COEF(dc),&t); |
ptoup(t,&ut); |
ptoup(t,&ut); |
rx[QTOS(DEG(dc))] = ut; |
rx[ZTOS(DEG(dc))] = ut; |
} |
} |
/* nf[d] = normal form table of monomials with total degree d */ |
/* nf[d] = normal form table of monomials with total degree d */ |
nf = (int ***)CALLOC(dx+dy+1,sizeof(int **)); /* xxx */ |
nf = (int ***)CALLOC(dx+dy+1,sizeof(int **)); /* xxx */ |
Line 759 static void create_bmono(P c,V x,int i,V y,int j,P *mo |
|
Line 759 static void create_bmono(P c,V x,int i,V y,int j,P *mo |
|
/* c*y^j */ |
/* c*y^j */ |
MKV(y,t); |
MKV(y,t); |
COEF(DC(t)) = c; |
COEF(DC(t)) = c; |
STOQ(j,DEG(DC(t))); |
STOZ(j,DEG(DC(t))); |
} |
} |
else if ( !j ) { |
else if ( !j ) { |
/* c*x^i */ |
/* c*x^i */ |
MKV(x,t); |
MKV(x,t); |
COEF(DC(t)) = c; |
COEF(DC(t)) = c; |
STOQ(i,DEG(DC(t))); |
STOZ(i,DEG(DC(t))); |
} else { |
} else { |
MKV(y,s); |
MKV(y,s); |
COEF(DC(s)) = c; |
COEF(DC(s)) = c; |
STOQ(j,DEG(DC(s))); |
STOZ(j,DEG(DC(s))); |
MKV(x,t); |
MKV(x,t); |
COEF(DC(t)) = s; |
COEF(DC(t)) = s; |
STOQ(i,DEG(DC(t))); |
STOZ(i,DEG(DC(t))); |
} |
} |
*mono = t; |
*mono = t; |
} |
} |