Check if a vector dominates another (dominates or does_dominate) or is dominated by another (is_dominated). There are corresponding infix operators dominates and is_dominated.

dominates(x, y)

does_dominate(x, y)

is_dominated(x, y)

x %dominates% y

x %is_dominated% y

Arguments

x

[numeric]
First vector.

y

[numeric]
Second vector.

Value

Single logical value.

Details

Given two vectors \(x,y \in R^m\) we say that \(x\) dominates \(y\), denoted as \(x \preceq y\) if and only if $$ x_i \leq y_i \, \forall i \in \{1, \ldots, m\} $$ and $$ \exists j \in \{1, \ldots, m\}: x_i < y_i. $$ Informally, \(x\) dominates \(y\) if \(x\) is no worse than \(y\) in all components and \(x\) is strictly better than \(y\) in at least one component. Note that this definition focuses on minimization of all objectives. This is no restriction since the maximization of some function is equivalent to the minimization of its negative counterpart.

See also

Other Pareto-dominance checks: dominated(), set_dominates(), which_dominated()

Other multi-objective tools: dominated(), set_dominates(), which_dominated()

Examples

dominates(c(2, 3), c(4, 5))
#> [1] TRUE
dominates(c(2, 3), c(2, 3))
#> [1] FALSE
is_dominated(c(2, 3), c(4, 5))
#> [1] FALSE
is_dominated(c(4, 5), c(2, 3))
#> [1] TRUE
c(1, 2, 3) %dominates% c(4, 5, 6)
#> [1] TRUE
c(1, 2, 3) %is_dominated% c(4, 5, 6)
#> [1] FALSE