Interface IBS.HasIBS.DPairs
- All Superinterfaces:
Features,Features.Pairs,IBS.HasIBS
- All Known Subinterfaces:
IBS.HasIBS.DGroups
- All Known Implementing Classes:
ATBT,CDL,CDLP,CDLPQ,Centipede,DemesTBT,EcoPGG,RSP,simCDL,simCDLP,simCDLPQ,simTBT,simTraits,TBT,Traits
- 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 TypeMethodDescriptionvoidmixedScores(int[] traitCount, double[] traitScore) Calculate the average payoff/score in a finite population with the number of each trait provided incountfor pairwise interactions.doublepairScores(int me, int[] traitCount, double[] traitScore) Calculate and return total (accumulated) payoff/score for pairwise interactions of the focal individual with traitmeagainst opponents with different traits.Methods inherited from interface Features
getTitle, isMultispecies, isStaticMethods inherited from interface Features.Pairs
isPairwiseMethods inherited from interface IBS.HasIBS
createIBS
-
Method Details
-
pairScores
double pairScores(int me, int[] traitCount, double[] traitScore) Calculate and return total (accumulated) payoff/score for pairwise interactions of the focal individual with traitmeagainst opponents with different traits. The respective numbers of each of thenTraitsopponent traits are provided in the arraytCount. The payoffs/scores for each of thenTraitsopponent traits must be stored and returned in the arraytScore.Important: must be overridden and implemented in subclasses that define game interactions between pairs of individuals (
nGroup=2,pairwise=true), otherwise seeIBS.HasIBS.DGroups.groupScores(int[], double[]).- Parameters:
me- the trait index of the focal individualtraitCount- number of opponents with each traittraitScore- array for returning the scores of each opponent trait- Returns:
- score of focal individual
meaccumulated over all interactions
-
mixedScores
void mixedScores(int[] traitCount, double[] traitScore) Calculate 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
pairScores(int, int[], double[])orIBS.HasIBS.DGroups.groupScores(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).- Parameters:
traitCount- number of individuals for each traittraitScore- array for returning the payoffs/scores of each trait
-