Click or drag to resize
Accord.NET (logo)

BinarySearch. Find Method (Func< Int32, 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: System.Func<Int32, Double>
The function to have its root computed.
lowerBound
Type: System.Int32
Start of search region (inclusive).
upperBound
Type: System.Int32
End of search region (exclusive).
value
Type: System.Double
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