00001 /* 00002 * Copyright 2007 Martin von Gagern 00003 * 00004 * 00005 * This file is part of bande. 00006 * 00007 * bande is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * bande is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 00022 /** 00023 * @file 00024 * 00025 * Master header for all project sources. 00026 * 00027 * This file includes all headers that are used anywhere in the 00028 * project, both system headers and project internal headers. 00029 * In this way, no part has to worry about the order of header files, 00030 * and no header file must ward against being included multiple 00031 * times. The downside is a bit more compilation time for unneccessary 00032 * headers. 00033 */ 00034 00035 #ifndef BANDE_HH 00036 #define BANDE_HH 00037 00038 #ifndef _GNU_SOURCE 00039 #define _GNU_SOURCE 00040 #endif 00041 00042 #include <utility> 00043 #include <iostream> 00044 #include <sstream> 00045 #include <fstream> 00046 #include <iomanip> 00047 #include <limits> 00048 00049 #include <cstdlib> 00050 #include <cmath> 00051 00052 #include <getopt.h> 00053 #include <sys/time.h> 00054 #include <sys/resource.h> 00055 00056 #include <coin/CoinHelperFunctions.hpp> 00057 #include <coin/CoinPackedMatrix.hpp> 00058 #include <coin/OsiSolverInterface.hpp> 00059 #include <coin/OsiClpSolverInterface.hpp> 00060 00061 #ifdef NDEBUG 00062 #define DBGN(bit,message) 00063 #else 00064 /** 00065 * Print debug message without newline. 00066 * 00067 * If any of the bits specified in this invocation are part of the 00068 * global debug bit mask Settings::debug, then the message will be 00069 * printed to standard error. As this is a macro, message may contain 00070 * multiple items to be printed, seperated from one another using 00071 * @c @<@< operators. When no debug is activated, no unneccessary 00072 * conversion to strings will take place either. 00073 * 00074 * This whole macro is conditioned on the preprocessor switch NDEBUG 00075 * not being defined. Setting that switch will remove all debug code 00076 * from the program. 00077 * 00078 * @param bit a bit mask, usually with a single bit set, specifying 00079 * the class of messages that this message belongs to. 00080 * @param message the message to be printed, maybe containing 00081 * several parts separated by @c @<@<. 00082 */ 00083 #define DBGN(bit,message) \ 00084 do{ if (Settings::debug & bit) std::cerr << message; } while(0) 00085 #endif 00086 /** 00087 * Print a debug message with newline. 00088 * 00089 * This is just like DBGN(), except that std::endl will be appended to 00090 * the message. 00091 * 00092 * @param bit a bit mask, usually with a single bit set, specifying 00093 * the class of messages that this message belongs to. 00094 * @param message the message to be printed, maybe containing 00095 * several parts separated by @c @<@<. 00096 */ 00097 #define DBG(bit,message) \ 00098 DBGN(bit, message << std::endl) 00099 00100 /** 00101 * @namespace bande 00102 * Namespace of the main BandE implementation. 00103 * 00104 * All functionality of the main program is included within this 00105 * namespace. This allows future extensions to use different 00106 * namespaces without ever worrying about name clashes. 00107 */ 00108 00109 #include "Settings.hh" 00110 #include "UndoManager.hh" 00111 #include "Statistics.hh" 00112 #include "LinearProgram.hh" 00113 #include "IntegerProgram.hh" 00114 #include "Solutions.hh" 00115 #include "BranchControl.hh" 00116 00117 #endif // BANDE_HH
1.6.0