Interface HasHistogram

All Known Subinterfaces:
HasHistogram.Degree, HasHistogram.Fitness, HasHistogram.StatisticsProbability, HasHistogram.StatisticsStationary, HasHistogram.StatisticsTime, HasHistogram.Strategy
All Known Implementing Classes:
ATBT, CDL, CDLP, CDLPQ, CLabour, CSD, DemesTBT, EcoPGG, Moran, NetGames, RSP, scanCSD, simCDL, simCDLP, simCDLPQ, simMoran, simTBT, simTraits, TBT, Traits

public interface HasHistogram
Modules that implement the HasHistogram interface request a graphical view to depicts a histogram of data in their GUI: Histogram in GWT and MVCTraitHistogram, MVFitHistogram in JRE for a single continuous trait or the fitness distribution, respectively.

Important: Implementations have to be agnostic of the runtime environment (JRE vs GWT).

Author:
Christoph Hauert
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Modules that implement the HasHistogram.Degree interface include histograms of the degree distribution of the population geometry.
    static interface 
    Modules that implement the HasHistogram.Fitness interface include histograms of fitness distributions.
    static interface 
    Modules that implement the HasHistogram.StatisticsProbability interface must be capable of running statistics over multiple runs and include histograms of fixation probabilities.
    static interface 
    Modules that implement the HasHistogram.StatisticsStationary interface must be capable of generate histograms of the number of times particular configurations (frequencies of strategies) are visited, which eventually converges to a stationary distributions in ergodic settings.
    static interface 
    Modules that implement the HasHistogram.StatisticsTime interface must be capable of running statistics over multiple runs and include histograms of fixation times.
    static interface 
    Modules that implement the HasHistogram.Strategy interface include histograms of strategy distributions.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double[]
    getCustomLevels(Data type, int idx)
    Some models may provide reference values for histograms as a horizontal line marking a particular value.
    int
    Get the number of traits in the Modules.
    Get the colors for the different trait histograms.
  • Method Details

    • getCustomLevels

      default double[] getCustomLevels(Data type, int idx)
      Some models may provide reference values for histograms as a horizontal line marking a particular value. For example this is the case for statistics of fixation probabilities or times in the org.evoludo.simulator.modules.Moran Moran module where the analytical results are provided as a reference to highlight the effects of population structures.
      Parameters:
      type - the type of data shown in the histogram
      idx - the index of the trait
      Returns:
      the array of levels for reference
    • getNTraits

      int getNTraits()
      Get the number of traits in the Modules. For example, histograms are shown for each trait in continuous modules or for the fitness distribution of each strategy in discrete modules.
      Returns:
      the number of traits
    • getTraitColors

      Color[] getTraitColors()
      Get the colors for the different trait histograms.
      Returns:
      the array with trait colors