Package org.evoludo.simulator.views
Interface HasDistribution
- All Known Subinterfaces:
HasDistribution.Strategy
public interface HasDistribution
Modules that implement the
HasDistribution interface request a graphical view to visualize the
density distribution of data in multiple dimensions in their GUI:
Distribution for GWT and
MVCDistr,
MVC2Distr for JRE modules with one or two
continuous traits, 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 the HasDistribution.Strategy interface include a graphical view that depicts the density distribution of strategic traits over time in their GUI. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of traits in theModules.getTraitName(int idx) Gets the name of the trait with indexidx.
-
Method Details
-
getNTraits
int getNTraits()Gets the number of traits in theModules. The trait distribution is shown over time if there is only a single trait and otherwise a 2D trait distribution is shown where the two traits can be selected and changed through a context menu.- Returns:
- the number of traits
-
getTraitName
Gets the name of the trait with indexidx. This is used to label the graph and entries in the context menu, if applicable.- Parameters:
idx- the index of the trait- Returns:
- name of the trait
-