| version 1.1.1.1, 1999/10/08 02:12:01 |
version 1.5, 2005/07/03 11:08:54 |
|
|
| |
/* $OpenXM: OpenXM/src/kan96xx/Kan/switch.c,v 1.4 2003/07/17 09:10:54 takayama Exp $ */ |
| #include <stdio.h> |
#include <stdio.h> |
| |
#include <string.h> |
| #include "datatype.h" |
#include "datatype.h" |
| #include "extern2.h" |
#include "extern2.h" |
| #include "gradedset.h" |
#include "gradedset.h" |
| Line 19 void print_switch_status(void) { |
|
| Line 21 void print_switch_status(void) { |
|
| printf("mmLarger [matrix,lexicographic,tower] %s\n",F_mmLarger); |
printf("mmLarger [matrix,lexicographic,tower] %s\n",F_mmLarger); |
| printf("mpMult [poly,diff,difference] %s\n",F_mpMult); |
printf("mpMult [poly,diff,difference] %s\n",F_mpMult); |
| printf("monomialAdd [poly] %s\n",F_monomialAdd); |
printf("monomialAdd [poly] %s\n",F_monomialAdd); |
| printf("red@ [standard,module1,module2,module1rev]\n"); |
printf("red@ [standard,module1,module2,module1rev,ecart]\n"); |
| printf(" %s\n",F_red); |
printf(" %s\n",F_red); |
| printf("isSameComponent [x,xd] %s\n",F_isSameComponent); |
printf("isSameComponent [x,xd] %s\n",F_isSameComponent); |
| printf("sp [standard] %s\n",F_sp); |
printf("sp [standard] %s\n",F_sp); |
| Line 32 void print_switch_status(void) { |
|
| Line 34 void print_switch_status(void) { |
|
| or (report) (function) switch_function value(string) |
or (report) (function) switch_function value(string) |
| */ |
*/ |
| char *switch_function(fun,arg) |
char *switch_function(fun,arg) |
| char *fun; |
char *fun; |
| char *arg; |
char *arg; |
| { |
{ |
| char *ans = NULL; |
char *ans = NULL; |
| if (strcmp(fun,"mmLarger")==0) { |
if (strcmp(fun,"mmLarger")==0) { |
| Line 99 void switch_init(void) { |
|
| Line 101 void switch_init(void) { |
|
| */ |
*/ |
| |
|
| void switch_mmLarger(arg) |
void switch_mmLarger(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"matrix") == 0) { |
if (strcmp(arg,"matrix") == 0) { |
| mmLarger = mmLarger_matrix; |
mmLarger = mmLarger_matrix; |
|
|
| */ |
*/ |
| |
|
| void switch_mpMult(arg) |
void switch_mpMult(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"poly") == 0) { |
if (strcmp(arg,"poly") == 0) { |
| mpMult = mpMult_poly; |
mpMult = mpMult_poly; |
|
|
| */ |
*/ |
| |
|
| void switch_monomialAdd(arg) |
void switch_monomialAdd(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"poly") == 0) { |
if (strcmp(arg,"poly") == 0) { |
| monomialAdd = monomialAdd_poly; |
monomialAdd = monomialAdd_poly; |
|
|
| } |
} |
| |
|
| void switch_red(arg) |
void switch_red(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"standard") == 0) { |
if (strcmp(arg,"standard") == 0) { |
| switch_sp("standard"); |
switch_sp("standard"); |
|
|
| lcm = lcm_module; |
lcm = lcm_module; |
| switch_grade("standard"); |
switch_grade("standard"); |
| F_red = "module2"; |
F_red = "module2"; |
| |
}else if (strcmp(arg,"ecart") == 0) { |
| |
switch_sp("standard"); |
| |
isReducible = isReducible_module; |
| |
reduction1 = reduction1_gen; |
| |
reduction = reduction_ecart; |
| |
|
| |
isCdrReducible = isCdrReducible_gen; |
| |
reduction1Cdr = reduction1Cdr_gen; |
| |
reductionCdr = reductionCdr_gen; |
| |
|
| |
lcm = lcm_module; |
| |
switch_grade("module1"); |
| |
F_red = "ecart"; |
| }else if (strcmp(arg,"debug") == 0) { |
}else if (strcmp(arg,"debug") == 0) { |
| reduction1 = reduction1_gen_debug; |
reduction1 = reduction1_gen_debug; |
| F_red = "debug"; |
F_red = "debug"; |
|
|
| } |
} |
| |
|
| void switch_groebner(arg) |
void switch_groebner(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"standard") == 0) { |
if (strcmp(arg,"standard") == 0) { |
| groebner = groebner_gen; |
groebner = groebner_gen; |
|
|
| |
|
| /* called from switch_init */ |
/* called from switch_init */ |
| void switch_isSameComponent(arg) |
void switch_isSameComponent(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"x") == 0) { |
if (strcmp(arg,"x") == 0) { |
| isSameComponent = isSameComponent_x; |
isSameComponent = isSameComponent_x; |
|
|
| } |
} |
| |
|
| void switch_sp(arg) |
void switch_sp(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"standard") == 0) { |
if (strcmp(arg,"standard") == 0) { |
| sp = sp_gen; |
sp = sp_gen; |
|
|
| |
|
| |
|
| void switch_grade(arg) |
void switch_grade(arg) |
| char *arg; |
char *arg; |
| { |
{ |
| if (strcmp(arg,"standard")==0) { |
if (strcmp(arg,"standard")==0) { |
| grade = grade_gen; |
grade = grade_gen; |