pub fn hypervolume_wfg(
front: &[Vec<f64>],
reference: &[f64],
) -> OptimizeResult<f64>Expand description
Compute the exact hypervolume using the WFG (While-Hingston-Barone-Huband) recursive algorithm for arbitrary dimensionality.
WFG is asymptotically optimal for the general case and handles any number
of objectives. For 2-D, prefer hypervolume_2d which is faster in practice.
§Arguments
front— Pareto front as&[Vec<f64>]. All objectives minimised. Every inner vector must have the same length.reference— Reference point slice, same length as each objective vector.
§Returns
Exact hypervolume dominated by front relative to reference.
Returns 0.0 for an empty front.
§Errors
Returns an error if objective-vector lengths are inconsistent.
§Examples
use scirs2_optimize::multiobjective::hypervolume::hypervolume_wfg;
let front = vec![vec![0.0, 1.0], vec![0.5, 0.5], vec![1.0, 0.0]];
let hv = hypervolume_wfg(&front, &[2.0, 2.0]).expect("valid input");
assert!((hv - 2.75).abs() < 1e-10);