isNonnegativeGame {CoopGame} | R Documentation |
Check if game is nonnegative
Description
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.
Usage
isNonnegativeGame(v)
Arguments
v |
Numeric vector of length 2^n - 1 representing the values of the coalitions of a TU game with n players |
Value
TRUE
if the game is nonnegative, else FALSE
.
Author(s)
Jochen Staudacher jochen.staudacher@hs-kempten.de
Examples
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)
[Package CoopGame version 0.2.2 Index]