Annotation of OpenXM/src/kan96xx/Kan/poly4.c, Revision 1.7
1.7 ! takayama 1: /* $OpenXM: OpenXM/src/kan96xx/Kan/poly4.c,v 1.6 2003/07/17 07:33:03 takayama Exp $ */
1.1 maekawa 2: #include <stdio.h>
3: #include "datatype.h"
4: #include "stackm.h"
5: #include "extern.h"
6: #include "extern2.h"
7: #include "matrix.h"
8: static void shell(int v[],int n);
9: static int degreeOfPrincipalPart(POLY f);
10: static int degreeOfInitW(POLY f,int w[]);
11:
12:
13: static void shell(v,n)
1.3 takayama 14: int v[];
15: int n;
1.1 maekawa 16: {
17: int gap,i,j,temp;
18:
19: for (gap = n/2; gap > 0; gap /= 2) {
20: for (i = gap; i<n; i++) {
21: for (j=i-gap ; j>=0 && v[j]<v[j+gap]; j -= gap) {
1.3 takayama 22: temp = v[j];
23: v[j] = v[j+gap];
24: v[j+gap] = temp;
1.1 maekawa 25: }
26: }
27: }
28: }
29:
30:
31: struct matrixOfPOLY *parts(f,v)
1.3 takayama 32: POLY f;
33: POLY v; /* v must be a single variable, e.g. x */
1.1 maekawa 34: {
35: struct matrixOfPOLY *evPoly;
36: int vi = 0; /* index of v */
37: int vx = 1; /* x --> 1, D--> 0 */
38: int n,evSize,i,k,e;
39: int *ev;
40: struct object *evList;
41: struct object *list;
42: struct object ob;
43: POLY ans;
44: POLY h;
45: extern struct ring *CurrentRingp;
46: POLY ft;
47:
48:
49: if (f ISZERO || v ISZERO) {
50: evPoly = newMatrixOfPOLY(2,1);
51: getMatrixOfPOLY(evPoly,0,0) = ZERO;
52: getMatrixOfPOLY(evPoly,1,0) = ZERO;
53: return(evPoly);
54: }
55: n = v->m->ringp->n;
56: /* get the index of the variable v */
57: for (i=0; i<n; i++) {
58: if (v->m->e[i].x) {
59: vx = 1; vi = i; break;
60: }else if (v->m->e[i].D) {
61: vx = 0; vi = i; break;
62: }
63: }
64: ft = f;
65: /* get the vector of exponents */
66: evList = NULLLIST;
67: while (ft != POLYNULL) {
68: if (vx) {
69: e = ft->m->e[vi].x;
70: }else{
71: e = ft->m->e[vi].D;
72: }
73: ft = ft->next;
74: ob = KpoInteger(e);
75: if (!memberQ(evList,ob)) {
76: list = newList(&ob);
77: evList = vJoin(evList,list);
78: }
79: }
80: /*printf("evList = "); printObjectList(evList);*/
81: evSize = klength(evList);
82: ev = (int *)sGC_malloc(sizeof(int)*(evSize+1));
83: if (ev == (int *)NULL) errorPoly("No more memory.");
84: for (i=0; i<evSize; i++) {
85: ev[i] = KopInteger(car(evList));
86: evList = cdr(evList);
87: }
88: /* sort ev */
89: shell(ev,evSize);
90:
91: /* get coefficients */
92: evPoly = newMatrixOfPOLY(2,evSize);
93: for (i=0; i<evSize; i++) {
94: ans = ZERO;
95: getMatrixOfPOLY(evPoly,0,i) = cxx(ev[i],0,0,CurrentRingp);
96: ft = f;
97: while (ft != POLYNULL) {
98: if (vx) {
1.3 takayama 99: if (ft->m->e[vi].x == ev[i]) {
100: h = newCell(ft->coeffp,monomialCopy(ft->m));
101: xset0(h,vi); /* touch monomial part, so you need to copy it above. */
102: ans = ppAdd(ans,h);
103: }
1.1 maekawa 104: }else{
1.3 takayama 105: if (ft->m->e[vi].D == ev[i]) {
106: h = newCell(ft->coeffp,monomialCopy(ft->m));
107: dset0(h,vi);
108: ans = ppAdd(ans,h);
109: }
1.1 maekawa 110: }
111: ft = ft->next;
112: }
113: getMatrixOfPOLY(evPoly,1,i) = ans;
114: }
115: return(evPoly);
116: }
1.3 takayama 117:
1.1 maekawa 118: struct object parts2(f,v)
1.3 takayama 119: POLY f;
120: POLY v; /* v must be a single variable, e.g. x */
1.1 maekawa 121: {
122: struct matrixOfPOLY *evPoly;
123: int vi = 0; /* index of v */
124: int vx = 1; /* x --> 1, D--> 0 */
125: int n,evSize,i,k,e;
126: int *ev;
127: struct object *evList;
128: struct object *list;
129: struct object ob;
130: POLY ans;
131: POLY h;
132: POLY ft;
133: struct object ob1,ob2,rob;
134:
135:
136: if (f ISZERO || v ISZERO) {
137: evPoly = newMatrixOfPOLY(2,1);
138: getMatrixOfPOLY(evPoly,0,0) = ZERO;
139: getMatrixOfPOLY(evPoly,1,0) = ZERO;
140: rob = newObjectArray(2);
141: ob1 = newObjectArray(1);
142: ob2 = newObjectArray(1);
143: putoa(ob1,0,KpoInteger(0));
144: putoa(ob2,0,KpoPOLY(POLYNULL));
145: putoa(rob,0,ob1); putoa(rob,1,ob2);
146: return(rob);
147: }
148: n = v->m->ringp->n;
149: /* get the index of the variable v */
150: for (i=0; i<n; i++) {
151: if (v->m->e[i].x) {
152: vx = 1; vi = i; break;
153: }else if (v->m->e[i].D) {
154: vx = 0; vi = i; break;
155: }
156: }
157: ft = f;
158: /* get the vector of exponents */
159: evList = NULLLIST;
160: while (ft != POLYNULL) {
161: if (vx) {
162: e = ft->m->e[vi].x;
163: }else{
164: e = ft->m->e[vi].D;
165: }
166: ft = ft->next;
167: ob = KpoInteger(e);
168: if (!memberQ(evList,ob)) {
169: list = newList(&ob);
170: evList = vJoin(evList,list);
171: }
172: }
173: /*printf("evList = "); printObjectList(evList);*/
174: evSize = klength(evList);
175: ev = (int *)sGC_malloc(sizeof(int)*(evSize+1));
176: if (ev == (int *)NULL) errorPoly("No more memory.");
177: for (i=0; i<evSize; i++) {
178: ev[i] = KopInteger(car(evList));
179: evList = cdr(evList);
180: }
181: /* sort ev */
182: shell(ev,evSize);
183:
184: /* get coefficients */
185: evPoly = newMatrixOfPOLY(2,evSize);
186: for (i=0; i<evSize; i++) {
187: ans = ZERO;
188: /* getMatrixOfPOLY(evPoly,0,i) = cxx(ev[i],0,0,CurrentRingp); */
189: getMatrixOfPOLY(evPoly,0,i) = POLYNULL;
190: ft = f;
191: while (ft != POLYNULL) {
192: if (vx) {
1.3 takayama 193: if (ft->m->e[vi].x == ev[i]) {
194: h = newCell(ft->coeffp,monomialCopy(ft->m));
195: xset0(h,vi); /* touch monomial part, so you need to copy it above. */
196: ans = ppAdd(ans,h);
197: }
1.1 maekawa 198: }else{
1.3 takayama 199: if (ft->m->e[vi].D == ev[i]) {
200: h = newCell(ft->coeffp,monomialCopy(ft->m));
201: dset0(h,vi);
202: ans = ppAdd(ans,h);
203: }
1.1 maekawa 204: }
205: ft = ft->next;
206: }
207: getMatrixOfPOLY(evPoly,1,i) = ans;
208: }
209: rob = newObjectArray(2);
210: ob1 = newObjectArray(evSize);
211: ob2 = newObjectArray(evSize);
212: for (i=0; i<evSize; i++) {
213: putoa(ob2,i,KpoPOLY(getMatrixOfPOLY(evPoly,1,i)));
214: putoa(ob1,i,KpoInteger(ev[i]));
215: }
216: putoa(rob,0,ob1); putoa(rob,1,ob2);
217: return(rob);
218: }
1.3 takayama 219:
1.1 maekawa 220: int pDegreeWrtV(f,v)
1.3 takayama 221: POLY f;
222: POLY v;
1.1 maekawa 223: {
224: int vx = 1;
225: int vi = 0;
226: int i,n;
227: int ans;
228: if (f ISZERO || v ISZERO) return(0);
229: n = f->m->ringp->n;
230: for (i=0; i<n; i++) {
231: if (v->m->e[i].x) {
232: vx = 1; vi = i;
233: break;
234: }else if (v->m->e[i].D) {
235: vx = 0; vi = i;
236: break;
237: }
238: }
239: if (vx) {
240: ans = f->m->e[vi].x;
241: }else{
242: ans = f->m->e[vi].D;
243: }
244: f = f->next;
245: while (f != POLYNULL) {
246: if (vx) {
247: if (f->m->e[vi].x > ans) ans = f->m->e[vi].x;
248: }else{
249: if (f->m->e[vi].D > ans) ans = f->m->e[vi].D;
250: }
251: f = f->next;
252: }
253: return(ans);
254: }
255:
256: int containVectorVariable(POLY f)
257: {
258: MONOMIAL tf;
259: static int nn,mm,ll,cc,n,m,l,c;
260: static struct ring *cr = (struct ring *)NULL;
261: int i;
262:
263: if (f ISZERO) return(0);
264: tf = f->m;
265: if (tf->ringp != cr) {
266: n = tf->ringp->n;
267: m = tf->ringp->m;
268: l = tf->ringp->l;
269: c = tf->ringp->c;
270: nn = tf->ringp->nn;
271: mm = tf->ringp->mm;
272: ll = tf->ringp->ll;
273: cc = tf->ringp->cc;
274: cr = tf->ringp;
275: }
276:
277: while (f != POLYNULL) {
278: tf = f->m;
279: for (i=cc; i<c; i++) {
280: if ( tf->e[i].x ) return(1);
281: if ( tf->e[i].D ) return(1);
282: }
283: for (i=ll; i<l; i++) {
284: if (tf->e[i].x) return(1);
285: if (tf->e[i].D) return(1);
286: }
287: for (i=mm; i<m; i++) {
288: if (tf->e[i].x) return(1);
289: if (tf->e[i].D) return(1);
290: }
291: for (i=nn; i<n; i++) {
292: if (tf->e[i].x) return(1);
293: if (tf->e[i].D) return(1);
294: }
295: f = f->next;
296: }
297: return(0);
298:
299: }
300:
301: POLY homogenize(f)
1.3 takayama 302: POLY f;
303: /* homogenize by using (*grade)(f) */
1.1 maekawa 304: {
305: POLY t;
306: int maxg;
307: int flag,d;
308:
309: if (f == ZERO) return(f);
310: t = f; maxg = (*grade)(f); flag = 0;
311: while (t != POLYNULL) {
312: d = (*grade)(t);
313: if (d != maxg) flag = 1;
314: if (d > maxg) {
315: maxg = d;
316: }
317: t = t->next;
318: }
319: if (flag == 0) return(f);
320:
321: f = pmCopy(f); /* You can rewrite the monomial parts */
322: t = f;
323: while (t != POLYNULL) {
324: d = (*grade)(t);
325: if (d != maxg) {
326: t->m->e[0].D += maxg-d; /* Multiply h^(maxg-d) */
327: }
328: t = t->next;
329: }
330: return(f);
331: }
332:
333: int isHomogenized(f)
1.3 takayama 334: POLY f;
1.1 maekawa 335: {
336: POLY t;
337: extern int Homogenize_vec;
338: int maxg;
339: if (!Homogenize_vec) return(isHomogenized_vec(f));
340: if (f == ZERO) return(1);
1.4 takayama 341: if (f->m->ringp->weightedHomogenization) {
342: return 1; /* BUG: do not chech in case of one-zero homogenization */
343: }
1.1 maekawa 344: maxg = (*grade)(f);
345: t = f;
346: while (t != POLYNULL) {
347: if (maxg != (*grade)(t)) return(0);
348: t = t->next;
349: }
350: return(1);
351: }
352:
353: int isHomogenized_vec(f)
1.3 takayama 354: POLY f;
1.1 maekawa 355: {
1.3 takayama 356: /* This is not efficient version. *grade should be grade_module1v(). */
1.1 maekawa 357: POLY t;
358: int ggg;
359: if (f == ZERO) return(1);
1.4 takayama 360: if (f->m->ringp->weightedHomogenization) {
361: return 1; /* BUG: do not chech in case of one-zero homogenization */
362: }
1.1 maekawa 363: while (f != POLYNULL) {
364: t = f;
365: ggg = (*grade)(f);
366: while (t != POLYNULL) {
367: if ((*isSameComponent)(f,t)) {
1.3 takayama 368: if (ggg != (*grade)(t)) return(0);
1.1 maekawa 369: }
370: t = t->next;
371: }
372: f = f->next;
373: }
374: return(1);
375: }
376:
377:
378: static int degreeOfPrincipalPart(f)
1.3 takayama 379: POLY f;
1.1 maekawa 380: {
381: int n,i,dd;
382: if (f ISZERO) return(0);
383: n = f->m->ringp->n; dd = 0;
384: /* D[0] is homogenization var */
385: for (i=1; i<n; i++) {
386: dd += f->m->e[i].D;
387: }
388: return(dd);
389: }
390:
391: POLY POLYToPrincipalPart(f)
1.3 takayama 392: POLY f;
1.1 maekawa 393: {
394: POLY node;
395: struct listPoly nod;
396: POLY h;
397: POLY g;
398: int maxd = -20000; /* very big negative number */
399: int dd;
400: node = &nod; node->next = POLYNULL; h = node;
401:
402: g = pCopy(f); /* shallow copy */
403: while (!(f ISZERO)) {
404: dd = degreeOfPrincipalPart(f);
405: if (dd > maxd) maxd = dd;
406: f = f->next;
407: }
408: while (!(g ISZERO)) {
409: dd = degreeOfPrincipalPart(g);
410: if (dd == maxd) {
411: h->next = g;
412: h = h->next;
413: }
414: g = g->next;
415: }
416: h->next = POLYNULL;
417: return(node->next);
418: }
419:
420: static int degreeOfInitW(f,w)
1.3 takayama 421: POLY f;
422: int w[];
1.1 maekawa 423: {
424: int n,i,dd;
425: if (f ISZERO) {
426: errorPoly("degreeOfInitW(0,w) ");
427: }
428: n = f->m->ringp->n; dd = 0;
429: for (i=0; i<n; i++) {
430: dd += (f->m->e[i].D)*w[n+i];
431: dd += (f->m->e[i].x)*w[i];
432: }
433: return(dd);
434: }
435:
436: POLY POLYToInitW(f,w)
1.3 takayama 437: POLY f;
438: int w[]; /* weight vector */
1.1 maekawa 439: {
440: POLY node;
441: struct listPoly nod;
442: POLY h;
443: POLY g;
444: int maxd;
445: int dd;
446: node = &nod; node->next = POLYNULL; h = node;
447:
448: if (f ISZERO) return(f);
449: maxd = degreeOfInitW(f,w);
450: g = pCopy(f); /* shallow copy */
451: while (!(f ISZERO)) {
452: dd = degreeOfInitW(f,w);
453: if (dd > maxd) maxd = dd;
454: f = f->next;
455: }
456: while (!(g ISZERO)) {
457: dd = degreeOfInitW(g,w);
458: if (dd == maxd) {
459: h->next = g;
460: h = h->next;
461: }
462: g = g->next;
463: }
464: h->next = POLYNULL;
465: return(node->next);
466: }
467:
468:
469: /*
470: 1.The substitution "ringp->multiplication = ...." is allowed only in
471: KsetUpRing(), so the check in KswitchFunction is not necessary.
472: 2.mmLarger != matrix and AvoidTheSameRing==1, then error
473: 3.If Schreyer = 1, then the system always generates a new ring.
474: 4.The execution of set_order_by_matrix is not allowed when Avoid... == 1.
475: 5.When mmLarger == tower (in tower.sm1, tower-sugar.sm1), we do
476: as follows with our own risk.
477: [(AvoidTheSameRing)] pushEnv [ [(AvoidTheSameRing) 0] system_variable (mmLarger) (tower) switch_function ] pop popEnv
478: */
479: int isTheSameRing(struct ring *rstack[],int rp, struct ring *newRingp)
480: {
481: struct ring *rrr;
482: int i,j,k;
483: int a=0;
484: for (k=0; k<rp; k++) {
485: rrr = rstack[k];
486: if (rrr->p != newRingp->p) { a=1; goto bbb ; }
487: if (rrr->n != newRingp->n) { a=2; goto bbb ; }
488: if (rrr->nn != newRingp->nn) { a=3; goto bbb ; }
489: if (rrr->m != newRingp->m) { a=4; goto bbb ; }
490: if (rrr->mm != newRingp->mm) { a=5; goto bbb ; }
491: if (rrr->l != newRingp->l) { a=6; goto bbb ; }
492: if (rrr->ll != newRingp->ll) { a=7; goto bbb ; }
493: if (rrr->c != newRingp->c) { a=8; goto bbb ; }
494: if (rrr->cc != newRingp->cc) { a=9; goto bbb ; }
495: for (i=0; i<rrr->n; i++) {
496: if (strcmp(rrr->x[i],newRingp->x[i])!=0) { a=10; goto bbb ; }
497: if (strcmp(rrr->D[i],newRingp->D[i])!=0) { a=11; goto bbb ; }
498: }
499: if (rrr->orderMatrixSize != newRingp->orderMatrixSize) { a=12; goto bbb ; }
500: for (i=0; i<rrr->orderMatrixSize; i++) {
501: for (j=0; j<2*(rrr->n); j++) {
1.3 takayama 502: if (rrr->order[i*2*(rrr->n)+j] != newRingp->order[i*2*(rrr->n)+j])
503: { a=13; goto bbb ; }
1.1 maekawa 504: }
505: }
506: if (rrr->next != newRingp->next) { a=14; goto bbb ; }
507: if (rrr->multiplication != newRingp->multiplication) { a=15; goto bbb ; }
508: /* if (rrr->schreyer != newRingp->schreyer) { a=16; goto bbb ; }*/
509: if (newRingp->schreyer == 1) { a=16; goto bbb; }
1.4 takayama 510: if (rrr->weightedHomogenization != newRingp->weightedHomogenization) { a=16; goto bbb; }
1.7 ! takayama 511: if (rrr->degreeShiftSize != newRingp->degreeShiftSize) {
! 512: a = 17; goto bbb;
! 513: }
! 514: if (rrr->degreeShiftN != newRingp->degreeShiftN) {
! 515: a = 17; goto bbb;
! 516: }
! 517: for (i=0; i < rrr->degreeShiftSize; i++) {
! 518: for (j=0; j< rrr->degreeShiftN; j++) {
! 519: if (rrr->degreeShift[i*(rrr->degreeShiftN)+j] !=
! 520: newRingp->degreeShift[i*(rrr->degreeShiftN)+j]) {
! 521: a = 17; goto bbb;
! 522: }
! 523: }
! 524: }
! 525:
1.1 maekawa 526: /* The following fields are ignored.
527: void *gbListTower;
528: int *outputOrder;
529: char *name;
530: */
531: /* All tests are passed. */
532: return(k);
533: bbb: ;
534: /* for debugging. */
535: /* fprintf(stderr," reason=%d, ",a); */
536: }
537: return(-1);
538: }
1.6 takayama 539:
540: /* s->1 */
541: POLY goDeHomogenizeS(POLY f) {
542: POLY node;
543: POLY lastf;
544: struct listPoly nod;
545: POLY h;
546: POLY tf;
547: int gt,first;
548:
549: if (f == POLYNULL) return(POLYNULL);
550: node = &nod;
551: node->next = POLYNULL;
552: lastf = POLYNULL;
553: first = 1;
554: while (f != POLYNULL) {
555: tf = newCell(f->coeffp,monomialCopy(f->m));
556: tf->m->e[0].x = 0; /* H, s variable in the G-O paper. */
557: if (first) {
558: node->next = tf;
559: lastf = tf;
560: first = 0;
561: }else{
562: gt = (*mmLarger)(lastf,tf);
563: if (gt == 1) {
564: lastf->next = tf;
565: lastf = tf;
566: }else{
567: h = node->next;
568: h = ppAddv(h,tf);
569: node->next = h;
570: lastf = h;
571: while (lastf->next != POLYNULL) {
572: lastf = lastf->next;
573: }
574: }
575: }
576: f = f->next;
577: }
578: return (node->next);
579: }
580:
1.5 takayama 581: /* Granger-Oaku's homogenization for the ecart tangent cone.
582: Note: 2003.07.10.
583: ds[] is the degree shift.
584: ei ( element index ). If it is < 0, then e[n-1]->x will be used,
585: else ei is used.
1.6 takayama 586: if onlyS is set to 1, then input is assumed to be (u,v)-h-homogeneous.
1.5 takayama 587: */
1.6 takayama 588: POLY goHomogenize(POLY f,int u[],int v[],int ds[],int dssize,int ei,int onlyS)
1.5 takayama 589: {
590: POLY node;
591: POLY lastf;
592: struct listPoly nod;
593: POLY h;
594: POLY tf;
595: int gt,first,m,mp,t,tp,dsIdx,message;
1.7 ! takayama 596: struct ring *rp;
1.5 takayama 597:
598: message = 1;
599: if (f == POLYNULL) return(POLYNULL);
1.7 ! takayama 600: rp = f->m->ringp;
! 601: if ((rp->degreeShiftSize == 0) && (dssize > 0)) {
! 602: warningPoly("You are trying to homogenize a polynomial with degree shift. However, the polynomial belongs to the ring without degreeShift option. It may cause a trouble in comparison in free module.\n");
! 603: }
1.5 takayama 604: node = &nod;
605: node->next = POLYNULL;
606: lastf = POLYNULL;
607: first = 1;
608: while (f != POLYNULL) {
609: if (first) {
610: t = m = dGrade1(f);
611: tp = mp = uvGrade1(f,u,v,ds,dssize,ei);
612: }else{
613: t = dGrade1(f);
614: tp = uvGrade1(f,u,v,ds,dssize,ei);
615: if (t > m) m = t;
616: if (tp < mp) mp = tp;
617: }
618:
619: tf = newCell(f->coeffp,monomialCopy(f->m));
620: /* Automatic dehomogenize. Not += */
621: if (message && ((tf->m->e[0].D != 0) || (tf->m->e[0].x != 0))) {
622: /*go-debug fprintf(stderr,"Automatic dehomogenize and homogenize.\n"); */
623: message = 0;
624: }
1.6 takayama 625: if (!onlyS) {
626: tf->m->e[0].D = -t; /* h */
627: }
1.5 takayama 628: tf->m->e[0].x = tp; /* H, s variable in the G-O paper. */
629: /*go-debug printf("t(h)=%d, tp(uv+ds)=%d\n",t,tp); */
630: if (first) {
631: node->next = tf;
632: lastf = tf;
633: first = 0;
634: }else{
635: gt = (*mmLarger)(lastf,tf);
636: if (gt == 1) {
637: lastf->next = tf;
638: lastf = tf;
639: }else{
640: /*go-debug printf("?\n"); */
641: h = node->next;
642: h = ppAddv(h,tf);
643: node->next = h;
644: lastf = h;
645: while (lastf->next != POLYNULL) {
646: lastf = lastf->next;
647: }
648: }
649: }
650: f = f->next;
651: }
652: h = node->next;
653: /*go-debug printf("m=%d, mp=%d\n",m,mp); */
654: while (h != POLYNULL) {
655: /*go-debug printf("Old: h=%d, s=%d\n",h->m->e[0].D,h->m->e[0].x); */
1.6 takayama 656: if (!onlyS) h->m->e[0].D += m; /* h */
1.5 takayama 657: h->m->e[0].x += -mp; /* H, s*/
658: /*go-debug printf("New: h=%d, s=%d\n",h->m->e[0].D,h->m->e[0].x); */
659: h = h->next;
660: }
661: return (node->next);
662: }
663:
664: /* u[] = -1, v[] = 1 */
1.6 takayama 665: POLY goHomogenize11(POLY f,int ds[],int dssize,int ei,int onlyS)
1.5 takayama 666: {
667: int r;
668: int i,t,n,m,nn;
669: MONOMIAL tf;
670: static int *u;
671: static int *v;
672: static struct ring *cr = (struct ring *)NULL;
673:
674: if (f == POLYNULL) return POLYNULL;
675:
676: tf = f->m;
677: if (tf->ringp != cr) {
678: n = tf->ringp->n;
679: m = tf->ringp->m;
680: nn = tf->ringp->nn;
681: cr = tf->ringp;
682: u = (int *)sGC_malloc(sizeof(int)*n);
683: v = (int *)sGC_malloc(sizeof(int)*n);
684: for (i=0; i<n; i++) u[i]=v[i]=0;
685: for (i=m; i<nn; i++) {
686: u[i] = -1; v[i] = 1;
687: }
688: }
1.6 takayama 689: return(goHomogenize(f,u,v,ds,dssize,ei,onlyS));
1.5 takayama 690: }
691:
1.6 takayama 692: POLY goHomogenize_dsIdx(POLY f,int u[],int v[],int dsIdx,int ei,int onlyS)
1.5 takayama 693: {
694: if (f == POLYNULL) return POLYNULL;
695: }
1.6 takayama 696: POLY goHomogenize11_dsIdx(POLY f,int ds[],int dsIdx,int ei,int onlyS)
1.5 takayama 697: {
698: if (f == POLYNULL) return POLYNULL;
699: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>