Package org.evoludo.simulator.views
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,SIR,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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceModules that implement theHasHistogram.Degreeinterface include histograms of the degree distribution of the population geometry.static interfaceModules that implement theHasHistogram.Fitnessinterface include histograms of fitness distributions.static interfaceModules that implement theHasHistogram.StatisticsProbabilityinterface must be capable of running statistics over multiple runs and include histograms of fixation probabilities.static interfaceModules that implement theHasHistogram.StatisticsStationaryinterface 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 interfaceModules that implement theHasHistogram.StatisticsTimeinterface must be capable of running statistics over multiple runs and include histograms of fixation times.static interfaceModules that implement theHasHistogram.Strategyinterface include histograms of strategy distributions. -
Method Summary
Modifier and TypeMethodDescriptiondefault double[]getCustomLevels(Data type, int idx) Some models may provide reference values for histograms as a horizontal line marking a particular value.intGet the number of traits in theModules.Color[]Get the colors for the different trait histograms.
-
Method Details
-
getCustomLevels
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 theorg.evoludo.simulator.modules.Moran Moranmodule 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 histogramidx- the index of the trait- Returns:
- the array of levels for reference
-
getNTraits
int getNTraits()Get the number of traits in theModules. 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
-