|
EasyLocalpp
3.0
|
#include <cstdio>#include <cmath>#include <climits>#include <cfloat>#include <cassert>#include <cstdlib>#include <vector>#include <set>#include <map>#include <stdint.h>

Go to the source code of this file.
Macros | |
| #define | BOOL char |
| #define | Bool uint8_t |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | VERSION 500 |
| #define | SUBVERSION 0 |
| #define | COPYRIGHT "Marco" |
| #define | __STDC_LIMIT_MACROS |
| #define | ULongint uint_64_t |
| #define | ULLONG_MAX UINT64_MAX |
| #define | ULLONG_MIN 0 |
| #define | LLONG_MAX INT64_MAX |
| #define | LLONG_MIN INT64_MIN |
| #define | Longint int64_t |
| #define | LONGINT_MAX LLONG_MAX |
| #define | LONGINT_MIN LLONG_MIN |
| #define | LONGINT_FORMAT "ld" |
| #define | Int int32_t |
| #define | INT_MAX INT32_MAX |
| #define | INT_MIN INT32_MIN |
| #define | Shortint int16_t |
| #define | SINT_MAX INT16_MAX |
| #define | SINT_MIN INT16_MIN |
| #define | fvalue int32_t |
| #define | FVALUE_MAX INT32_MAX |
| #define | Color int16_t |
| #define | COLOR_MAX INT16_MAX |
| #define | Vertex uint16_t |
| #define | VERTEX_MAX UINT16_MAX |
| #define | basename(s) (strrchr((s), '/') == NULL ? (s) : strrchr((s), '/') + 1) |
| #define | Real double |
| #define | REAL_MAX (Real)DBL_MAX |
| #define | REAL_MIN -(Real)DBL_MAX |
| #define | REAL_FORMAT "lf" |
| #define | DEFAULT_INFINITY 1e+20 |
| #define | DEFAULT_EPSILON 1e-09 |
| #define | DEFAULT_SUMEPSILON 1e-06 |
| #define | DEFAULT_FEASTOL 1e-06 |
| #define | DEFAULT_DUALFEASTOL 1e-09 |
| #define | DEFAULT_BARRIERCONVTOL 1e-10 |
| #define | DEFAULT_BOUNDSTREPS 0.05 |
| #define | DEFAULT_PSEUDOCOSTEPS 1e-01 |
| #define | DEFAULT_PSEUDOCOSTDELTA 1e-04 |
| #define | MAXEPSILON 1e-03 |
| #define | MINEPSILON 1e-20 |
| #define | INVALID 1e+99 |
| #define | UNKNOWN 1e+98 |
| #define | REALABS(x) (fabs(x)) |
| #define | EPSEQ(x, y, eps) (REALABS((x)-(y)) <= (eps)) |
| #define | EPSLT(x, y, eps) ((x)-(y) < -(eps)) |
| #define | EPSLE(x, y, eps) ((x)-(y) <= (eps)) |
| #define | EPSGT(x, y, eps) ((x)-(y) > (eps)) |
| #define | EPSGE(x, y, eps) ((x)-(y) >= -(eps)) |
| #define | EPSZ(x, eps) (REALABS(x) <= (eps)) |
| #define | EPSP(x, eps) ((x) > (eps)) |
| #define | EPSN(x, eps) ((x) < -(eps)) |
| #define | EPSFLOOR(x, eps) (floor((x)+(eps))) |
| #define | EPSCEIL(x, eps) (ceil((x)-(eps))) |
| #define | EPSFRAC(x, eps) ((x)-EPSFLOOR(x,eps)) |
| #define | EPSISINT(x, eps) (EPSFRAC(x,eps) <= (eps)) |
| #define | SQR(x) ((x)*(x)) |
| #define | SQRT(x) (sqrt(x)) |
| #define | ABS(x) ((x) >= 0 ? (x) : -(x)) |
| #define | MAX(x, y) ((x) >= (y) ? (x) : (y)) |
| #define | MIN(x, y) ((x) <= (y) ? (x) : (y)) |
| #define | MAX3(x, y, z) ((x) >= (y) ? MAX(x,z) : MAX(y,z)) |
| #define | MIN3(x, y, z) ((x) <= (y) ? MIN(x,z) : MIN(y,z)) |
| #define | NULL ((void*)0) |
| #define | MAXSTRLEN 1024 |
| #define | HASHSIZE_NAMES 131101 |
| #define | HASHSIZE_CUTPOOLS 131101 |
| #define | HASHSIZE_CLIQUES 131101 |
| #define | HASHSIZE_PARAMS 4099 |
| #define | HASHSIZE_VBC 131101 |
| #define | ABORT() assert(FALSE) |
| #define | CALL_ABORT_QUIET(x) do { if( (x) != OKAY ) ABORT(); } while( FALSE ) |
| #define | CALL_QUIET(x) |
| #define | ALLOC_ABORT_QUIET(x) do { if( NULL == (x) ) ABORT(); } while( FALSE ) |
| #define | ALLOC_QUIET(x) do { if( NULL == (x) ) return NOMEMORY; } while( FALSE ) |
| #define | CALL_ABORT(x) |
| #define | ALLOC_ABORT(x) |
| #define | CALL(x) |
| #define | ALLOC(x) |
| #define | ASCII_FORMAT 1 |
| #define | GZIP_FORMAT 2 |
| #define | BIN_FORMAT 3 |
| #define | PARTIAL_REPR 1 |
| #define | COMPLETE_REPR 0 |
| #define | TL_ADAPTIVE 1 |
| #define | TL_INTERVAL 2 |
| #define | TL_FIXED 3 |
| #define | INV_OLD 1 |
| #define | INV_NEW 2 |
| #define | INV_NEWOLD 3 |
| #define | INV_VERTEX 4 |
| #define | VLSN 5 |
| #define | CONSTRUCTION_HEUR 100 |
| #define | RANDOM_RESTART 0 |
| #define | FIXED_K_COL 1 |
| #define | SEQUENCE_K_COL 2 |
| #define | HYBRID_EA 4 |
| #define | PENALTY_FUNCTION 6 |
| #define | HEA_RLF 12 |
| #define | X_RLF_SOLVER 5 |
| #define | PORUMBELS_EA 110 |
| #define | MALAGUTIS_EA 120 |
| #define | EX_DSATUR_SOLVER 130 |
| #define | BASIC 0 |
| #define | TABUCOL 1 |
| #define | PARTIALCOL 2 |
| #define | TABU_HASH 11 |
| #define | TABU_REACTIVE 12 |
| #define | TABU_VLSN 26 |
| #define | SA_KEMPE 45 |
| #define | GLS 50 |
| #define | ILS 60 |
| #define | NOVELTY 70 |
| #define | MIN_CONFLICT 71 |
| #define | X_RLF_RUNNER 30 |
| #define | EX_DSATUR_RUNNER 130 |
| #define | RANDOM 0 |
| #define | ROS 1 |
| #define | ROS_FIXED 2 |
| #define | RLF 3 |
| #define | RLF_FIXED 4 |
| #define | DSATUR 5 |
| #define | DSATUR_FIXED 6 |
| #define | FROM_INPUT_FILE 7 |
| #define | RLF_STATIC 9 |
| #define | RLF_REVERSE 11 |
| #define | CONFLICT_EDGES |
Typedefs | |
| typedef enum RetCode | RETCODE |
| typedef std::vector< Color > | ColorMap |
| typedef std::set< Vertex > | VertexSet |
Enumerations | |
| enum | RetCode { OKAY = 1, PARSEERROR = 2, INVALIDDATA = 3, MEMORYERROR = 4, PARAMETERUNKNOWN = 5, PARAMETERWRONGTYPE = 6 } |
| #define __STDC_LIMIT_MACROS |
Definition at line 55 of file Definitions.h.
| #define ABORT | ( | ) | assert(FALSE) |
Definition at line 212 of file Definitions.h.
| #define ABS | ( | x | ) | ((x) >= 0 ? (x) : -(x)) |
Definition at line 157 of file Definitions.h.
| #define ALLOC | ( | x | ) |
Definition at line 252 of file Definitions.h.
| #define ALLOC_ABORT | ( | x | ) |
Definition at line 217 of file Definitions.h.
Definition at line 218 of file Definitions.h.
| #define ASCII_FORMAT 1 |
Further definitions due to GCP Numbers have been assigned chaotically during the development phase and have not been rearranged since then
Definition at line 270 of file Definitions.h.
| #define basename | ( | s | ) | (strrchr((s), '/') == NULL ? (s) : strrchr((s), '/') + 1) |
Definition at line 111 of file Definitions.h.
| #define BASIC 0 |
Definition at line 304 of file Definitions.h.
| #define BIN_FORMAT 3 |
Definition at line 272 of file Definitions.h.
| #define BOOL char |
Definition at line 25 of file Definitions.h.
| #define Bool uint8_t |
type used for boolean values
Definition at line 29 of file Definitions.h.
| #define CALL | ( | x | ) |
Definition at line 241 of file Definitions.h.
| #define CALL_ABORT | ( | x | ) |
Definition at line 220 of file Definitions.h.
Definition at line 214 of file Definitions.h.
| #define CALL_QUIET | ( | x | ) |
Definition at line 216 of file Definitions.h.
| #define Color int16_t |
Definition at line 101 of file Definitions.h.
| #define COLOR_MAX INT16_MAX |
Definition at line 102 of file Definitions.h.
| #define COMPLETE_REPR 0 |
Definition at line 276 of file Definitions.h.
| #define CONFLICT_EDGES |
Definition at line 331 of file Definitions.h.
| #define CONSTRUCTION_HEUR 100 |
Definition at line 291 of file Definitions.h.
| #define COPYRIGHT "Marco" |
Definition at line 38 of file Definitions.h.
| #define DEFAULT_BARRIERCONVTOL 1e-10 |
default convergence tolerance used in barrier algorithm
Definition at line 128 of file Definitions.h.
| #define DEFAULT_BOUNDSTREPS 0.05 |
default minimal relative improve for strengthening bounds
Definition at line 129 of file Definitions.h.
| #define DEFAULT_DUALFEASTOL 1e-09 |
default feasibility tolerance for reduced costs
Definition at line 127 of file Definitions.h.
| #define DEFAULT_EPSILON 1e-09 |
default upper bound for floating points to be considered zero
Definition at line 124 of file Definitions.h.
| #define DEFAULT_FEASTOL 1e-06 |
default feasibility tolerance for constraints
Definition at line 126 of file Definitions.h.
| #define DEFAULT_INFINITY 1e+20 |
default value considered to be infinity
Definition at line 123 of file Definitions.h.
| #define DEFAULT_PSEUDOCOSTDELTA 1e-04 |
default minimal objective distance value to use for pseudo cost updates
Definition at line 131 of file Definitions.h.
| #define DEFAULT_PSEUDOCOSTEPS 1e-01 |
default minimal variable distance value to use for pseudo cost updates
Definition at line 130 of file Definitions.h.
| #define DEFAULT_SUMEPSILON 1e-06 |
default upper bound for sums of floating points to be considered zero
Definition at line 125 of file Definitions.h.
| #define DSATUR 5 |
Definition at line 325 of file Definitions.h.
| #define DSATUR_FIXED 6 |
Definition at line 326 of file Definitions.h.
| #define EPSCEIL | ( | x, | |
| eps | |||
| ) | (ceil((x)-(eps))) |
Definition at line 147 of file Definitions.h.
| #define EPSEQ | ( | x, | |
| y, | |||
| eps | |||
| ) | (REALABS((x)-(y)) <= (eps)) |
Definition at line 138 of file Definitions.h.
| #define EPSFLOOR | ( | x, | |
| eps | |||
| ) | (floor((x)+(eps))) |
Definition at line 146 of file Definitions.h.
| #define EPSFRAC | ( | x, | |
| eps | |||
| ) | ((x)-EPSFLOOR(x,eps)) |
Definition at line 148 of file Definitions.h.
| #define EPSGE | ( | x, | |
| y, | |||
| eps | |||
| ) | ((x)-(y) >= -(eps)) |
Definition at line 142 of file Definitions.h.
| #define EPSGT | ( | x, | |
| y, | |||
| eps | |||
| ) | ((x)-(y) > (eps)) |
Definition at line 141 of file Definitions.h.
| #define EPSISINT | ( | x, | |
| eps | |||
| ) | (EPSFRAC(x,eps) <= (eps)) |
Definition at line 149 of file Definitions.h.
| #define EPSLE | ( | x, | |
| y, | |||
| eps | |||
| ) | ((x)-(y) <= (eps)) |
Definition at line 140 of file Definitions.h.
| #define EPSLT | ( | x, | |
| y, | |||
| eps | |||
| ) | ((x)-(y) < -(eps)) |
Definition at line 139 of file Definitions.h.
| #define EPSN | ( | x, | |
| eps | |||
| ) | ((x) < -(eps)) |
Definition at line 145 of file Definitions.h.
| #define EPSP | ( | x, | |
| eps | |||
| ) | ((x) > (eps)) |
Definition at line 144 of file Definitions.h.
| #define EPSZ | ( | x, | |
| eps | |||
| ) | (REALABS(x) <= (eps)) |
Definition at line 143 of file Definitions.h.
| #define EX_DSATUR_RUNNER 130 |
Definition at line 316 of file Definitions.h.
| #define EX_DSATUR_SOLVER 130 |
Definition at line 301 of file Definitions.h.
| #define FALSE 0 |
boolean value FALSE
Definition at line 32 of file Definitions.h.
| #define FIXED_K_COL 1 |
Definition at line 293 of file Definitions.h.
| #define FROM_INPUT_FILE 7 |
Definition at line 327 of file Definitions.h.
| #define fvalue int32_t |
Definition at line 98 of file Definitions.h.
| #define FVALUE_MAX INT32_MAX |
Definition at line 99 of file Definitions.h.
| #define GLS 50 |
Definition at line 311 of file Definitions.h.
| #define GZIP_FORMAT 2 |
Definition at line 271 of file Definitions.h.
| #define HASHSIZE_CLIQUES 131101 |
size of hash table in clique tables
Definition at line 196 of file Definitions.h.
| #define HASHSIZE_CUTPOOLS 131101 |
size of hash table in cut pools
Definition at line 195 of file Definitions.h.
| #define HASHSIZE_NAMES 131101 |
size of hash table in name tables
Definition at line 194 of file Definitions.h.
| #define HASHSIZE_PARAMS 4099 |
size of hash table in parameter name tables
Definition at line 197 of file Definitions.h.
| #define HASHSIZE_VBC 131101 |
size of hash map for node -> nodenum mapping used for VBC output
Definition at line 198 of file Definitions.h.
| #define HEA_RLF 12 |
Definition at line 297 of file Definitions.h.
| #define HYBRID_EA 4 |
Definition at line 295 of file Definitions.h.
| #define ILS 60 |
Definition at line 312 of file Definitions.h.
| #define Int int32_t |
Definition at line 85 of file Definitions.h.
| #define INT_MAX INT32_MAX |
Definition at line 87 of file Definitions.h.
| #define INT_MIN INT32_MIN |
Definition at line 88 of file Definitions.h.
| #define INV_NEW 2 |
Definition at line 285 of file Definitions.h.
| #define INV_NEWOLD 3 |
Definition at line 286 of file Definitions.h.
| #define INV_OLD 1 |
Definition at line 284 of file Definitions.h.
| #define INV_VERTEX 4 |
Definition at line 287 of file Definitions.h.
| #define INVALID 1e+99 |
floating point value is not valid
Definition at line 134 of file Definitions.h.
| #define LLONG_MAX INT64_MAX |
Definition at line 68 of file Definitions.h.
| #define LLONG_MIN INT64_MIN |
Definition at line 69 of file Definitions.h.
| #define Longint int64_t |
Definition at line 72 of file Definitions.h.
| #define LONGINT_FORMAT "ld" |
Definition at line 81 of file Definitions.h.
| #define LONGINT_MAX LLONG_MAX |
Definition at line 73 of file Definitions.h.
| #define LONGINT_MIN LLONG_MIN |
Definition at line 74 of file Definitions.h.
| #define MALAGUTIS_EA 120 |
Definition at line 300 of file Definitions.h.
| #define MAX | ( | x, | |
| y | |||
| ) | ((x) >= (y) ? (x) : (y)) |
returns maximum of x and y
Definition at line 161 of file Definitions.h.
returns maximum of x, y, and z
Definition at line 166 of file Definitions.h.
| #define MAXEPSILON 1e-03 |
maximum value for any numerical epsilon
Definition at line 132 of file Definitions.h.
| #define MAXSTRLEN 1024 |
maximum string length in
Definition at line 182 of file Definitions.h.
| #define MIN | ( | x, | |
| y | |||
| ) | ((x) <= (y) ? (x) : (y)) |
returns minimum of x and y
Definition at line 162 of file Definitions.h.
returns minimum of x, y, and z
Definition at line 167 of file Definitions.h.
| #define MIN_CONFLICT 71 |
Definition at line 314 of file Definitions.h.
| #define MINEPSILON 1e-20 |
minimum value for any numerical epsilon
Definition at line 133 of file Definitions.h.
| #define NOVELTY 70 |
Definition at line 313 of file Definitions.h.
| #define NULL ((void*)0) |
zero pointer
Definition at line 175 of file Definitions.h.
| #define PARTIAL_REPR 1 |
Definition at line 275 of file Definitions.h.
| #define PARTIALCOL 2 |
Definition at line 306 of file Definitions.h.
| #define PENALTY_FUNCTION 6 |
Definition at line 296 of file Definitions.h.
| #define PORUMBELS_EA 110 |
Definition at line 299 of file Definitions.h.
| #define RANDOM 0 |
Definition at line 320 of file Definitions.h.
| #define RANDOM_RESTART 0 |
Definition at line 292 of file Definitions.h.
| #define Real double |
type used for floating point values
Definition at line 118 of file Definitions.h.
| #define REAL_FORMAT "lf" |
Definition at line 121 of file Definitions.h.
| #define REAL_MAX (Real)DBL_MAX |
Definition at line 119 of file Definitions.h.
| #define REAL_MIN -(Real)DBL_MAX |
Definition at line 120 of file Definitions.h.
| #define REALABS | ( | x | ) | (fabs(x)) |
Definition at line 137 of file Definitions.h.
| #define RLF 3 |
Definition at line 323 of file Definitions.h.
| #define RLF_FIXED 4 |
Definition at line 324 of file Definitions.h.
| #define RLF_REVERSE 11 |
Definition at line 329 of file Definitions.h.
| #define RLF_STATIC 9 |
Definition at line 328 of file Definitions.h.
| #define ROS 1 |
Definition at line 321 of file Definitions.h.
| #define ROS_FIXED 2 |
Definition at line 322 of file Definitions.h.
| #define SA_KEMPE 45 |
Definition at line 310 of file Definitions.h.
| #define SEQUENCE_K_COL 2 |
Definition at line 294 of file Definitions.h.
| #define Shortint int16_t |
Definition at line 91 of file Definitions.h.
| #define SINT_MAX INT16_MAX |
Definition at line 93 of file Definitions.h.
| #define SINT_MIN INT16_MIN |
Definition at line 94 of file Definitions.h.
| #define SQR | ( | x | ) | ((x)*(x)) |
Definition at line 152 of file Definitions.h.
| #define SQRT | ( | x | ) | (sqrt(x)) |
Definition at line 153 of file Definitions.h.
| #define SUBVERSION 0 |
sub version number
Definition at line 37 of file Definitions.h.
| #define TABU_HASH 11 |
Definition at line 307 of file Definitions.h.
| #define TABU_REACTIVE 12 |
Definition at line 308 of file Definitions.h.
| #define TABU_VLSN 26 |
Definition at line 309 of file Definitions.h.
| #define TABUCOL 1 |
Definition at line 305 of file Definitions.h.
| #define TL_ADAPTIVE 1 |
Definition at line 279 of file Definitions.h.
| #define TL_FIXED 3 |
Definition at line 281 of file Definitions.h.
| #define TL_INTERVAL 2 |
Definition at line 280 of file Definitions.h.
| #define TRUE 1 |
boolean value TRUE
Definition at line 31 of file Definitions.h.
| #define ULLONG_MAX UINT64_MAX |
Definition at line 63 of file Definitions.h.
| #define ULLONG_MIN 0 |
Definition at line 64 of file Definitions.h.
| #define ULongint uint_64_t |
Definition at line 61 of file Definitions.h.
| #define UNKNOWN 1e+98 |
floating point value is not known (in primal solution)
Definition at line 135 of file Definitions.h.
| #define VERSION 500 |
version number (multiplied by 100 to get integer number)
Definition at line 36 of file Definitions.h.
| #define Vertex uint16_t |
Definition at line 103 of file Definitions.h.
| #define VERTEX_MAX UINT16_MAX |
Definition at line 104 of file Definitions.h.
| #define VLSN 5 |
Definition at line 288 of file Definitions.h.
| #define X_RLF_RUNNER 30 |
Definition at line 315 of file Definitions.h.
| #define X_RLF_SOLVER 5 |
Definition at line 298 of file Definitions.h.
Definition at line 107 of file Definitions.h.
Definition at line 48 of file Definitions.h.
Definition at line 108 of file Definitions.h.
| enum RetCode |
| Enumerator | |
|---|---|
| OKAY | |
| PARSEERROR | |
| INVALIDDATA | |
| MEMORYERROR | |
| PARAMETERUNKNOWN | |
| PARAMETERWRONGTYPE | |
Definition at line 40 of file Definitions.h.