feat(metrics): add hypervolume_2d for 2D Pareto fronts

Exact 2D dominated hypervolume against a fixed reference point. Sorts
points by the first minimization-oriented objective ascending, then
sweeps and accumulates the dominated rectangle area against the
reference. Points that don't strictly dominate the reference are
ignored. Panics with a clear message if the objective space does not
have exactly two objectives (spec §14.2).

Tests cover a known-area front, the no-coverage case, and the panic on
non-2D problems.
This commit is contained in:
2026-05-04 19:26:23 -06:00
parent 69e5dd1249
commit 5672e21c87
2 changed files with 130 additions and 0 deletions
+2
View File
@@ -1,5 +1,7 @@
//! Quality metrics for Pareto fronts.
pub mod hypervolume;
pub mod spacing;
pub use hypervolume::*;
pub use spacing::*;