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

public static interface IBS.HasIBS.CGroups extends IBS.HasIBS.CPairs, Features.Groups
Modules that offer individual based simulation models with continuous traits and interactions in groups must implement this interface.
  • 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 trait me and the traits of its len interaction partners are given in group. The payoffs/scores for each of the len participants must be stored and returned in the array payoffs.

      Note:

      Only the first len*nTraits entries in group 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 sizes nGroup>2, otherwise see IBS.HasIBS.CPairs.pairScores(double, double[], int, double[])).
      Parameters:
      me - the trait of the focal individual
      groupTraits - the traits of the group members
      len - the number of members in the group
      groupPayoffs - the array for returning the payoffs/scores for each group member
      Returns:
      the payoff/score for the focal individual