pub fn objective_correlation<C: ExactArith<Exact = BigUint>, const N: usize>(
edges: impl IntoIterator<Item = [C; N]>,
a: usize,
b: usize,
) -> CorrelationExpand description
The correlation of objectives a and b over the cost vectors of
edges, for integer and decimal costs.
Correlation detection only: the survey of Salzman et al. and the benchmark paper do not define how correlated objectives would be merged, so no merging step is offered.
§Examples
use multiobjective_search::objective_correlation;
let edges = [[1_u32, 2, 5], [2, 4, 4], [3, 6, 1]];
let r = objective_correlation(edges.iter().copied(), 0, 1);
assert!(!r.negative && r.at_least(1, 1)); // perfectly correlated
let r = objective_correlation(edges.iter().copied(), 0, 2);
assert!(r.negative && r.at_least(9, 10));§Panics
Panics if a or b is out of range.