Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Record iteration when recording only zeros
Fixes #124 As pointed in the comment in the corresponding issues, we want to ensure we trigger the picker logic at least once to keep the invariant of the loop, that is to say that the picking logic has been executed for last_picked_index, which is not the case for zero when there are only zeros. I added a test that collect the record and check for their count. Would it be better to check for the following: ```rust assert_eq!(h.iter_recorded().collect::<Vec<_>>(), vec![IterationValue::<u64>::new(0, 1.0, 1.0, 1, 1)]); ``` It is easy to assume that `h.iter_recorded().collect::<Vec<_>>().len() == h.len()` and simplify the added test, and I'm unsure how to convey that we _really_ want to collect and check the length of all the record.
- Loading branch information