Package org.evoludo.simulator.models
Interface IBS.HasIBS.CPairs
- All Superinterfaces:
Features,Features.Pairs,IBS.HasIBS
- All Known Subinterfaces:
IBS.HasIBS.CGroups,IBS.HasIBS.MCGroups
- Enclosing interface:
IBS.HasIBS
Modules that offer individual based simulation models with continuous traits
and pairwise interactions must implement this interface.
-
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 TypeMethodDescriptiondoublepairScores(double me, double[] groupTraits, int len, double[] groupPayoffs) Calculate the payoff/score for modules with interactions in pairs and a single continuous trait.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(double me, double[] groupTraits, int len, double[] groupPayoffs) Calculate the payoff/score for modules with interactions in pairs and a single continuous trait. The focal individual has traitmeand the traits of itsleninteraction partners are given ingroup. The payoffs/scores for each of thelenopponent traits must be stored and returned in the arraypayoffs.Note:
Only the firstlenentries ingroupare guaranteed to exist and have meaningful values. The population structure may restrict the size of the interaction group.len≤nGroupalways holds.Important:
must be overridden and implemented in subclasses that define game interactions between pairs of individuals (nGroup=2,pairwise=true), otherwise seeIBS.HasIBS.CGroups.groupScores(double, double[], int, double[]).- Parameters:
me- the trait of the focal individualgroupTraits- the traits of the group memberslen- the number of memebrs in the groupgroupPayoffs- the array for returning the payoffs/scores for each group member- Returns:
- the total (accumulated) payoff/score for the focal individual
-