pub fn hypervolume_2d(pareto_front: &[Vec<f64>], reference_point: &[f64]) -> f64Expand description
Exact 2-D hypervolume indicator.
Computes the area of the objective space dominated by pareto_front and
bounded by reference_point. All objective values are assumed to be
minimised.
§Arguments
pareto_front- Non-dominated objective vectors (2-D each).reference_point- Reference point with 2 components; must be greater than all front points on both axes to yield a non-zero result.
§Panics
Panics in debug mode if any point does not have exactly 2 objectives.
§Examples
use scirs2_optimize::multiobjective::indicators::hypervolume_2d;
// Triangle: (0,2), (2,0), reference (3,3) => area = 5
let front = vec![vec![0.0,2.0], vec![2.0,0.0]];
let hv = hypervolume_2d(&front, &[3.0, 3.0]);
assert!((hv - 5.0).abs() < 1e-10);