| version 1.19, 2005/06/16 06:54:55 |
version 1.20, 2005/06/16 08:40:04 |
|
|
| /* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.18 2005/06/16 05:07:23 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/kanExport1.c,v 1.19 2005/06/16 06:54:55 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 gbCheck = 0; /* see @s/2005/06/16-note.pdf */ |
| |
|
| int ob1Size, ob2Size, noZeroEntry; |
int ob1Size, ob2Size, noZeroEntry; |
| int *ob1ToOb2; |
int *ob1ToOb2; |
| Line 122 struct object Kgroebner(ob) |
|
| Line 122 struct object Kgroebner(ob) |
|
| if (ob2.tag != Sarray) { |
if (ob2.tag != Sarray) { |
| errorKan1("%s\n","Kgroebner(): The options must be given by an array."); |
errorKan1("%s\n","Kgroebner(): The options must be given by an array."); |
| } |
} |
| |
/* Note: If you add a new option, change /configureGroebnerOption, too */ |
| for (i=0; i<getoaSize(ob2); i++) { |
for (i=0; i<getoaSize(ob2); i++) { |
| ob2c = getoa(ob2,i); |
ob2c = getoa(ob2,i); |
| if (ob2c.tag == Sdollar) { |
if (ob2c.tag == Sdollar) { |
| Line 304 struct object Kgroebner(ob) |
|
| Line 305 struct object Kgroebner(ob) |
|
| } |
} |
| |
|
| /* To handle zero entries in the input. */ |
/* To handle zero entries in the input. */ |
| |
rob=KsetAttribute(rob,KpoString("gb"),KpoInteger(grG->gb)); |
| |
putoa(rob,0,KsetAttribute(getoa(rob,0),KpoString("gb"),KpoInteger(grG->gb))); |
| 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: |