MLPACK
1.0.4
|
00001 /*** 00002 * @file core.hpp 00003 * 00004 * Include all of the base components required to write MLPACK methods, and the 00005 * main MLPACK Doxygen documentation. 00006 * 00007 * This file is part of MLPACK 1.0.4. 00008 * 00009 * MLPACK is free software: you can redistribute it and/or modify it under the 00010 * terms of the GNU Lesser General Public License as published by the Free 00011 * Software Foundation, either version 3 of the License, or (at your option) any 00012 * later version. 00013 * 00014 * MLPACK is distributed in the hope that it will be useful, but WITHOUT ANY 00015 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00016 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00017 * details (LICENSE.txt). 00018 * 00019 * You should have received a copy of the GNU General Public License along with 00020 * MLPACK. If not, see <http://www.gnu.org/licenses/>. 00021 */ 00022 #ifndef __MLPACK_CORE_HPP 00023 #define __MLPACK_CORE_HPP 00024 00145 // First, standard includes. 00146 #include <stdlib.h> 00147 #include <stdio.h> 00148 #include <string.h> 00149 #include <ctype.h> 00150 #include <limits.h> 00151 #include <float.h> 00152 #include <stdint.h> 00153 #include <iostream> 00154 00155 // Defining _USE_MATH_DEFINES should set M_PI. 00156 #define _USE_MATH_DEFINES 00157 #include <math.h> 00158 00159 // For tgamma(). 00160 #include <boost/math/special_functions/gamma.hpp> 00161 00162 // But if it's not defined, we'll do it. 00163 #ifndef M_PI 00164 #define M_PI 3.141592653589793238462643383279 00165 #endif 00166 00167 // Now MLPACK-specific includes. 00168 #include <mlpack/core/arma_extend/arma_extend.hpp> // Includes Armadillo. 00169 #include <mlpack/core/util/log.hpp> 00170 #include <mlpack/core/util/cli.hpp> 00171 #include <mlpack/core/data/load.hpp> 00172 #include <mlpack/core/data/save.hpp> 00173 #include <mlpack/core/math/clamp.hpp> 00174 #include <mlpack/core/math/random.hpp> 00175 #include <mlpack/core/math/lin_alg.hpp> 00176 #include <mlpack/core/math/range.hpp> 00177 #include <mlpack/core/math/round.hpp> 00178 #include <mlpack/core/util/save_restore_utility.hpp> 00179 #include <mlpack/core/dists/discrete_distribution.hpp> 00180 #include <mlpack/core/dists/gaussian_distribution.hpp> 00181 00182 // Clean up unfortunate Windows preprocessor definitions. 00183 // Use std::min and std::max! 00184 #ifdef _WIN32 00185 #ifdef min 00186 #undef min 00187 #endif 00188 00189 #ifdef max 00190 #undef max 00191 #endif 00192 #endif 00193 00194 // Give ourselves a nice way to force functions to be inline if we need. 00195 #define force_inline 00196 #if defined(__GNUG__) && !defined(DEBUG) 00197 #undef force_inline 00198 #define force_inline __attribute__((always_inline)) 00199 #elif defined(_MSC_VER) 00200 #undef force_inline && !defined(DEBUG) 00201 #define force_inline __forceinline 00202 #endif 00203 00204 #endif