00001 /* EGlib "Efficient General Library" provides some basic structures and 00002 * algorithms commons in many optimization algorithms. 00003 * 00004 * Copyright (C) 2005 Daniel Espinoza and Marcos Goycoolea. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by the 00008 * Free Software Foundation; either version 2.1 of the License, or (at your 00009 * option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00013 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00014 * License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with this library; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 * */ 00020 /* ========================================================================= */ 00021 /** Main Configuration for the library, as debug levels and so on 00022 * 00023 * @par History: 00024 * - 2006-01-27 00025 * - Handle some problems with stdint.h in SUN 00026 * - 2005-08-17 00027 * - Set memory aligment to 8 bits 00028 * - 2003-06-02 00029 * - First Implementation 00030 * @version 0.0.1 00031 * */ 00032 /* ========================================================================= */ 00033 #ifndef __EG_CONGIH_H__ 00034 #define __EG_CONFIG_H__ 00035 #define _XOPEN_SOURCE 600 00036 #include <stdlib.h> 00037 00038 /* ========================================================================= */ 00039 /* Operating system definitions, so far we can choose LINUX or SUN */ 00040 /* ========================================================================= */ 00041 #define LINUX 0 00042 #define SUN 1 00043 #ifndef OS 00044 #define OS LINUX 00045 #endif 00046 #if ( (OS > SUN) || (OS < LINUX) ) 00047 #error OS configuration value unknown 00048 #endif 00049 00050 /* ========================================================================= */ 00051 /* Depending on the OS, we include some files and make some definitions */ 00052 /* ========================================================================= */ 00053 #if OS == LINUX 00054 #include <getopt.h> 00055 #include <stdint.h> 00056 #endif 00057 00058 00059 /* ========================================================================= */ 00060 /* Debug options, by defoult set on */ 00061 /* ========================================================================= */ 00062 #ifndef DEBUG 00063 #define DEBUG 1 00064 #endif 00065 00066 /* ========================================================================= */ 00067 /* Verbose options, by default set on */ 00068 /* ========================================================================= */ 00069 #ifndef VERBOSE_LEVEL 00070 #define VERBOSE_LEVEL 1 00071 #endif 00072 00073 /* ========================================================================= */ 00074 /* EG_BIT options */ 00075 /* ========================================================================= */ 00076 /* the debug level indicates what is the minimum debug level to start generating 00077 * messages of the operation for this suit, by defoult is 10, note that the 00078 * lower the level, the more messages that we will generate. */ 00079 #ifndef __EGBIT_DEBUG_LEVEL__ 00080 #define __EGBIT_DEBUG_LEVEL__ 10 00081 #endif 00082 00083 /* ========================================================================= */ 00084 /* EG_HASH options */ 00085 /* ========================================================================= */ 00086 /* this macro allow us to add more debug information in the hash table */ 00087 #ifndef __EG_HASH_CHECK__ 00088 #if DEBUG 00089 #define __EG_HASH_CHECK__ 1 00090 #else 00091 #define __EG_HASH_CHECK__ 0 00092 #endif 00093 #endif 00094 00095 /* this macro controls wether we support multiple elements with the same key */ 00096 #ifndef __EG_HASH_ALLOW_REPETITION__ 00097 #if DEBUG 00098 #define __EG_HASH_ALLOW_REPETITION__ 0 00099 #else 00100 #define __EG_HASH_ALLOW_REPETITION__ 1 00101 #endif 00102 #endif 00103 00104 /* this macro controls whether we display statistics about the hash table */ 00105 #ifndef __EG_HASH_PROFILE__ 00106 #if DEBUG 00107 #define __EG_HASH_PROFILE__ 1 00108 #else 00109 #define __EG_HASH_PROFILE__ 0 00110 #endif 00111 #endif 00112 00113 /* we can't set profile to one if the check mode is not available */ 00114 #if ((__EG_HASH_CHECK__== 0) && (__EG_HASH_PROFILE__ > 0)) 00115 #undef __EG_HASH_PROFILE__ 00116 #define __EG_HASH_PROFILE__ 0 00117 #endif 00118 00119 /* ========================================================================= */ 00120 /* EG_CPLEX options */ 00121 /* ========================================================================= */ 00122 /* if we have CPLEX installed in our system, we say it here */ 00123 #ifndef __EG_HAVE_CPLEX__ 00124 #ifdef HAVE_CPLEX 00125 #define __EG_HAVE_CPLEX__ 1 00126 #else 00127 #define __EG_HAVE_CPLEX__ 0 00128 #endif 00129 #endif 00130 /* if set to nonzero value, the library will check for consistency all the 00131 * insertions and delet operations in the LP */ 00132 #ifndef __EG_CPLEX_EXTRADEBUG__ 00133 #define __EG_CPLEX_EXTRADEBUG__ 0 00134 #endif 00135 00136 /* ========================================================================= */ 00137 /* EG_FP options */ 00138 /* ========================================================================= */ 00139 /* this enable check of overflows in the EGfp_t operations, this means that if 00140 * we perform an overflow operation, or work with overflow numbers, the resoult 00141 * will have the overflow bit set. */ 00142 #ifndef __EGFP_CHECK_OVERFLOW__ 00143 #define __EGFP_CHECK_OVERFLOW__ 0 00144 #endif 00145 00146 /* this enable (on top of overflow check) varbose messages when overflow is 00147 * detected */ 00148 #ifndef __EGFP_CHECK_VERBOSE__ 00149 #define __EGFP_CHECK_VERBOSE__ 0 00150 #endif 00151 00152 /* end eg_config.h */ 00153 #endif
1.4.5