Main Page | Class Hierarchy | Class List | File List | Class Members

csp.h

00001 // csp.h -- Interface to all CSP Library objects.
00002 
00003 /*
00004  * Copyright (C) 1997-1998, 2003-2004 Tudor Hulubei <tudor@hulubei.net>.
00005  *
00006  * This library is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as
00008  * published by the Free Software Foundation; either version 2, or (at
00009  * your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA,
00019  * 02111-1307, USA.
00020  */
00021 
00022 // $Id: csp_8h-source.html,v 1.1 2005/05/25 12:37:18 tudor Exp $
00023 
00024 #ifndef _CSP_csp_H
00025 #define _CSP_csp_H
00026 
00027 
00028 #ifndef __cplusplus
00029 #error Must use C++ for csp.
00030 #endif
00031 
00032 #include <csp_config.h>
00033 
00034 // Get the package name and version.
00035 #include <csp_package.h>
00036 
00037 // UNIX header files.
00038 #include <sys/types.h>
00039 
00040 #ifdef CSP_HAVE_CSTDDEF
00041 #include <cstddef>
00042 #endif
00043 
00044 #include <stdexcept>
00045 #include <ctime>
00046 #include <cassert>
00047 #include <climits>
00048 #include <cmath>
00049 #include <cfloat>
00050 #include <cstring>
00051 
00052 #ifndef _MSC_VER
00053 #ifdef CSP_HAVE_UNISTD_H
00054 #include <unistd.h>
00055 #endif
00056 #endif // !_MSC_VER
00057 
00058 // C++ header files.
00059 #include <iterator>
00060 #include <numeric>
00061 #include <string>
00062 #include <set>
00063 #include <list>
00064 #include <vector>
00065 #include <deque>
00066 
00067 // GCC >= 3.2.
00068 #ifdef __GNUG__
00069 #ifdef CSP_HAVE_EXT_HASH_SET
00070 #include <ext/hash_set>
00071 #endif
00072 
00073 #ifdef CSP_HAVE_EXT_HASH_MAP
00074 #include <ext/hash_map>
00075 #endif
00076 
00077 #ifdef CSP_HAVE_EXT_FUNCTIONAL
00078 #include <ext/functional>
00079 #endif
00080 #endif  // __GNUG__
00081 
00082 #ifdef _MSC_VER
00083 #include <hash_set>
00084 #include <hash_map>
00085 #include <functional>
00086 #endif
00087 
00088 #include <algorithm>
00089 #include <iostream>
00090 #include <iomanip>
00091 #include <sstream>
00092 
00093 // Libraries for distributed computing.
00094 #ifdef CSP_HAVE_MPI
00095 #include <mpi.h>
00096 #endif
00097 
00098 
00099 // We're using namespaces (and nested namespaces) quite a lot, but we
00100 // don't want the extra levels of indentation... :-)
00101 #define CSP_NAMESPACE_BEGIN(ns) namespace ns {
00102 #define CSP_NAMESPACE_END(ns) }
00103 
00104 
00105 // Activate std inside csp, for convenience.
00106 CSP_NAMESPACE_BEGIN(csp);
00107 
00108 // Avoid the std:: madness!
00109 using namespace std;
00110 
00111 // GNU C++ defines the hash_* classes in the __gnu_cxx namespace.
00112 #ifdef __GNUG__
00113 using namespace __gnu_cxx;
00114 #endif
00115 
00116 // Visual C++ .Net 2003 defines the hash_classes in the stdext namespace.
00117 #if defined(_MSC_VER) && (_MSC_VER == 1310)
00118 using namespace stdext;
00119 #endif
00120 
00121 // If `true', elements of this vector will be kept ordered based
00122 // on their id.  Otherwise, they will be inserted and removed
00123 // from the vector in the fastest way possible.
00124 extern CSP_API bool g_predictable;
00125 
00126 CSP_NAMESPACE_END(csp);
00127 
00128 
00129 // The objects required for statistics, CSP streams, bit arrays, etc.
00130 #include "kernel/Types.h"
00131 #include "kernel/IdLess.h"
00132 #include "kernel/FastVector.h"
00133 #include "kernel/Globals.h"
00134 #include "kernel/BitArray.h"
00135 #include "kernel/BitFlags.h"
00136 #include "kernel/Mutex.h"
00137 #include "kernel/Log.h"
00138 #include "kernel/PropagationStatistics.h"
00139 #include "kernel/Randomizer.h"
00140 #include "kernel/RandomSequence.h"
00141 #include "kernel/Resources.h"
00142 #include "kernel/Solution.h"
00143 
00144 // The classes used to represent CSPs.
00145 #include "kernel/Value.h"
00146 #include "kernel/Domain.h"
00147 #include "kernel/Variable.h"
00148 #include "kernel/Constraint.h"
00149 #include "kernel/Problem.h"
00150 
00151 // The ordering heuristics.
00152 #include "kernel/OrderingHeuristic.h"
00153 #include "kernel/ConstraintOH.h"
00154 #include "kernel/VariableOH.h"
00155 #include "kernel/ValueOH.h"
00156 
00157 // The classes on which the search is based.
00158 #include "kernel/Filter.h"
00159 #include "kernel/Decomposition.h"
00160 #include "kernel/Retraction.h"
00161 #include "kernel/Driver.h"
00162 
00163 // Graph generation.
00164 #include "kernel/Graph.h"
00165 
00166 #endif // _CSP_csp_H
00167 
00168 // Local Variables:
00169 // mode: C++
00170 // End:

Generated on Wed May 25 12:21:13 2005 for csp.kdevelop by  doxygen 1.3.9.1