MLPACK  1.0.8
core.hpp
Go to the documentation of this file.
1 /***
2  * @file core.hpp
3  *
4  * Include all of the base components required to write MLPACK methods, and the
5  * main MLPACK Doxygen documentation.
6  *
7  * This file is part of MLPACK 1.0.8.
8  *
9  * MLPACK is free software: you can redistribute it and/or modify it under the
10  * terms of the GNU Lesser General Public License as published by the Free
11  * Software Foundation, either version 3 of the License, or (at your option) any
12  * later version.
13  *
14  * MLPACK is distributed in the hope that it will be useful, but WITHOUT ANY
15  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16  * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17  * details (LICENSE.txt).
18  *
19  * You should have received a copy of the GNU General Public License along with
20  * MLPACK. If not, see <http://www.gnu.org/licenses/>.
21  */
22 #ifndef __MLPACK_CORE_HPP
23 #define __MLPACK_CORE_HPP
24 
152 // First, standard includes.
153 #include <stdlib.h>
154 #include <stdio.h>
155 #include <string.h>
156 #include <ctype.h>
157 #include <limits.h>
158 #include <float.h>
159 #include <stdint.h>
160 #include <iostream>
161 
162 // Defining _USE_MATH_DEFINES should set M_PI.
163 #define _USE_MATH_DEFINES
164 #include <math.h>
165 
166 // For tgamma().
167 #include <boost/math/special_functions/gamma.hpp>
168 
169 // But if it's not defined, we'll do it.
170 #ifndef M_PI
171  #define M_PI 3.141592653589793238462643383279
172 #endif
173 
174 // Give ourselves a nice way to force functions to be inline if we need.
175 #define force_inline
176 #if defined(__GNUG__) && !defined(DEBUG)
177  #undef force_inline
178  #define force_inline __attribute__((always_inline))
179 #elif defined(_MSC_VER) && !defined(DEBUG)
180  #undef force_inline
181  #define force_inline __forceinline
182 #endif
183 
184 // Now MLPACK-specific includes.
185 #include <mlpack/core/arma_extend/arma_extend.hpp> // Includes Armadillo.
186 #include <mlpack/core/util/log.hpp>
187 #include <mlpack/core/util/cli.hpp>
188 #include <mlpack/core/data/load.hpp>
189 #include <mlpack/core/data/save.hpp>
199 
200 // Include kernel traits.
212 
213 #endif
214 
215 // Clean up unfortunate Windows preprocessor definitions, even if this file was
216 // already included. Use std::min and std::max!
217 #ifdef _WIN32
218  #ifdef min
219  #undef min
220  #endif
221 
222  #ifdef max
223  #undef max
224  #endif
225 #endif