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
,TBT
,Traits
public interface HasHistogram
Module
s 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 interface
Module
s that implement theHasHistogram.Degree
interface include histograms of the degree distribution of the population geometry.static interface
Module
s that implement theHasHistogram.Fitness
interface include histograms of fitness distributions.static interface
Module
s that implement theHasHistogram.StatisticsProbability
interface must be capable of running statistics over multiple runs and include histograms of fixation probabilities.static interface
Module
s that implement theHasHistogram.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
Module
s that implement theHasHistogram.StatisticsTime
interface must be capable of running statistics over multiple runs and include histograms of fixation times.static interface
Module
s that implement theHasHistogram.Strategy
interface 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.int
Get the number of traits in theModule
s.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 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 histogramidx
- the index of the trait- Returns:
- the array of levels for reference
-
getNTraits
int getNTraits()Get the number of traits in theModule
s. 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
-