recursive_bisection_optimized function

Optimized recursive bisection for HRP