Package tools.singlevariable
Class Extrema
Object
Extrema
public class Extrema
extends Object
The
Extrema
uses the root finding capabilities of Solver
in order to find various extrema of GeneralFunction
s by setting their derivatives equals to 0
and solving.-
Method Summary
Modifier and Type Method Description static List<Double>
findInflectionPoints(GeneralFunction function, double lowerBound, double upperBound)
Returns the inflection points of aGeneralFunction
function on a specified rangestatic List<Double>
findLocalMaxima(GeneralFunction function, double lowerBound, double upperBound)
Returns the local maxima of aGeneralFunction
function on a specified rangestatic double
findLocalMaximum(GeneralFunction function, double lowerBound, double upperBound)
Returns the local maximum of aGeneralFunction
function on a specified rangestatic List<Double>
findLocalMinima(GeneralFunction function, double lowerBound, double upperBound)
Returns the local minima of aGeneralFunction
function on a specified rangestatic double
findLocalMinimum(GeneralFunction function, double lowerBound, double upperBound)
Returns the local minimum of aGeneralFunction
function on a specified rangestatic double
findMaximumOnRange(GeneralFunction function, double lowerBound, double upperBound)
Returns the maximum of aGeneralFunction
function on a specified range (endpoints included)static double
findMinimumOnRange(GeneralFunction function, double lowerBound, double upperBound)
Returns the minimum of aGeneralFunction
function on a specified range (endpoints included)
-
Method Details
-
findLocalMinimum
public static double findLocalMinimum(GeneralFunction function, double lowerBound, double upperBound)Returns the local minimum of aGeneralFunction
function on a specified range- Parameters:
function
- TheGeneralFunction
whose minimum is being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- the local minimum of function on the specified range
-
findLocalMaximum
public static double findLocalMaximum(GeneralFunction function, double lowerBound, double upperBound)Returns the local maximum of aGeneralFunction
function on a specified range- Parameters:
function
- TheGeneralFunction
whose maximum is being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- the local maximum of function on the specified range
-
findMinimumOnRange
public static double findMinimumOnRange(GeneralFunction function, double lowerBound, double upperBound)Returns the minimum of aGeneralFunction
function on a specified range (endpoints included)- Parameters:
function
- TheGeneralFunction
whose minimum is being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- the minimum of function on the specified range
-
findMaximumOnRange
public static double findMaximumOnRange(GeneralFunction function, double lowerBound, double upperBound)Returns the maximum of aGeneralFunction
function on a specified range (endpoints included)- Parameters:
function
- TheGeneralFunction
whose maximum is being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- the maximum of function on the specified range
-
findLocalMinima
public static List<Double> findLocalMinima(GeneralFunction function, double lowerBound, double upperBound)Returns the local minima of aGeneralFunction
function on a specified range- Parameters:
function
- TheGeneralFunction
whose minima are being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- a List of any minima of function on the specified range
-
findLocalMaxima
public static List<Double> findLocalMaxima(GeneralFunction function, double lowerBound, double upperBound)Returns the local maxima of aGeneralFunction
function on a specified range- Parameters:
function
- TheGeneralFunction
whose maxima are being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- a List of any maxima of function on the specified range
-
findInflectionPoints
public static List<Double> findInflectionPoints(GeneralFunction function, double lowerBound, double upperBound)Returns the inflection points of aGeneralFunction
function on a specified range- Parameters:
function
- TheGeneralFunction
whose inflection points are being foundlowerBound
- The lower bound of the rangeupperBound
- The upper bound of the range- Returns:
- a List of any inflection points of function on the specified range
-