Function record
pub fn record(
view: &mut StudyView,
schema: &SpaceSchema,
number: u64,
params: Assignment,
state: TrialState,
value: Option<f64>,
)Expand description
Folds one trial’s outcome into view, in the state a sampler should see it.
TrialState::Completewithvalue = Some(v)— a finished observation the sampler learns from (StudyView::visible).TrialState::Runningwithvalue = None— an in-flight trial, so a parallel-repulsion sampler (TPE’s constant liar) can see it as pending.TrialState::Failedwithvalue = None— an unevaluable trial, invisible to the sampler but recorded.
The distributions are copied from schema so the recorded trial carries the
support each value was drawn from, exactly as storage would.