Interface DifferentiableFunction

All Superinterfaces:
Function, Serializable
All Known Implementing Classes:
Exp, Kurtosis, LogCosh

public interface DifferentiableFunction extends Function
A differentiable function is a function whose derivative exists at each point in its domain.
  • Field Summary

    Fields inherited from interface smile.util.function.Function

    logger
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    g(double x)
    Computes the gradient/derivative at x.
    default double
    g2(double x)
    Compute the second-order derivative at x.
    default double
    root(double x1, double x2, double tol, int maxIter)
    Newton's method (also known as the Newton–Raphson method).

    Methods inherited from interface smile.util.function.Function

    apply, f, inv
  • Method Details

    • g

      double g(double x)
      Computes the gradient/derivative at x.
      Parameters:
      x - a real number.
      Returns:
      the derivative.
    • g2

      default double g2(double x)
      Compute the second-order derivative at x.
      Parameters:
      x - a real number.
      Returns:
      the second-order derivative.
    • root

      default double root(double x1, double x2, double tol, int maxIter)
      Newton's method (also known as the Newton–Raphson method). This method finds successively better approximations to the roots of a real-valued function. Newton's method assumes the function to have a continuous derivative. Newton's method may not converge if started too far away from a root. However, when it does converge, it is faster than the bisection method, and is usually quadratic. Newton's method is also important because it readily generalizes to higher-dimensional problems. Newton-like methods with higher orders of convergence are the Householder's methods.
      Specified by:
      root in interface Function
      Parameters:
      x1 - the left end of search interval.
      x2 - the right end of search interval.
      tol - the desired accuracy (convergence tolerance).
      maxIter - the maximum number of iterations.
      Returns:
      the root.