[][src]Trait dominance_ord::DominanceOrd

pub trait DominanceOrd {
    type T;
    fn dominance_ord(&self, a: &Self::T, b: &Self::T) -> Ordering { ... }
fn dominates(&self, a: &Self::T, b: &Self::T) -> bool { ... } }

Trait for comparisons according to dominance order.

The dominance relation is a partial order. Given solutions a and b, a dominance comparison has three possible outcomes:

  • Either solution a dominates solution b ("a < b"),

  • or solution b dominates solution a ("a > b"),

  • or neither solution a nor b dominates each other ("a == b").

The dominance relation is for example used in non-dominated sort algorithms to obtain the Pareto fronts.

Associated Types

type T

The type on which the dominance relation is defined.

Loading content...

Provided methods

fn dominance_ord(&self, a: &Self::T, b: &Self::T) -> Ordering

Returns the dominance order.

fn dominates(&self, a: &Self::T, b: &Self::T) -> bool

Returns true if a dominates b ("a < b").

Loading content...

Implementors

Loading content...