version 1.7, 2003/11/21 02:10:37 |
version 1.8, 2005/06/16 05:07:23 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/Kclass/indeterminate.c,v 1.6 2001/09/01 01:37:48 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/Kclass/indeterminate.c,v 1.7 2003/11/21 02:10:37 takayama Exp $ */ |
/* Kclass/indeterminate.c */ |
/* Kclass/indeterminate.c */ |
/* This file handles indeterminate, recursivePolynomial, |
/* This file handles indeterminate, recursivePolynomial, |
polynomialInOneVariable |
polynomialInOneVariable |
|
|
|
|
/* Data conversion function : see KclassDataConversion*/ |
/* Data conversion function : see KclassDataConversion*/ |
struct object KpoIndeterminate(struct object ob) { |
struct object KpoIndeterminate(struct object ob) { |
struct object rob; |
struct object rob = OINIT; |
struct object *newobp; |
struct object *newobp; |
rob.tag = Sclass; |
rob.tag = Sclass; |
rob.lc.ival = CLASSNAME_indeterminate; |
rob.lc.ival = CLASSNAME_indeterminate; |
Line 30 struct object KpoIndeterminate(struct object ob) { |
|
Line 30 struct object KpoIndeterminate(struct object ob) { |
|
|
|
/* The second constructor. */ |
/* The second constructor. */ |
struct object KnewIndeterminate(char *s) { |
struct object KnewIndeterminate(char *s) { |
struct object ob; |
struct object ob = OINIT; |
|
|
ob = KpoString(s); /* We do not clone s */ |
ob = KpoString(s); /* We do not clone s */ |
return(KpoIndeterminate(ob)); |
return(KpoIndeterminate(ob)); |
Line 47 void fprintIndeterminate(FILE *fp,struct object op) |
|
Line 47 void fprintIndeterminate(FILE *fp,struct object op) |
|
/* ---------------------------------------------------- */ |
/* ---------------------------------------------------- */ |
|
|
struct object KpoRecursivePolynomial(struct object ob) { |
struct object KpoRecursivePolynomial(struct object ob) { |
struct object rob; |
struct object rob = OINIT; |
struct object *newobp; |
struct object *newobp; |
rob.tag = Sclass; |
rob.tag = Sclass; |
rob.lc.ival = CLASSNAME_recursivePolynomial; |
rob.lc.ival = CLASSNAME_recursivePolynomial; |
Line 111 void fprintRecursivePolynomial(FILE *fp,struct object |
|
Line 111 void fprintRecursivePolynomial(FILE *fp,struct object |
|
/* old code |
/* old code |
printObject(KopRecursivePolynomial(op),0,fp); return; |
printObject(KopRecursivePolynomial(op),0,fp); return; |
*/ |
*/ |
struct object ob; |
struct object ob = OINIT; |
struct object vlist; |
struct object vlist = OINIT; |
struct object body; |
struct object body = OINIT; |
ob = KopRecursivePolynomial(op); |
ob = KopRecursivePolynomial(op); |
if (ob.tag != Sarray) { |
if (ob.tag != Sarray) { |
printObject(ob,0,fp); return; |
printObject(ob,0,fp); return; |
Line 130 void fprintRecursivePolynomial(FILE *fp,struct object |
|
Line 130 void fprintRecursivePolynomial(FILE *fp,struct object |
|
/*------------------------------------------*/ |
/*------------------------------------------*/ |
|
|
struct object KpoPolynomialInOneVariable(struct object ob) { |
struct object KpoPolynomialInOneVariable(struct object ob) { |
struct object rob; |
struct object rob = OINIT; |
struct object *newobp; |
struct object *newobp; |
rob.tag = Sclass; |
rob.tag = Sclass; |
rob.lc.ival = CLASSNAME_polynomialInOneVariable; |
rob.lc.ival = CLASSNAME_polynomialInOneVariable; |
Line 154 struct object polyToRecursivePoly(struct object p) { |
|
Line 154 struct object polyToRecursivePoly(struct object p) { |
|
int vx[N0], vd[N0]; |
int vx[N0], vd[N0]; |
int i,j,k,n,count; |
int i,j,k,n,count; |
POLY f; |
POLY f; |
struct object vlist,vlist2; |
struct object vlist = OINIT; |
struct object ob1,ob2,ob3,ob4; |
struct object vlist2 = OINIT; |
|
struct object ob1 = OINIT; |
|
struct object ob2 = OINIT; |
|
struct object ob3 = OINIT; |
|
struct object ob4 = OINIT; |
int vn; |
int vn; |
|
|
if (p.tag != Spoly) return(rob); |
if (p.tag != Spoly) return(rob); |
Line 227 struct object polyToRecursivePoly2(struct object p,str |
|
Line 231 struct object polyToRecursivePoly2(struct object p,str |
|
struct object rob = NullObject; |
struct object rob = NullObject; |
POLY f; |
POLY f; |
POLY vv; |
POLY vv; |
struct object v; |
struct object v = OINIT; |
struct object c; |
struct object c = OINIT; |
struct object e; |
struct object e = OINIT; |
int i; |
int i; |
|
|
|
|
Line 262 struct object polyToRecursivePoly2(struct object p,str |
|
Line 266 struct object polyToRecursivePoly2(struct object p,str |
|
|
|
static int isRecursivePolynomial2a(struct object ob2, int n) { |
static int isRecursivePolynomial2a(struct object ob2, int n) { |
char *s = "Format error (isRecursivePolynomial2a) : "; |
char *s = "Format error (isRecursivePolynomial2a) : "; |
struct object tmp; |
struct object tmp = OINIT; |
int i; |
int i; |
if (ectag(ob2) == CLASSNAME_polynomialInOneVariable) { |
if (ectag(ob2) == CLASSNAME_polynomialInOneVariable) { |
ob2 = KopPolynomialInOneVariable(ob2); |
ob2 = KopPolynomialInOneVariable(ob2); |
Line 316 static int isRecursivePolynomial2a(struct object ob2, |
|
Line 320 static int isRecursivePolynomial2a(struct object ob2, |
|
int isRecursivePolynomial2(struct object ob) { |
int isRecursivePolynomial2(struct object ob) { |
/* This checks only the top level */ |
/* This checks only the top level */ |
char *s = "Format error (isRecursivePolynomial2) : "; |
char *s = "Format error (isRecursivePolynomial2) : "; |
struct object ob1, ob2,tmp; |
struct object ob1 = OINIT; |
|
struct object ob2 = OINIT; |
|
struct object tmp = OINIT; |
int i; |
int i; |
int n; |
int n; |
if (ob.tag != Sclass) return(0); |
if (ob.tag != Sclass) return(0); |
Line 390 struct object KrvtReplace(struct object rp_o,struct ob |
|
Line 396 struct object KrvtReplace(struct object rp_o,struct ob |
|
v_o : variable name (indeterminate). |
v_o : variable name (indeterminate). |
t_o : tree. |
t_o : tree. |
*/ |
*/ |
struct object rp, vlist, newvlist, newrp; |
struct object rp = OINIT; |
|
struct object vlist = OINIT; |
|
struct object newvlist = OINIT; |
|
struct object newrp = OINIT; |
int i,m; |
int i,m; |
/* Check the data types. */ |
/* Check the data types. */ |
if (ectag(rp_o) != CLASSNAME_recursivePolynomial) { |
if (ectag(rp_o) != CLASSNAME_recursivePolynomial) { |
Line 428 struct object KrvtReplace(struct object rp_o,struct ob |
|
Line 437 struct object KrvtReplace(struct object rp_o,struct ob |
|
|
|
|
|
struct object KreplaceRecursivePolynomial(struct object of,struct object rule) { |
struct object KreplaceRecursivePolynomial(struct object of,struct object rule) { |
struct object rob,f; |
struct object rob = OINIT; |
|
struct object f = OINIT; |
int i; |
int i; |
int n; |
int n; |
struct object trule; |
struct object trule = OINIT; |
|
|
|
|
if (rule.tag != Sarray) { |
if (rule.tag != Sarray) { |