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