"bracket()" successively searches an ordered vector of numbers for a value's index using a bisection method.
Bisection of a vector to find an element is almost never optimal.
the "hunt" method stores the last found element's index and resumes searching from there, thus offering large time savings when searching for values which are close to another..
"bracket()" successively searches an ordered vector of numbers for a value's index using a bisection method. Bisection of a vector to find an element is almost never optimal. the "hunt" method stores the last found element's index and resumes searching from there, thus offering large time savings when searching for values which are close to another..