12 #ifndef MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_INVERSE_QUAD_FUNCTION_HPP    13 #define MLPACK_METHODS_ANN_ACTIVATION_FUNCTIONS_INVERSE_QUAD_FUNCTION_HPP    37   static double Fn(
const double x)
    39     return 1 / ( 1 + x * x);
    48   template<
typename InputVecType, 
typename OutputVecType>
    49   static void Fn(
const InputVecType& x, OutputVecType& y)
    51     y = 1 / (1 + arma::pow(x, 2));
    60   static double Deriv(
const double y)
    62     return  - 2 * y / std::pow(1 + std::pow(y, 2), 2);
    71   template<
typename InputVecType, 
typename OutputVecType>
    72   static void Deriv(
const InputVecType& x, OutputVecType& y)
    74     y = - 2 * x / arma::pow(1 + arma::pow(x, 2), 2);
 The Inverse Quadratic function, defined by. 
 
Linear algebra utility functions, generally performed on matrices or vectors. 
 
The core includes that mlpack expects; standard C++ includes and Armadillo. 
 
static void Fn(const InputVecType &x, OutputVecType &y)
Computes the Inverse Quadratic function. 
 
static double Fn(const double x)
Computes the Inverse Quadratic function. 
 
static void Deriv(const InputVecType &x, OutputVecType &y)
Computes the first derivatives of the Inverse Quadratic function. 
 
static double Deriv(const double y)
Computes the first derivative of the Inverse Quadratic function.