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 GeneralFunctions 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 aGeneralFunctionfunction on a specified rangestatic List<Double>findLocalMaxima(GeneralFunction function, double lowerBound, double upperBound)Returns the local maxima of aGeneralFunctionfunction on a specified rangestatic doublefindLocalMaximum(GeneralFunction function, double lowerBound, double upperBound)Returns the local maximum of aGeneralFunctionfunction on a specified rangestatic List<Double>findLocalMinima(GeneralFunction function, double lowerBound, double upperBound)Returns the local minima of aGeneralFunctionfunction on a specified rangestatic doublefindLocalMinimum(GeneralFunction function, double lowerBound, double upperBound)Returns the local minimum of aGeneralFunctionfunction on a specified rangestatic doublefindMaximumOnRange(GeneralFunction function, double lowerBound, double upperBound)Returns the maximum of aGeneralFunctionfunction on a specified range (endpoints included)static doublefindMinimumOnRange(GeneralFunction function, double lowerBound, double upperBound)Returns the minimum of aGeneralFunctionfunction on a specified range (endpoints included)
-
Method Details
-
findLocalMinimum
public static double findLocalMinimum(GeneralFunction function, double lowerBound, double upperBound)Returns the local minimum of aGeneralFunctionfunction on a specified range- Parameters:
function- TheGeneralFunctionwhose 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 aGeneralFunctionfunction on a specified range- Parameters:
function- TheGeneralFunctionwhose 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 aGeneralFunctionfunction on a specified range (endpoints included)- Parameters:
function- TheGeneralFunctionwhose 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 aGeneralFunctionfunction on a specified range (endpoints included)- Parameters:
function- TheGeneralFunctionwhose 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 aGeneralFunctionfunction on a specified range- Parameters:
function- TheGeneralFunctionwhose 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 aGeneralFunctionfunction on a specified range- Parameters:
function- TheGeneralFunctionwhose 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 aGeneralFunctionfunction on a specified range- Parameters:
function- TheGeneralFunctionwhose 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
-