Pareto Front
The pareto_front crate is a Rust library to build a Pareto front incrementaly.
This is particularly useful in multi-objectives optimization where, instead of having a single maximum that one can easily keep track off, one might want to keep track of various trade-offs, none of which is best on all axis, found during the optimization.
This crate aims to be small yet very fast.
Functionalities
This crate gives you access to the ParetoFront type which can be created (empty or from an iterator), updated by adding new candidates (using the push or the extend method) and converted into an iterator, a slice or a vector.
Additionaly, the pareto_front_serde feature lets you serialize and deserialize the ParetoFront type using serde.
Usage
Elements to be inserted in the Pareto front should implement the Dominate trait:
use ;
/// type that will be pushed in the Pareto front
/// implement the `Dominate` trait so that the elements can be pushed into the front
New elements can be added to a Pareto front using the push method (one can also collect an iterator into a Pareto front):
// data to be put in the front
let x = ParetoElement ;
let y = ParetoElement ;
let z = ParetoElement ;
// insertions in the Pareto front
let mut front = new;
front.push;
front.push;
// note that `push` returns a boolean to tell you if the point you just inserted is part of the current Pareto front
let z_is_pareto_optimal = front.push;
The resulting Pareto front can be converted into an iterator, a slice or a vector.