isNonnegativeGame {CoopGame} | R Documentation |
isNonnegativeGame checks if a TU game is a nonnegative game. A TU game is a nonnegative game if the game vector does not contain any negative entries.
isNonnegativeGame(v)
v |
Numeric vector of length 2^n - 1 representing the values of the coalitions of a TU game with n players |
TRUE
if the game is nonnegative, else FALSE
.
Jochen Staudacher jochen.staudacher@hs-kempten.de
library(CoopGame)
isNonnegativeGame(c(0,0,0,0.5,0.1,0.4,1))
#Nonnegative game
library(CoopGame)
v1<-c(0,0,0,0,1,1,1)
isNonnegativeGame(v1)
#Example for game which is not nonnegative
library(CoopGame)
v2<-c(0,0,0,0,-1.1,1,2)
isNonnegativeGame(v2)