Skip to contents

Check if coalitions are indifferent to one another, or, in other words, if they appear in the same equivalence class.

Usage

coalitionsAreIndifferent(powerRelation, c1, c2)

Arguments

powerRelation

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

c1

Coalition vector

c2

Coalition vector

Value

Logical value TRUE if c1 and c2 are in the same equivalence class, else FALSE.

See also

Other lookup functions: elementLookup(), equivalenceClassIndex()

Examples

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)