Function nadir_point
pub fn nadir_point(
points: &[Vec<f64>],
directions: &[Direction],
) -> Option<Vec<f64>>Expand description
The nadir point of a set of objective vectors: the componentwise worst value observed, in the study’s own orientation.
The conventional default reference for hypervolume. Every well-formed
point then lies on or inside the box it spans — which is exactly why the
worst point in each objective contributes zero volume, and why a moving
nadir makes a hypervolume history incomparable across time. Use it to pick a
reference once, not per measurement.
Returns None when no point is well-formed (wrong arity, or a non-finite
coordinate — both are skipped) or directions is empty.
use atune_core::pareto::nadir_point;
use atune_core::study::Direction::{Maximize, Minimize};
let points = vec![vec![1.0, 9.0], vec![4.0, 2.0]];
// Worst = largest for a minimised objective, smallest for a maximised one.
assert_eq!(nadir_point(&points, &[Minimize, Maximize]), Some(vec![4.0, 2.0]));