MCPcopy Create free account
hub / github.com/Open-Quant/openquant / combinations_recursive

Function combinations_recursive

crates/openquant/src/backtesting_engine.rs:595–611  ·  view source on GitHub ↗
(
    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
595fn 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
613fn build_cpcv_path_assignments(
614 n_groups: usize,

Callers 1

combinationsFunction · 0.85

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected