00001
00002 #ifndef _WALKSAT_UTIL_H_
00003 #define _WALKSAT_UTIL_H_
00004
00005 #define BLOCKSIZE 2000000 // size of block to malloc each time
00006
00007 #define BIG 100000000
00008
00009 #define MAXLENGTH 1000
00010
00011 #define RANDOM 0
00012 #define PRODUCTSUM 1
00013 #define RECIPROCAL 2
00014 #define ADDITIVE 3
00015 #define BEST 4
00016 #define EXPONENTIAL 5
00017 #define TABU 6
00018
00019 #define NOVALUE -1
00020
00021 #define INIT_PARTIAL 1
00022
00023
00024 class WSUtil
00025 {
00026 public:
00027 static int makeNegatedLiteral(const int& lit) { return lit | 0x80000000; }
00028 static int isLiteralNegated(const int& lit) { return lit & 0x80000000; }
00029 static int getLiteral(const int& lit) { return lit & 0x7FFFFFFF; }
00030
00031
00032 };
00033
00034 #endif
00035