Interface IBS.HasIBS.DGroups
- All Superinterfaces:
Features,Features.Groups,Features.Pairs,IBS.HasIBS,IBS.HasIBS.DPairs
- Enclosing interface:
IBS.HasIBS
-
Nested Class Summary
Nested classes/interfaces inherited from interface Features
Features.Groups, Features.Multispecies, Features.Pairs, Features.Payoffs, Features.StaticNested classes/interfaces inherited from interface IBS.HasIBS
IBS.HasIBS.CGroups, IBS.HasIBS.CPairs, IBS.HasIBS.DGroups, IBS.HasIBS.DPairs, IBS.HasIBS.MCGroups, IBS.HasIBS.MCPairs -
Method Summary
Modifier and TypeMethodDescriptionvoidgroupScores(int[] traitCount, double[] traitScore) Calculate the payoff/score for interactions in groups consisting of traits with respective numbers given in the arraytraitCount.default voidmixedScores(int[] traitCount, double[] traitScore) Calculate the average payoff/score in a finite population with the number of each trait provided incountfor pairwise interactions.voidmixedScores(int[] traitCount, int n, double[] traitScore) Calculate the average payoff/score in a finite population with the number of each trait provided incountfor interaction groups of sizen.Methods inherited from interface Features
getTitle, isMultispecies, isStaticMethods inherited from interface Features.Groups
getNGroup, isPairwiseMethods inherited from interface IBS.HasIBS
createIBSMethods inherited from interface IBS.HasIBS.DPairs
pairScores
-
Method Details
-
groupScores
void groupScores(int[] traitCount, double[] traitScore) Calculate the payoff/score for interactions in groups consisting of traits with respective numbers given in the arraytraitCount. The interaction group size is given by the sum overtraitCount[i]fori=0,1,...,nTraits. The payoffs/scores for each of thenTraitstraits must be stored and returned in the arraytraitScore.Important: must be overridden and implemented in subclasses that define game interactions among groups of individuals (for groups with sizes
nGroup>2, otherwise seeIBS.HasIBS.DPairs.pairScores(int, int[], double[])).- Parameters:
traitCount- group composition given by the number of individuals with each traittraitScore- array for returning the payoffs/scores of each trait
-
mixedScores
void mixedScores(int[] traitCount, int n, double[] traitScore) Calculate the average payoff/score in a finite population with the number of each trait provided incountfor interaction groups of sizen. The payoffs/scores for each of thenTraitstraits must be stored and returned in the arraytraitScores.Notes:
For payoff calculations:- each trait sees one less of its own type in its environment
- the size of the environment is
nPopulation-1 - the fact that the payoff of each trait does not depend on its own type simplifies things
IBS.check()(seeIBSMCPopulationfor an example).Important:
Must be overridden and implemented in subclasses that define game interactions in well-mixed populations where individuals interact with everyone else. Computationally it is not feasible to cover this scenario withIBS.HasIBS.DPairs.pairScores(int, int[], double[])orgroupScores(int[], double[]), respectively.- Parameters:
traitCount- number of individuals for each traitn- interaction group sizetraitScore- array for returning the payoffs/scores of each trait
-
mixedScores
default void mixedScores(int[] traitCount, double[] traitScore) Description copied from interface:IBS.HasIBS.DPairsCalculate the average payoff/score in a finite population with the number of each trait provided incountfor pairwise interactions. The payoffs/scores for each of thenTraitstraits must be stored and returned in the arraytraitScores.Important: must be overridden and implemented in subclasses that define game interactions in well-mixed populations where individuals interact with everyone else. Computationally it is not feasible to cover this scenario with
IBS.HasIBS.DPairs.pairScores(int, int[], double[])orgroupScores(int[], double[]), respectively.Note: If explicit calculations of the well-mixed scores are not available, interactions with everyone in well-mixed populations should checked for and excluded with a warning in
IBS.check()(seeCXPopulationfor an example).- Specified by:
mixedScoresin interfaceIBS.HasIBS.DPairs- Parameters:
traitCount- number of individuals for each traittraitScore- array for returning the payoffs/scores of each trait
-