public class MinUnconEx2 extends Object implements MinUncon.Derivative
MinUncon Example 2: Minimizes a single variable function using the analytic derivative.
The minimum of \(e^x - 5x\) is found using function evaluations and first derivative evaluations.Constructor and Description |
---|
MinUnconEx2() |
Modifier and Type | Method and Description |
---|---|
double |
f(double x)
Public interface for the smooth function of a single
variable to be minimized.
|
double |
g(double x)
Public interface for the smooth function of a single
variable to be minimized.
|
static void |
main(String[] args) |
public double f(double x)
MinUncon.Function
f
in interface MinUncon.Function
x
- a double
, the point
at which the function is to be evaluateddouble
, the value of the function at xpublic double g(double x)
MinUncon.Derivative
g
in interface MinUncon.Derivative
x
- a double
, the point at which the
derivative of the function is to be evaluateddouble
, the value of the derivative of the
function at xpublic static void main(String[] args)
Copyright © 2020 Rogue Wave Software. All rights reserved.