version 1.13, 2004/07/31 02:23:02 |
version 1.17, 2005/06/09 04:09:22 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.12 2004/07/30 11:21:55 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.16 2004/09/05 07:42:43 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
Line 85 struct object Kgroebner(ob) |
|
Line 85 struct object Kgroebner(ob) |
|
extern int StopDegree; |
extern int StopDegree; |
int sdflag = 0; |
int sdflag = 0; |
int forceReduction = 0; |
int forceReduction = 0; |
|
int reduceOnly = 0; |
|
|
int ob1Size, ob2Size, noZeroEntry; |
int ob1Size, ob2Size, noZeroEntry; |
int *ob1ToOb2; |
int *ob1ToOb2; |
Line 130 struct object Kgroebner(ob) |
|
Line 131 struct object Kgroebner(ob) |
|
needSyz = needBack = 1; |
needSyz = needBack = 1; |
}else if (strcmp(ob2c.lc.str,"forceReduction")==0) { |
}else if (strcmp(ob2c.lc.str,"forceReduction")==0) { |
forceReduction = 1; |
forceReduction = 1; |
|
}else if (strcmp(ob2c.lc.str,"reduceOnly")==0) { |
|
reduceOnly = 1; |
}else if (strcmp(ob2c.lc.str,"countDown")==0) { |
}else if (strcmp(ob2c.lc.str,"countDown")==0) { |
countDown = 1; cdflag = 1; |
countDown = 1; cdflag = 1; |
if (needSyz) { |
if (needSyz) { |
Line 251 struct object Kgroebner(ob) |
|
Line 254 struct object Kgroebner(ob) |
|
} |
} |
|
|
a = arrayToArrayOfPOLY(ob2); |
a = arrayToArrayOfPOLY(ob2); |
grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction); |
grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction,reduceOnly); |
|
|
if (strcmp(F_groebner,"gm") == 0 && (needBack || needSyz)) { |
if (strcmp(F_groebner,"gm") == 0 && (needBack || needSyz)) { |
warningKan("The options needBack and needSyz are ignored."); |
warningKan("The options needBack and needSyz are ignored."); |
Line 997 struct object oInitW(ob,oWeight) |
|
Line 1000 struct object oInitW(ob,oWeight) |
|
if (oWeight.tag != Sarray) { |
if (oWeight.tag != Sarray) { |
errorKan1("%s\n","oInitW(): the second argument must be array."); |
errorKan1("%s\n","oInitW(): the second argument must be array."); |
} |
} |
|
oWeight = Kto_int32(oWeight); |
n = getoaSize(oWeight); |
n = getoaSize(oWeight); |
if (n == 0) { |
if (n == 0) { |
m = getoaSize(ob); |
m = getoaSize(ob); |
Line 1151 struct object KordWsAll(ob,oWeight) |
|
Line 1155 struct object KordWsAll(ob,oWeight) |
|
if (oWeight.tag != Sarray) { |
if (oWeight.tag != Sarray) { |
errorKan1("%s\n","ordWsAll(): the second argument must be array."); |
errorKan1("%s\n","ordWsAll(): the second argument must be array."); |
} |
} |
|
oWeight = Kto_int32(oWeight); |
n = getoaSize(oWeight); |
n = getoaSize(oWeight); |
if (n == 0) { |
if (n == 0) { |
m = getoaSize(ob); |
m = getoaSize(ob); |
Line 1403 struct object KgetExponents(struct object obPoly,struc |
|
Line 1408 struct object KgetExponents(struct object obPoly,struc |
|
} |
} |
|
|
/* type == 0 x,y,Dx,Dy (no commutative, no vector) |
/* type == 0 x,y,Dx,Dy (no commutative, no vector) |
type == 1 x,y,h,Dx,Dy,H (commutative & no vector) |
type == 1 x,y,Dx,Dy,h,H (commutative & no vector) |
type == 2 x,y,Dx,Dy,h (commutative & no vector) |
type == 2 x,y,Dx,Dy,h (commutative & no vector) |
*/ |
*/ |
if (f ISZERO) { |
if (f ISZERO) { |
Line 1442 struct object KgetExponents(struct object obPoly,struc |
|
Line 1447 struct object KgetExponents(struct object obPoly,struc |
|
}else{ |
}else{ |
errorKan1("%s\n","KgetExponent, unknown type."); |
errorKan1("%s\n","KgetExponent, unknown type."); |
} |
} |
hsize = size/2; |
if (type == 1 || type == 2) { |
|
hsize = (size-cc)/2; |
|
}else{ |
|
hsize = size/2; |
|
} |
if (f ISZERO) { |
if (f ISZERO) { |
tob = newObjectArray(size); |
tob = newObjectArray(size); |
for (i=0; i<size; i++) { |
for (i=0; i<size; i++) { |
Line 1483 struct object KgetExponents(struct object obPoly,struc |
|
Line 1492 struct object KgetExponents(struct object obPoly,struc |
|
} |
} |
if (type == 1) { |
if (type == 1) { |
for (i=cc-1; i>=0; i--) { |
for (i=cc-1; i>=0; i--) { |
|
putoa(tob,hsize+r,KpoInteger(tf->e[i].D)); |
|
r++; |
putoa(tob,hsize+r,KpoInteger(tf->e[i].x)); |
putoa(tob,hsize+r,KpoInteger(tf->e[i].x)); |
putoa(tob,r,KpoInteger(tf->e[i].D)); |
|
r++; |
r++; |
} |
} |
}else if (type == 2) { |
}else if (type == 2) { |