Skip to contents

Check if one element dominates the other.

Usage

dominates(powerRelation, e1, e2, strictly = FALSE, includeEmptySet = TRUE)

Arguments

powerRelation

A PowerRelation object created by PowerRelation() or as.PowerRelation()

e1, e2

Elements in powerRelation$elements

strictly

If TRUE, check if p1 strictly dominates p2

includeEmptySet

If TRUE, check \(\lbrace i \rbrace \succsim \lbrace j \rbrace\) even if empty set is not part of the power relation.

Value

Logical value TRUE if e1 dominates e2, else FALSE.

Details

\(i\) is said to dominate \(j\) if \(S \cup \lbrace i \rbrace \succsim S \cup \lbrace j \rbrace\) for all \(S \in 2^{N \setminus \lbrace i,j \rbrace}\).

\(i\) strictly dominates \(j\) if there also exists an \(S \in 2^{N \setminus \lbrace i,j \rbrace}\) such that \(S \cup \lbrace i \rbrace \succ S \cup \lbrace j \rbrace\).

Examples

pr <- as.PowerRelation("12 > 1 > 2")

# TRUE
d1 <- dominates(pr, 1, 2)

# FALSE
d2 <- dominates(pr, 2, 1)

# TRUE (because it's not strict dominance)
d3 <- dominates(pr, 1, 1)

# FALSE
d4 <- dominates(pr, 1, 1, strictly = TRUE)

stopifnot(all(d1, !d2, d3, !d4))