pub fn bsearch<Oracle>(
omega: &mut Oracle,
intrvl: &mut (f64, f64),
options: &Options,
) -> (bool, usize)where
Oracle: OracleBS,Expand description
The bsearch function performs a binary search to find a feasible solution within a given interval.
Arguments:
omega: The parameteromegais an instance of theOracletrait, which is used to perform assessments on a valuex0. The specific implementation of theOracletrait is not provided in the code snippet, so it could be any type that implements the necessary methods for the binary searchintrvl: Theintrvlparameter is an interval containing the gamma valuex*. It is represented as a mutable reference to a tuple(f64, f64), where the first element is the lower bound of the interval and the second element is the upper bound of the interval.options: Theoptionsparameter is a struct that contains various options for the binary search algorithm. It includes properties such as the maximum number of iterations (max_iters) and the error tolerance (``). These options control the termination criteria for the algorithm.
Returns:
The function bsearch returns a tuple of two values: a boolean indicating whether a feasible
solution was obtained, and the number of iterations performed.