| version 1.18, 2005/06/16 05:07:23 |
version 1.19, 2005/06/16 06:54:55 |
|
|
| /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.17 2005/06/09 04:09:22 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.18 2005/06/16 05:07:23 takayama Exp $ */ |
| #include <stdio.h> |
#include <stdio.h> |
| #include "datatype.h" |
#include "datatype.h" |
| #include "stackm.h" |
#include "stackm.h" |
| Line 88 struct object Kgroebner(ob) |
|
| Line 88 struct object Kgroebner(ob) |
|
| int sdflag = 0; |
int sdflag = 0; |
| int forceReduction = 0; |
int forceReduction = 0; |
| int reduceOnly = 0; |
int reduceOnly = 0; |
| |
int gbCheck = 0; |
| |
|
| int ob1Size, ob2Size, noZeroEntry; |
int ob1Size, ob2Size, noZeroEntry; |
| int *ob1ToOb2; |
int *ob1ToOb2; |
| Line 135 struct object Kgroebner(ob) |
|
| Line 136 struct object Kgroebner(ob) |
|
| forceReduction = 1; |
forceReduction = 1; |
| }else if (strcmp(ob2c.lc.str,"reduceOnly")==0) { |
}else if (strcmp(ob2c.lc.str,"reduceOnly")==0) { |
| reduceOnly = 1; |
reduceOnly = 1; |
| |
}else if (strcmp(ob2c.lc.str,"gbCheck")==0) { |
| |
gbCheck = 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 256 struct object Kgroebner(ob) |
|
| Line 259 struct object Kgroebner(ob) |
|
| } |
} |
| |
|
| a = arrayToArrayOfPOLY(ob2); |
a = arrayToArrayOfPOLY(ob2); |
| grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction,reduceOnly); |
grG = (*groebner)(a,needBack,needSyz,&grP,countDown,forceReduction,reduceOnly,gbCheck); |
| |
|
| 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 302 struct object Kgroebner(ob) |
|
| Line 305 struct object Kgroebner(ob) |
|
| |
|
| /* To handle zero entries in the input. */ |
/* To handle zero entries in the input. */ |
| if (noZeroEntry) { |
if (noZeroEntry) { |
| |
rob=KsetAttribute(rob,KpoString("gb"),KpoInteger(grG->gb)); |
| return(rob); |
return(rob); |
| } |
} |
| method = getoaSize(rob); |
method = getoaSize(rob); |
| switch(method) { |
switch(method) { |
| case 1: |
case 1: |
| |
rob=KsetAttribute(rob,KpoString("gb"),KpoInteger(grG->gb)); |
| return(rob); |
return(rob); |
| break; |
break; |
| case 2: |
case 2: |
| Line 318 struct object Kgroebner(ob) |
|
| Line 323 struct object Kgroebner(ob) |
|
| rob2 = newObjectArray(2); |
rob2 = newObjectArray(2); |
| putoa(rob2,0,getoa(rob,0)); |
putoa(rob2,0,getoa(rob,0)); |
| putoa(rob2,1,newB); |
putoa(rob2,1,newB); |
| |
rob2=KsetAttribute(rob2,KpoString("gb"),KpoInteger(grG->gb)); |
| return(rob2); |
return(rob2); |
| break; |
break; |
| case 3: |
case 3: |
| Line 338 struct object Kgroebner(ob) |
|
| Line 344 struct object Kgroebner(ob) |
|
| putoa(rob2,0,getoa(rob,0)); |
putoa(rob2,0,getoa(rob,0)); |
| putoa(rob2,1,newB); |
putoa(rob2,1,newB); |
| putoa(rob2,2,newC); |
putoa(rob2,2,newC); |
| |
rob2=KsetAttribute(rob2,KpoString("gb"),KpoInteger(grG->gb)); |
| return(rob2); |
return(rob2); |
| break; |
break; |
| default: |
default: |