C# Class Accord.Math.Optimization.BinarySearch

Binary search root finding algorithm.
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
BinarySearch ( double>.Func function, int a, int b ) : System

Constructs a new Binary search algorithm.

Find ( double>.Func function, int lowerBound, int upperBound, double value ) : int

Finds a value of a function in the interval [a;b]

Find ( double value ) : int

Attempts to find a root in the interval [a;b]

FindRoot ( ) : int

Attempts to find a root in the interval [a;b]

Method Details

BinarySearch() public method

Constructs a new Binary search algorithm.
public BinarySearch ( double>.Func function, int a, int b ) : System
function double>.Func The function to be searched.
a int Start of search region.
b int End of search region.
return System

Find() public static method

Finds a value of a function in the interval [a;b]
public static Find ( double>.Func function, int lowerBound, int upperBound, double value ) : int
function double>.Func The function to have its root computed.
lowerBound int Start of search region.
upperBound int End of search region.
value double The value to be looked for in the function.
return int

Find() public method

Attempts to find a root in the interval [a;b]
public Find ( double value ) : int
value double
return int

FindRoot() public method

Attempts to find a root in the interval [a;b]
public FindRoot ( ) : int
return int