View source: R/equal_surplus_division.R
| equal_surplus_division | R Documentation |
Calculate the equal surplus division value
equal_surplus_division(characteristic_func, n_players = 0)
characteristic_func |
The characteristic function of the game. It can be
a numeric vector with the value of every coalition, in the order given by
|
n_players |
Only used if |
The equal surplus division value for each player
n <- 10
v <- function(coalition) {
if (length(coalition) > n/2) {
return(1)
} else {
return(0)
}
}
equal_surplus_division(v,n)
v <- c(1,1,2,1,2,2,2)
equal_surplus_division(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.