This open source thing is new to me. My apologies in advance if I'm not following the expected protocol.
I created issue number 57 on the main repo - outlining an issue I had with RangeView.FindManyRangeCore returning an invalid range when the data is entirely outside the range given by min and max parameters.
This pull request includes a proposed solution. The solution does change the values from BinarySearch.FindClosest, the values outside the range [1, N] are now being checked outside the BinarySearch routine (see TableBase.FindManyClosestCore). The definition of Empty also changed to take -1, -1 as the default zero left/right values resulted in a FirstIndex/LastIndex that pointed to a valid entry in the index array.
To reduce the number of binary search calls by FindManyRangeCore, I added two new routines to BinarySearch: LowerBoundClosest and UpperBoundClosest.
I have also added some additional tests that cover the case.
Hope you can use the work. I like this project very much.
Hi,
This open source thing is new to me. My apologies in advance if I'm not following the expected protocol.
I created issue number 57 on the main repo - outlining an issue I had with RangeView.FindManyRangeCore returning an invalid range when the data is entirely outside the range given by min and max parameters.
This pull request includes a proposed solution. The solution does change the values from BinarySearch.FindClosest, the values outside the range [1, N] are now being checked outside the BinarySearch routine (see TableBase.FindManyClosestCore). The definition of Empty also changed to take -1, -1 as the default zero left/right values resulted in a FirstIndex/LastIndex that pointed to a valid entry in the index array.
To reduce the number of binary search calls by FindManyRangeCore, I added two new routines to BinarySearch: LowerBoundClosest and UpperBoundClosest.
I have also added some additional tests that cover the case.
Hope you can use the work. I like this project very much.
Regards Tim