24 #ifndef BOOL// used in bin reader
38 #define COPYRIGHT "Marco"
54 #ifndef __STDC_LIMIT_MACROS
55 #define __STDC_LIMIT_MACROS
61 #define ULongint uint_64_t //unsigned long long
63 #define ULLONG_MAX UINT64_MAX //=18446744073709551615 //9223372036854775807ULL*2
64 #define ULLONG_MIN 0 //(-LLONG_MAX - 1LL)
68 #define LLONG_MAX INT64_MAX //=9,223,372,036,854,775,807 //9223372036854775807LL
69 #define LLONG_MIN INT64_MIN //(-LLONG_MAX - 1LL)
72 #define Longint int64_t //long long
73 #define LONGINT_MAX LLONG_MAX
74 #define LONGINT_MIN LLONG_MIN
75 #ifndef LONGINT_FORMAT
76 #if defined(_APPLE_) || defined(_unix_)
77 #define LONGINT_FORMAT "ld"
78 #elif defined(_WIN32) || defined(_WIN64)
79 #define LONGINT_FORMAT "I64d"
81 #define LONGINT_FORMAT "ld"
87 #define INT_MAX INT32_MAX // 2,147,483,647
88 #define INT_MIN INT32_MIN // -2,147,483,647
91 #define Shortint int16_t
93 #define SINT_MAX INT16_MAX // 2,147,483,647
94 #define SINT_MIN INT16_MIN // -2,147,483,647
98 #define fvalue int32_t
99 #define FVALUE_MAX INT32_MAX
101 #define Color int16_t // could be int16_t 32,767 // need -1 as no color sometimes
102 #define COLOR_MAX INT16_MAX
103 #define Vertex uint16_t // could be int16_t max 65,535
104 #define VERTEX_MAX UINT16_MAX
110 #ifndef HAVE_BASENAME
111 #define basename(s) (strrchr((s), '/') == NULL ? (s) : strrchr((s), '/') + 1)
119 #define REAL_MAX (Real)DBL_MAX
120 #define REAL_MIN -(Real)DBL_MAX
121 #define REAL_FORMAT "lf"
123 #define DEFAULT_INFINITY 1e+20
124 #define DEFAULT_EPSILON 1e-09
125 #define DEFAULT_SUMEPSILON 1e-06
126 #define DEFAULT_FEASTOL 1e-06
127 #define DEFAULT_DUALFEASTOL 1e-09
128 #define DEFAULT_BARRIERCONVTOL 1e-10
129 #define DEFAULT_BOUNDSTREPS 0.05
130 #define DEFAULT_PSEUDOCOSTEPS 1e-01
131 #define DEFAULT_PSEUDOCOSTDELTA 1e-04
132 #define MAXEPSILON 1e-03
133 #define MINEPSILON 1e-20
134 #define INVALID 1e+99
135 #define UNKNOWN 1e+98
137 #define REALABS(x) (fabs(x))
138 #define EPSEQ(x,y,eps) (REALABS((x)-(y)) <= (eps))
139 #define EPSLT(x,y,eps) ((x)-(y) < -(eps))
140 #define EPSLE(x,y,eps) ((x)-(y) <= (eps))
141 #define EPSGT(x,y,eps) ((x)-(y) > (eps))
142 #define EPSGE(x,y,eps) ((x)-(y) >= -(eps))
143 #define EPSZ(x,eps) (REALABS(x) <= (eps))
144 #define EPSP(x,eps) ((x) > (eps))
145 #define EPSN(x,eps) ((x) < -(eps))
146 #define EPSFLOOR(x,eps) (floor((x)+(eps)))
147 #define EPSCEIL(x,eps) (ceil((x)-(eps)))
148 #define EPSFRAC(x,eps) ((x)-EPSFLOOR(x,eps))
149 #define EPSISINT(x,eps) (EPSFRAC(x,eps) <= (eps))
152 #define SQR(x) ((x)*(x))
153 #define SQRT(x) (sqrt(x))
157 #define ABS(x) ((x) >= 0 ? (x) : -(x))
161 #define MAX(x,y) ((x) >= (y) ? (x) : (y))
162 #define MIN(x,y) ((x) <= (y) ? (x) : (y))
166 #define MAX3(x,y,z) ((x) >= (y) ? MAX(x,z) : MAX(y,z))
167 #define MIN3(x,y,z) ((x) <= (y) ? MIN(x,z) : MIN(y,z))
175 #define NULL ((void*)0)
182 #define MAXSTRLEN 1024
183 #if defined(_WIN32) || defined(_WIN64)
184 #define snprintf _snprintf
185 #define vsnprintf _vsnprintf
186 #define strcasecmp _stricmp
187 #define strncasecmp _strnicmp
194 #define HASHSIZE_NAMES 131101
195 #define HASHSIZE_CUTPOOLS 131101
196 #define HASHSIZE_CLIQUES 131101
197 #define HASHSIZE_PARAMS 4099
198 #define HASHSIZE_VBC 131101
212 #define ABORT() assert(FALSE)
214 #define CALL_ABORT_QUIET(x) do { if( (x) != OKAY ) ABORT(); } while( FALSE )
216 #define CALL_QUIET(x)
217 #define ALLOC_ABORT_QUIET(x) do { if( NULL == (x) ) ABORT(); } while( FALSE )
218 #define ALLOC_QUIET(x) do { if( NULL == (x) ) return NOMEMORY; } while( FALSE )
220 #define CALL_ABORT(x) do \
223 if( (_restat_ = (x)) != OKAY ) \
225 printf("Error <%d> in function call\n", _restat_); \
231 #define ALLOC_ABORT(x) do \
235 printf("No memory in function call\n", __FILE__, __LINE__); \
244 if( (_restat_ = (x)) != OKAY ) \
246 printf("Error <%d> in function call\n", _restat_); \
252 #define ALLOC(x) do \
256 printf("No memory in function call\n"); \
270 #define ASCII_FORMAT 1
271 #define GZIP_FORMAT 2
275 #define PARTIAL_REPR 1
276 #define COMPLETE_REPR 0
279 #define TL_ADAPTIVE 1
280 #define TL_INTERVAL 2
291 #define CONSTRUCTION_HEUR 100
292 #define RANDOM_RESTART 0
293 #define FIXED_K_COL 1
294 #define SEQUENCE_K_COL 2
296 #define PENALTY_FUNCTION 6
298 #define X_RLF_SOLVER 5
299 #define PORUMBELS_EA 110
300 #define MALAGUTIS_EA 120
301 #define EX_DSATUR_SOLVER 130
308 #define TABU_REACTIVE 12
314 #define MIN_CONFLICT 71
315 #define X_RLF_RUNNER 30
316 #define EX_DSATUR_RUNNER 130
326 #define DSATUR_FIXED 6
327 #define FROM_INPUT_FILE 7
329 #define RLF_REVERSE 11
331 #define CONFLICT_EDGES
std::set< Vertex > VertexSet
std::vector< Color > ColorMap