isNonnegativeGame: Check if game is nonnegative

Description Usage Arguments Value Author(s) Examples

View source: R/GamePropertyNonnegativeGame.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

CoopGame documentation built on Aug. 24, 2021, 1:07 a.m.