MCPcopy Create free account
hub / github.com/Singular/Singular / main

Function main

IntegerProgramming/change_cost.cc:11–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

change_costFunction · 0.85

Tested by

no test coverage detected