[−][src]Trait non_dominated_sort::DominanceOrd
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 solutionb
("a < b"), -
or solution
b
dominates solutiona
("a > b"), -
or neither solution
a
norb
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.
Provided methods
default fn dominance_ord(&self, a: &Self::T, b: &Self::T) -> Ordering
Returns the dominance order.
default fn dominates(&self, a: &Self::T, b: &Self::T) -> bool
Returns true if a
dominates b
("a < b").