Interface IBS.HasIBS.CPairs

All Superinterfaces:
Features, Features.Pairs, IBS.HasIBS
All Known Subinterfaces:
IBS.HasIBS.CGroups, IBS.HasIBS.MCGroups
All Known Implementing Classes:
CSD, scanCSD
Enclosing interface:
IBS.HasIBS

public static interface IBS.HasIBS.CPairs extends IBS.HasIBS, Features.Pairs
Modules that offer individual based simulation models with continuous traits and pairwise interactions must implement this interface.
  • Method Details Link icon

    • pairScores Link icon

      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 trait me and the traits of its len interaction partners are given in group. The payoffs/scores for each of the len opponent traits/strategies must be stored and returned in the array payoffs.

      Note: Link icon

      Only the first len 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: Link icon

      must be overridden and implemented in subclasses that define game interactions between pairs of individuals (nGroup=2, pairwise=true), otherwise see IBS.HasIBS.CGroups.groupScores(double, double[], int, double[]).
      Parameters:
      me - the trait of the focal individual
      groupTraits - the traits of the group members
      len - the number of memebrs in the group
      groupPayoffs - the array for returning the payoffs/scores for each group member
      Returns:
      the total (accumulated) payoff/score for the focal individual