OneDimensionalOptimizer.FindMaximum Method

Definition

Namespace: Extreme.Mathematics.Optimization
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

FindMaximum(Func<Double, Double>, Double) Computes a maximum of the specified function.
FindMaximum(Func<Double, Double>, Double, Double) Computes a maximum of the specified function.

OneDimensionalOptimizer.FindMaximum(Func<Double, Double>, Double)

Computes a maximum of the specified function.
C#
public double FindMaximum(
	Func<double, double> objectiveFunction,
	double initialGuess
)

Parameters

objectiveFunction  Func<Double, Double>
A delegate that represents a function of one variable that specifies the objective function.
initialGuess  Double
An initial guess for the maximum.

Return Value

Double
A local maximum of objectiveFunction.

Exceptions

ConvergenceExceptionThe algorithm failed to converge and ThrowExceptionOnFailure is set to true.

OneDimensionalOptimizer.FindMaximum(Func<Double, Double>, Double, Double)

Computes a maximum of the specified function.
C#
public double FindMaximum(
	Func<double, double> objectiveFunction,
	double lowerBound,
	double upperBound
)

Parameters

objectiveFunction  Func<Double, Double>
A delegate that represents a function of one variable that specifies the objective function.
lowerBound  Double
The lower bound of the interval where a maximum is to be located.
upperBound  Double
The upper bound of the interval where a maximum is to be located.

Return Value

Double
A local maximum of objectiveFunction.

Exceptions

ConvergenceExceptionThe algorithm failed to converge and ThrowExceptionOnFailure is set to true.

See Also