Math.h File Reference
#include <boost/math/constants/constants.hpp>
#include <boost/math/special_functions/sign.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
#include <limits>
#include <cmath>
+ Include dependency graph for Math.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shark
 AbstractSingleObjectiveOptimizer.
 

Functions

template<class T >
shark::maxExpInput ()
 Maximum allowed input value for exp. More...
 
template<class T >
shark::minExpInput ()
 Minimum value for exp(x) allowed so that it is not 0. More...
 
template<class T >
boost::enable_if
< boost::is_arithmetic< T >, T >
::type 
shark::sqr (const T &x)
 Calculates x^2. More...
 
template<class T >
shark::cube (const T &x)
 Calculates x^3. More...
 
template<class T >
boost::enable_if
< boost::is_arithmetic< T >, T >
::type 
shark::sigmoid (T x)
 Logistic function/logistic function. More...
 
template<class T >
shark::safeExp (T x)
 Thresholded exp function, over- and underflow safe. More...
 
template<class T >
shark::safeLog (T x)
 Thresholded log function, over- and underflow safe. More...
 
template<class T >
boost::enable_if
< boost::is_arithmetic< T >, T >
::type 
shark::softPlus (T x)
 Numerically stable version of the function log(1+exp(x)). More...
 
template<class T >
shark::copySign (T x, T y)
 

Variables

static const double shark::SQRT_2_PI = boost::math::constants::root_two_pi<double>()
 Constant for sqrt( 2 * pi ). More...
 

Detailed Description

This file serves as a minimal abstraction layer. Inclusion of this file makes some frequently used functions, constants, and header file inclusions OS-, compiler-, and version-independent.
Copyright (c) 1998-2011:
Institut für Neuroinformatik
Ruhr-Universität Bochum
D-44780 Bochum, Germany
Phone: +49-234-32-25558
Fax: +49-234-32-14209
eMail: shark.nosp@m.-adm.nosp@m.in@ne.nosp@m.uroi.nosp@m.nform.nosp@m.atik.nosp@m..ruhr.nosp@m.-uni.nosp@m.-boch.nosp@m.um.d.nosp@m.e
www: http://www.neuroinformatik.ruhr-uni-bochum.de



This file is part of Shark. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library; if not, see http://www.gnu.org/licenses/.

Definition in file Math.h.