Package smile.math

Interface DifferentiableMultivariateFunction

All Superinterfaces:
MultivariateFunction, Serializable, ToDoubleFunction<double[]>

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

    Fields
    Modifier and Type
    Field
    Description
    static final double
    A number close to zero, between machine epsilon and its square root.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    g(double[] x, double[] gradient)
    Computes the value and gradient at x.

    Methods inherited from interface smile.math.MultivariateFunction

    apply, applyAsDouble, f
  • Field Details

    • EPSILON

      static final double EPSILON
      A number close to zero, between machine epsilon and its square root.
  • Method Details

    • g

      default double g(double[] x, double[] gradient)
      Computes the value and gradient at x. The default implementation uses finite differences to calculate the gradient. When possible, the subclass should compute the gradient analytically.
      Parameters:
      x - a real vector.
      gradient - the output variable of gradient.
      Returns:
      the function value.