Commit e358592
committed
Fix partial heap sort
The function `partialSortByBounds` had an off-by-one error causing
all the partial heap sort functions to produce incorrect results.
The off-by-one error was fixed and the `prop_partialsort` property
test was updated to catch this error. Testing the code before the
change fails, while after the change passes.
#461 parent 44287d8 commit e358592
File tree
2 files changed
+10
-4
lines changed- src/Data/Vector/Algorithms
- tests/properties
2 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
0 commit comments