OneDimensionalOptimizer.FindMinimum Method

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2

Overload List

FindMinimum(Func<Double, Double>, Double) Computes a minimum of the specified function.
FindMinimum(Func<Double, Double>, Double, Double) Computes a minimum of the specified function.

FindMinimum(Func<Double, Double>, Double)

Computes a minimum of the specified function.
C#
public double FindMinimum(
	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 minimum.

Return Value

Double
A local minimum of objectiveFunction.

Exceptions

ConvergenceException

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

FindMinimum(Func<Double, Double>, Double, Double)

Computes a minimum of the specified function.
C#
public double FindMinimum(
	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 minimum is to be located.
upperBound  Double
The upper bound of the interval where a minimum is to be located.

Return Value

Double
A local minimum of objectiveFunction.

Exceptions

ConvergenceException

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

See Also