Learn R Programming

CoopGame (version 0.2.2)

stopOnInvalidGameVector: Parameter Function stopOnInvalidGameVector

Description

stopOnInvalidGameVector checks if game vector v is specified correctly. Validation result gets stored to object paramCheckResult in case an error occured and causes calculation to stop.

Usage

stopOnInvalidGameVector(paramCheckResult, v, n = NULL)

Arguments

paramCheckResult

list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message.

v

Numeric vector of length 2^n - 1 representing the values of the coalitions of a TU game with n players

n

represents the number of players

Error Code Ranges

Error codes and messages shown to user if error on parameter check occurs

Error Code Message 1000
Game vector is invalid as 'NULL' 1001 Number of elements in game vector is invalid
1002 Type of game vector is not numeric 1003
Game vector has different number of players than n Error Code Message

See Also

Other ParameterChecks_CoopGame: getEmptyParamCheckResult(), stopOnInconsistentEstateAndClaimsVector(), stopOnInvalidAllocation(), stopOnInvalidBoolean(), stopOnInvalidClaimsVector(), stopOnInvalidCoalitionS(), stopOnInvalidDictator(), stopOnInvalidEstate(), stopOnInvalidGrandCoalitionN(), stopOnInvalidIndex(), stopOnInvalidLeftRightGloveGame(), stopOnInvalidNChooseB(), stopOnInvalidNumberOfPlayers(), stopOnInvalidNumber(), stopOnInvalidQuota(), stopOnInvalidVetoPlayer(), stopOnInvalidWeightVector(), stopOnParamCheckError()

Examples

Run this code
# NOT RUN {
library(CoopGame)
validGameVector=c(0,0,0,60,60,60,72)
stopOnInvalidGameVector(paramCheckResult,validGameVector)
# }

Run the code above in your browser using DataLab