Package org.evoludo.simulator.models
Interface IBS.HasIBS.CGroups
- All Superinterfaces:
Features
,Features.Groups
,Features.Pairs
,IBS.HasIBS
,IBS.HasIBS.CPairs
- All Known Subinterfaces:
IBS.HasIBS.MCGroups
- Enclosing interface:
IBS.HasIBS
Modules that offer individual based simulation models with continuous traits
and interactions in groups must implement this interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Features
Features.Groups, Features.Pairs, Features.Static
Nested 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 TypeMethodDescriptiondouble
groupScores
(double me, double[] groupTraits, int len, double[] groupPayoffs) Calculate the payoff/score for modules with interactions in groups and a single continuous trait.Methods inherited from interface Features.Groups
getNGroup, isPairwise
Methods inherited from interface IBS.HasIBS
createIBS
Methods inherited from interface IBS.HasIBS.CPairs
pairScores
-
Method Details
-
groupScores
double groupScores(double me, double[] groupTraits, int len, double[] groupPayoffs) Calculate the payoff/score for modules with interactions in groups and a single continuous trait. The focal individual has traitme
and the traits of itslen
interaction partners are given ingroup
. The payoffs/scores for each of thelen
participants must be stored and returned in the arraypayoffs
.Note:
Only the firstlen*nTraits
entries ingroup
are guaranteed to exist and have meaningful values. The population structure may restrict the size of the interaction group.len≤nGroup
always holds.Important:
Must be overridden and implemented in subclasses that define game interactions among groups of individuals with multiple continuous traits (for groups with sizesnGroup>2
, otherwise seeIBS.HasIBS.CPairs.pairScores(double, double[], int, double[])
).- Parameters:
me
- the trait of the focal individualgroupTraits
- the traits of the group memberslen
- the number of members in the groupgroupPayoffs
- the array for returning the payoffs/scores for each group member- Returns:
- the payoff/score for the focal individual
-