coalitionsAreIndifferent {socialranking} | R Documentation |
Check if coalitions are indifferent to one another, or, in other words, if they appear in the same equivalence class.
coalitionsAreIndifferent(powerRelation, c1, c2)
powerRelation |
A |
c1 |
Coalition vector |
c2 |
Coalition vector |
Logical value TRUE
if c1
and c2
are in the same equivalence class, else FALSE
.
Other lookup functions:
elementLookup()
,
equivalenceClassIndex()
pr <- PowerRelation(list(list(c(1,2)), list(1, 2)))
stopifnot(coalitionsAreIndifferent(pr, c(1,2), c(1)) == FALSE)
stopifnot(coalitionsAreIndifferent(pr, 2, 1) == TRUE)
# Note that it doesn't fail with non-existing power relations
stopifnot(coalitionsAreIndifferent(pr, 1, c()) == FALSE)
stopifnot(coalitionsAreIndifferent(pr, 3, c(1,2,3)) == TRUE)