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

Function main

IntegerProgramming/solve_IP.cc:12–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "IP_algorithms.h"
11
12int 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.

Callers

nothing calls this directly

Calls 8

Conti_TraversoFunction · 0.85
Positive_Conti_TraversoFunction · 0.85
Elim_Conti_TraversoFunction · 0.85
PottierFunction · 0.85
Hosten_SturmfelsFunction · 0.85
DiBiase_UrbankeFunction · 0.85
Bigatti_LaScala_RobbianoFunction · 0.85
solveFunction · 0.70

Tested by

no test coverage detected