Package smile.util.function
Interface DifferentiableFunction
- All Superinterfaces:
Function
,Serializable
A differentiable function is a function whose derivative exists at each point
in its domain.
-
Field Summary
-
Method Summary
-
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.
-