Package smile.math
Interface DifferentiableMultivariateFunction
- All Superinterfaces:
MultivariateFunction
,Serializable
,ToDoubleFunction<double[]>
A differentiable function is a function whose derivative exists at each point
in its domain.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
A number close to zero, between machine epsilon and its square root. -
Method Summary
Modifier and TypeMethodDescriptiondefault 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 EPSILONA 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.
-