Implement low-variance sampling algorithm
Proposed changes
This PR adds the strategy of low-variance sampling for the resampling step. Adds a new range adaptor called beluga::views::low_variance_sample. Related to: https://github.com/Ekumen-OS/beluga/issues/48
Type of change
- [ ] 🐛 Bugfix (change which fixes an issue)
- [X] 🚀 Feature (change which adds functionality)
- [X] 📚 Documentation (change which fixes or extends documentation)
Checklist
Put an x in the boxes that apply. This is simply a reminder of what we will require before merging your code.
- [x] Lint and unit tests (if any) pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have added necessary documentation (if appropriate)
- [x] All commits have been signed for DCO
Additional comments
How to run it?
- Run tests:
colcon build --packages-up-to beluga && ./build/beluga/test/beluga/test_beluga --gtest_filter="*LowVarianceSampleView*"
- Run microbenchmarks
colcon build --packages-up-to beluga && ./build/beluga/test/benchmark/benchmark_beluga --benchmark_filter=Low
I created the tests, but @hidmic or @glpuga. Do you have any additional scenarios I could make?
@larodriguez22 may I take this to completion or are you still working on it?
@larodriguez22 may I take this to completion or are you still working on it?
I took longer than expected. I'm sorry, ready for another review