Add predecessor and successor functions to RsVec#42
Conversation
…, and future compatibility. Adjusted test cases
|
I have changed return types to Using This broke some of the test cases since they now assume that None is the fallback, but the implementation has not been changed yet. Furthermore, a range of edge cases cause panics or wrong results, I have added new test cases. In general, adding If you don't want to fix those, I will do it later. |
|
appreciate the feedback on the API practices @Cydhra ! |
Resolves #28 .
This is a pretty simple implementation which is taken mostly from the
itermodule ofRsVec.I'm sure there are some optimization opportunities here. For one thing, I checked that we have the right superblock before checking in the rank-blocks since the rank in blocks is relative to the superblock boundary.
Would appreciate some feedback on this!