Minimizes a function in the vicinity of a given point.

Namespace: Meta.Numerics.Functions
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 2.1.0.0 (2.1.0.0)

Syntax

            
 C#  Visual Basic  Visual C++  F# 
public static LineExtremum FindMinimum(
	Func<double, double> f,
	double x
)
Public Shared Function FindMinimum ( _
	f As Func(Of Double, Double), _
	x As Double _
) As LineExtremum
public:
static LineExtremum^ FindMinimum(
	Func<double, double>^ f, 
	double x
)
static member FindMinimum : 
        f : Func<float, float> * 
        x : float -> LineExtremum 

Parameters

f
Func<(Of <(<'Double, Double>)>)>
The function.
x
Double
A point suspected to be near the minimum. The search begins at this point.

Return Value

The minimum.

Remarks

Since the search algorithm begins by evaluating f near x, it can fail if x is near a singularity or other point at which the evaluation of f could fail. If you can reliably bracket a minimum, the other overload of this method is safer and, if your bracket is any good, slightly faster.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionf is null.

See Also