![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/Math.h>
Templated bisection search algorithm, finds the interval in a sorted array in which any given value falls. More...
Templated bisection search algorithm, finds the interval in a sorted array in which any given value falls.
| data | Array to search position in, must be sorted in ascending order |
| value | The value whose approximate position in the array we want to determine |
| less | Any suitable less-than comparison function |
Public Member Functions | |
| BisectionSearch (const std::vector< T > &data, const U &value, const std::function< bool(const T &, const U &)> &lessOrEqual=[](const T &a, const U &b) { return a<=b;}) | |
| int | search () |