EyNuel / cTraceo

An Underwater Acoustic Raytracing Model. Check our wiki for more information
http://eynuel.github.com/cTraceo/
Other
11 stars 7 forks source link

in "bracket()": replace bisection method by "hunt" method. #35

Open EyNuel opened 10 years ago

EyNuel commented 10 years ago

"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..