public class GoldenSearch extends Object
Constructor and Description |
---|
GoldenSearch() |
Modifier and Type | Method and Description |
---|---|
static double |
findMin(double min,
double max,
Function f,
double eps,
int maxSteps)
Attempts to numerically find the value
x that minimizes the one
dimensional function f(x) in the range [min, max] . |
public static double findMin(double min, double max, Function f, double eps, int maxSteps)
x
that minimizes the one
dimensional function f(x)
in the range [min, max]
.min
- the minimum of the search rangemax
- the maximum of the search rangef
- the one dimensional function to minimizeeps
- the desired accuracy of the returned valuemaxSteps
- the maximum number of search steps to takex
that appears to minimize f(x)
Copyright © 2017. All rights reserved.