stopOnInvalidIndex {CoopGame}R Documentation

Parameter Function stopOnInvalidIndex

Description

stopOnInvalidIndex checks if coalition function (in the form of either v or A) is specified correctly and causes causes calculation to stop otherwise.

Usage

stopOnInvalidIndex(paramCheckResult, index, n = NULL)

Arguments

paramCheckResult

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

index

index which is checked to be a valid index

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
1070 Index is 'NULL'.
1071 Index is 'not numeric'.
1072 Index is within the wrong range according to number of players n.

Author(s)

Jochen Staudacher jochen.staudacher@hs-kempten.de

Johannes Anwander anwander.johannes@gmail.com

See Also

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

Examples

library(CoopGame)
v=c(1:7)
paramCheckResult=getEmptyParamCheckResult()
validIndex = 5
stopOnInvalidIndex(paramCheckResult, index=validIndex, n=3)


[Package CoopGame version 0.2.2 Index]