Commit 0dd6d08
committed
fix(descriptor): correct index tracking in
The combinations function was pushing `new_index` (the enumerate index
relative to the skipped iterator) instead of `index + 1 + new_index`
(the absolute index in the original vec). This caused duplicate and
incorrect combinations to be generated for inputs larger than trivial
sizes.
Co-Authored-By: HAL 9000
Signed-off-by: Elias Rohrer <dev@tnull.de>combinations() function1 parent fb7681a commit 0dd6d08
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
1937 | 1937 | | |
1938 | 1938 | | |
1939 | 1939 | | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
1940 | 1954 | | |
0 commit comments