Function
combinations_recursive
(
start: usize,
n: usize,
k: usize,
current: &mut Vec<usize>,
out: &mut Vec<Vec<usize>>,
)
Source from the content-addressed store, hash-verified
| 593 | } |
| 594 | |
| 595 | fn combinations_recursive( |
| 596 | start: usize, |
| 597 | n: usize, |
| 598 | k: usize, |
| 599 | current: &mut Vec<usize>, |
| 600 | out: &mut Vec<Vec<usize>>, |
| 601 | ) { |
| 602 | if current.len() == k { |
| 603 | out.push(current.clone()); |
| 604 | return; |
| 605 | } |
| 606 | for i in start..n { |
| 607 | current.push(i); |
| 608 | combinations_recursive(i + 1, n, k, current, out); |
| 609 | current.pop(); |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | fn build_cpcv_path_assignments( |
| 614 | n_groups: usize, |
Tested by
no test coverage detected