feat(pareto): add crowding_distance

Computes per-point crowding distance over a single Pareto front (spec
§9.6):

- Returns Vec<f64> with the same length as the front index slice.
- Empty front → empty Vec.
- Front of length ≤ 2 → all f64::INFINITY.
- Boundary points along each objective receive INFINITY.
- Interior points get sum of normalized neighbor gaps; if max == min for
  an objective the contribution is zero.
- Operates on minimization-oriented objective values.
This commit is contained in:
2026-05-04 19:20:08 -06:00
parent 9d64a0f186
commit ff557061bb
3 changed files with 147 additions and 1 deletions
+2 -1
View File
@@ -12,5 +12,6 @@ pub use crate::core::{
pub use crate::traits::{Initializer, Optimizer, Variation};
pub use crate::pareto::{
Dominance, best_candidate, non_dominated_sort, pareto_compare, pareto_front,
Dominance, best_candidate, crowding_distance, non_dominated_sort, pareto_compare,
pareto_front,
};