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 ! |
|
The last commit is experimental, but i need to move it between machines. I may revert it if it doesn't work as expected |
…nctions" This reverts commit ad4464a.
…t be a case where the block_idx+1 block does not exist AND we arent in the last block of the super_block
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!