chore: Add binary search function
Description
Adds binary_search which performs a binary search to find the index to insert a value into a sorted input array. Also adds is_monotonic
which will be needed to validate that arrays are monotonically increasing.
This will be used to find the current time index when evaluating an IVP on prescribed steps in a performant way.
Merge Request Steps
Please confirm that this pull request has done the following:
-
Tests added -
Documentation added (where applicable) -
Changelog item added to changelog/.
Edited by Jared Lewis