| BWAPI
   
    | 


Go to the source code of this file.
| Defines | |
| #define | LONG_BIT (sizeof(long) * 8) | 
| #define | CORE_EPS ((1.0/(1<<30))/(1<<23)) | 
| CORE_EPS is unit roundoff for IEEE standard double, i.e., 2^{-53}. | |
| #define | CORE_MACHINE_EPS ((1.0/(1<<30))/(1<<22)) | 
| Functions | |
| template<class T > | |
| const T & | core_max (const T &a, const T &b) | 
| template function returns the maximum value of two | |
| template<class T > | |
| const T & | core_min (const T &a, const T &b) | 
| template function returns the minimum value of two | |
| template<class T > | |
| const T & | core_max (const T &a, const T &b, const T &c) | 
| template function returns the maximum value of three | |
| template<class T > | |
| void | core_swap (T &a, T &b) | 
| template function swaps two values | |
| template<class T > | |
| void | core_rotate (T &a, T &b, T &c) | 
| template function rotate three values | |
| template<class T > | |
| const T & | core_min (const T &a, const T &b, const T &c) | 
| template function returns the minimum value of three | |
| template<class T > | |
| const T | core_abs (const T &a) | 
| template function returns the absolute value | |
| int | flrLg (long x) | 
| returns floor log base 2 of abs(x) | |
| int | flrLg (unsigned long x) | 
| returns floor log base 2 of unsigned long x | |
| int | clLg (long x) | 
| returns ceiling log base 2 of abs(x) | |
| int | clLg (unsigned long x) | 
| returns ceiling log base 2 of unsigned long x | |
| long | gcd (long m, long n) | 
| gcd for machine type long | |
| int | abs (int x) | 
| abs for int type | |
| long | abs (long x) | 
| abs for long type | |
| int | sign (int x) | 
| sign for int type | |
| long | sign (long x) | 
| sign for long type | |
| std::ostream & | operator<< (std::ostream &o, const std::string &s) | 
| overloaded << to print out std::string | |
| double | IntMantissa (double d) | 
| implements the "integer mantissa" function | |
| int | IntExponent (double d) | 
| implements the "integer exponent" function | |
| void | core_error (std::string msg, std::string file, int lineno, bool err) | 
| Writes out an error or warning message in the local file CORE_DIAGFILE. | |
| void | core_debug (std::string msg) | 
| This is for debugging messages. | |
| Variables | |
| const double | relEps = (1.0 + std::ldexp(1.0, -52)) | 
| relEps is relative error for IEEE standard double, 1+2^{-52}. | |
| const char * | CORE_DIAGFILE | 
| CORE_DIAGFILE is used for all warning and error messages. | |
| #define CORE_EPS ((1.0/(1<<30))/(1<<23)) | 
CORE_EPS is unit roundoff for IEEE standard double, i.e., 2^{-53}.
| #define CORE_MACHINE_EPS ((1.0/(1<<30))/(1<<22)) | 
| #define LONG_BIT (sizeof(long) * 8) | 
| int abs | ( | int | x | ) |  [inline] | 
abs for int type
| long abs | ( | long | x | ) |  [inline] | 
abs for long type
| int clLg | ( | long | x | ) | 
returns ceiling log base 2 of abs(x)
CONVENTION: lg(0) = -1

| int clLg | ( | unsigned long | x | ) | 
returns ceiling log base 2 of unsigned long x
CONVENTION: lg(0) = -1
| const T core_abs | ( | const T & | a | ) |  [inline] | 
template function returns the absolute value

| void core_debug | ( | std::string | msg | ) |  [inline] | 
This is for debugging messages.
| void core_error | ( | std::string | msg, | 
| std::string | file, | ||
| int | lineno, | ||
| bool | err | ||
| ) | 
Writes out an error or warning message in the local file CORE_DIAGFILE.
If last argument (err) is TRUE, then this is considered an error (not just warning). In this case, the message is also printed in std::cerr, using std::perror().

| const T& core_max | ( | const T & | a, | 
| const T & | b | ||
| ) |  [inline] | 
template function returns the maximum value of two

| const T& core_max | ( | const T & | a, | 
| const T & | b, | ||
| const T & | c | ||
| ) |  [inline] | 
template function returns the maximum value of three

| const T& core_min | ( | const T & | a, | 
| const T & | b | ||
| ) |  [inline] | 
template function returns the minimum value of two

| const T& core_min | ( | const T & | a, | 
| const T & | b, | ||
| const T & | c | ||
| ) |  [inline] | 
template function returns the minimum value of three

| void core_rotate | ( | T & | a, | 
| T & | b, | ||
| T & | c | ||
| ) |  [inline] | 
template function rotate three values
| void core_swap | ( | T & | a, | 
| T & | b | ||
| ) |  [inline] | 
template function swaps two values
| int flrLg | ( | long | x | ) | 
returns floor log base 2 of abs(x)
CONVENTION: lg(0) = -1

| int flrLg | ( | unsigned long | x | ) | 
returns floor log base 2 of unsigned long x
CONVENTION: lg(0) = -1
| long gcd | ( | long | m, | 
| long | n | ||
| ) | 
gcd for machine type long
| int IntExponent | ( | double | d | ) | 
implements the "integer exponent" function
| double IntMantissa | ( | double | d | ) | 
implements the "integer mantissa" function
| std::ostream& operator<< | ( | std::ostream & | o, | 
| const std::string & | s | ||
| ) |  [inline] | 
overloaded << to print out std::string
| int sign | ( | int | x | ) |  [inline] | 
sign for int type
| long sign | ( | long | x | ) |  [inline] | 
sign for long type
| const char* CORE_DIAGFILE | 
CORE_DIAGFILE is used for all warning and error messages.
| const double relEps = (1.0 + std::ldexp(1.0, -52)) | 
relEps is relative error for IEEE standard double, 1+2^{-52}.
 1.7.6.1
 1.7.6.1