ParetoElement

Trait ParetoElement 

Source
pub trait ParetoElement<T: Ord> {
    type CoordIterator: Iterator<Item = T>;

    // Required methods
    fn coordinates(&self) -> Self::CoordIterator;
    fn dominates(&self, other: &Self) -> bool;
    fn nb_dimensions(&self) -> usize;
    fn kth(&self, k: usize) -> T;
}
Expand description

Pareto element trait. Defines an element that is present on the pareto front.

Required Associated Types§

Source

type CoordIterator: Iterator<Item = T>

Iterator trait over the coordinates of the element

Required Methods§

Source

fn coordinates(&self) -> Self::CoordIterator

returns the dimensions of the element the return value has to match the number of dimensions of the element

Source

fn dominates(&self, other: &Self) -> bool

returns true iff the element dominates the other

Source

fn nb_dimensions(&self) -> usize

returns the number of dimensions

Source

fn kth(&self, k: usize) -> T

returns the k-th coordinate

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§