Skip to contents

Test if one element dominates the other.

Usage

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

Arguments

powerRelation

A PowerRelation object created by newPowerRelation()

e1, e2

Elements in powerRelation$elements

strictly

If TRUE, check if p1 strictly dominates p2

includeEmptySet

If TRUE, check \(\lbrace i \rbrace \succeq \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 \succeq S \cup \lbrace j \rbrace\) for all \(S \in 2^{N \setminus \lbrace i,j \rbrace}\).

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

Examples

pr <- newPowerRelationFromString("12 > 1 > 2", asWhat = as.numeric)

# 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))