pub fn hypervolume_contribution_wfg(
front: &[Vec<f64>],
reference: &[f64],
idx: usize,
) -> OptimizeResult<f64>Expand description
Compute the hypervolume contribution of solution idx to the total hypervolume.
The contribution is defined as:
HVC(x_i) = HV(P) - HV(P \ {x_i})where P is the full Pareto front.
§Arguments
front— Full Pareto front as&[Vec<f64>].reference— Reference point.idx— Index of the solution whose contribution to compute.
§Errors
Returns an error if idx >= front.len() or dimensions mismatch.
§Examples
use scirs2_optimize::multiobjective::hypervolume::hypervolume_contribution_wfg;
let front = vec![vec![0.0, 1.0], vec![0.5, 0.5], vec![1.0, 0.0]];
let contrib = hypervolume_contribution_wfg(&front, &[2.0, 2.0], 1).expect("valid input");
assert!(contrib >= 0.0);