Skip to main content

exclusive_hypervolume

Function exclusive_hypervolume 

Source
pub fn exclusive_hypervolume(
    front: &[Vec<f64>],
    reference: &[f64],
) -> OptimizeResult<Vec<f64>>
Expand description

Compute the exclusive hypervolume contribution of every solution in the front.

Returns a Vec<f64> of the same length as front, where each element is the hypervolume contribution of that solution (HVC(x_i) = HV(P) − HV(P \ {x_i})).

Useful for diversity-aware selection and archiving.

§Arguments

  • front — Full Pareto front as &[Vec<f64>].
  • reference — Reference point.

§Errors

Returns an error if objective-vector dimensions are inconsistent.

§Examples

use scirs2_optimize::multiobjective::hypervolume::exclusive_hypervolume;
let front = vec![vec![0.0, 1.0], vec![0.5, 0.5], vec![1.0, 0.0]];
let hvc = exclusive_hypervolume(&front, &[2.0, 2.0]).expect("valid input");
assert_eq!(hvc.len(), 3);
let total: f64 = hvc.iter().sum();
assert!(total > 0.0);