-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathglobal.cpp
executable file
·48 lines (39 loc) · 1.11 KB
/
global.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/***************************************************************************
* Copyright (C) 2015 Tian-Li Yu and Shih-Huan Hsu *
* tianliyu@ntu.edu.tw *
***************************************************************************/
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cfloat>
#include "myrand.h"
#include "statistics.h"
#include "doublelinkedlistarray.h"
#include "zkey.h"
#include "chromosome.h"
#include "sat.h"
int maxMemory = 0;
bool GHC = true;
bool SELECTION = true;
bool CACHE = false;
bool SHOW_BISECTION = true;
char outputFilename[100];
Chromosome::Function Chromosome::function;
int Chromosome::nfe;
int Chromosome::lsnfe;
int Chromosome::hitnfe;
bool Chromosome::hit;
unordered_map<unsigned long, double> Chromosome::cache;
ZKey zKey;
MyRand myRand;
BitwiseDistance myBD;
SPINinstance mySpinGlassParams;
NKWAProblem nkwa;
SATinstance mySAT;
void outputErrMsg(const char *errMsg) {
printf("%s\n", errMsg);
exit(1);
}
int pow2(int x) {
return (1 << x);
}