Click or drag to resize
Accord.NET (logo)

BinarySearchFind Method (FuncInt32, Double, Int32, Int32, Double)

Finds a value of a function in the interval [a;b). The function can be monotonically increasing or decreasing over the interface [a;b).

Namespace:  Accord.Math.Optimization
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static int Find(
	Func<int, double> function,
	int lowerBound,
	int upperBound,
	double value
)
Request Example View Source

Parameters

function
Type: SystemFuncInt32, Double
The function to have its root computed.
lowerBound
Type: SystemInt32
Start of search region (inclusive).
upperBound
Type: SystemInt32
End of search region (exclusive).
value
Type: SystemDouble
The value to be looked for in the function.

Return Value

Type: Int32
The location of the zero value in the given interval.
See Also