| 10 | #include "IP_algorithms.h" |
| 11 | |
| 12 | int main(int argc, char *argv[]) |
| 13 | { |
| 14 | |
| 15 | // initialize arguments for the IP-algorithms (Buchberger) |
| 16 | // with default settings |
| 17 | BOOLEAN verbose=FALSE; |
| 18 | int version=1; |
| 19 | int S_pair_criteria=11; |
| 20 | double interreduction_percentage=12.0; |
| 21 | |
| 22 | ///////////////////////// parse options ///////////////////////////////////// |
| 23 | |
| 24 | int alg_option=0; |
| 25 | // no algorithm specified yet |
| 26 | |
| 27 | if(argc>=3) |
| 28 | // argc has to be at least 3 (except when help is required, see below): |
| 29 | // program name, (MATRIX or) GROEBNER file, PROBLEM file |
| 30 | { |
| 31 | |
| 32 | for(int i=1;i<argc-2;i++) |
| 33 | // these are the input options |
| 34 | { |
| 35 | |
| 36 | if(!strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose")) |
| 37 | { |
| 38 | verbose=TRUE; |
| 39 | continue; |
| 40 | // read next argument |
| 41 | } |
| 42 | |
| 43 | if(!strcmp(argv[i],"-V") || !strcmp(argv[i],"-version")) |
| 44 | { |
| 45 | // check if next argument is a valid version number |
| 46 | i++; |
| 47 | |
| 48 | if(!strcmp(argv[i],"1")) |
| 49 | { |
| 50 | version=1; |
| 51 | continue; |
| 52 | } |
| 53 | if(!strcmp(argv[i],"1a")) |
| 54 | { |
| 55 | version=0; |
| 56 | continue; |
| 57 | } |
| 58 | if(!strcmp(argv[i],"2")) |
| 59 | { |
| 60 | version=2; |
| 61 | continue; |
| 62 | } |
| 63 | if(!strcmp(argv[i],"3")) |
| 64 | { |
| 65 | version=3; |
| 66 | continue; |
| 67 | } |
| 68 | |
| 69 | // When reaching this line, the version argument was invalid. |
nothing calls this directly
no test coverage detected