ComparisonSelectionModel

Shared mutable state for the comparison analyzer's experiments-first workflow.

The host owns one of these and uses it for the Experiments column only. Response and analysis selection have moved into the per-analysis dialogs (BoxPlotAnalysisDialog, MultipleComparisonAnalysisDialog, ConfidenceIntervalsAnalysisDialog) — each dialog reads experiments from this model when it opens and asks the user for a response inside its own configuration UI.

Multi-source ready: takes a list of ComparisonDataSourceIfc. v1 hosts construct with a single-element list. When the analyzer grows to genuinely multi-source workflows, the model flattens experiments across sources and the helpers below adapt without changing the public surface.

Constructors

Link copied to clipboard
constructor(sources: List<ComparisonDataSourceIfc>)

Properties

Link copied to clipboard

All experiments across all sources, in source-order then natural order within each source.

Link copied to clipboard

Names of experiments the analyst has checked.

Link copied to clipboard

Functions

Link copied to clipboard
fun addListener(l: () -> Unit)
Link copied to clipboard

Responses across the currently-checked experiments — the candidate list shown in each analysis dialog's response sub-picker.

Link copied to clipboard

Names of experiments that record responseName within the current selection. Drives the "Recorded by N of M" column.

Link copied to clipboard

Collect per-experiment observation arrays for responseName, restricted to the experiments that record it. Iteration order matches selectedExperiments — i.e. source-order then natural order within each source — which is the canonical left→right ordering for cross-experiment box plots and CI plots. Returns an empty map when no experiment records the response.

Link copied to clipboard
fun selectAll()

Check every experiment. Used by Select All / clearing with selectNone.

Link copied to clipboard

Currently-checked experiments as full rows, in source-order then natural order within each source. Iteration order is the canonical left→right ordering for box plots and CI plots.

Link copied to clipboard

Uncheck every experiment.

Link copied to clipboard
fun toggleExperiment(name: String, checked: Boolean)

Check or uncheck the experiment with the given name.

Link copied to clipboard

Validate that the current selection supports running type against responseName. Returns ValidationResult.OK when the analysis dialog's Generate button can fire; otherwise ValidationResult.fail with a user-facing explanation.