|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Interface for a model capable of producing observable predictions. More...
#include <IModel.h>

Public Member Functions | |
| virtual | ~IModel ()=default |
| Default virtual destructor. | |
| virtual std::shared_ptr< IModel > | clone_for_worker () const |
| Returns an isolated model instance suitable for one worker thread. | |
| virtual bool | can_clone_for_worker () const |
| Whether clone_for_worker is implemented. | |
| virtual std::unique_ptr< IModelThreadGuard > | force_decay_threads (size_t) |
| Temporarily force internal model/decay thread counts. | |
| virtual void | prepare_for_prediction () |
| Materialize model-side runtime state before repeated predictions. | |
| virtual std::map< ObservableId, std::vector< ObservableValue > > | predict_optimized (const std::map< ParamId, double > &p, const std::map< ParamId, double > &eta)=0 |
| Computes model predictions for a given parameter point. | |
| virtual std::size_t | n_observables () const =0 |
| Returns the number of currently active binned observables. | |
| virtual std::unordered_set< ParamId > | get_obs_deps (ObservableId id)=0 |
| Returns the model parameters required by an observable. | |
| virtual std::vector< BinnedObservableId > | get_obs_ids ()=0 |
| Returns the identifiers of the currently active observable bins. | |
| virtual void | compute_observables () const =0 |
| Forces computation of the currently configured observables. | |
Interface for a model capable of producing observable predictions.
The statistical code interacts with concrete model implementations only through this interface. A model receives two parameter maps:
p, usually the parameters of interest,eta, usually auxiliary or external inputs.Implementations may cache intermediate state internally, but calls to predict_optimized should return predictions consistent with the provided parameter maps.
|
virtualdefault |
Default virtual destructor.
|
inlinevirtual |
Whether clone_for_worker is implemented.
Reimplemented in ObservableInterfaceProxy.
|
inlinevirtual |
Returns an isolated model instance suitable for one worker thread.
Implementations that cannot provide isolation should return nullptr.
Reimplemented in ObservableInterfaceProxy.
|
pure virtual |
Forces computation of the currently configured observables.
This method is primarily used to initialize or refresh model-side caches before the statistical manager builds likelihood inputs.
Implemented in ObservableInterfaceProxy.
|
inlinevirtual |
Temporarily force internal model/decay thread counts.
The returned guard restores the previous state on destruction. Implementations that do not support runtime thread control may return nullptr.
Reimplemented in ObservableInterfaceProxy.
|
pure virtual |
Returns the model parameters required by an observable.
| id | Observable identifier. |
Implemented in ObservableInterfaceProxy, and BToMuMuToy.
|
pure virtual |
Returns the identifiers of the currently active observable bins.
Implemented in ObservableInterfaceProxy.
|
pure virtual |
Returns the number of currently active binned observables.
Implemented in ObservableInterfaceProxy, and BToMuMuToy.
|
pure virtual |
Computes model predictions for a given parameter point.
| p | Map of fit-parameter identifiers to values. |
| eta | Map of nuisance-parameter identifiers to values. |
Implemented in ObservableInterfaceProxy.
|
inlinevirtual |
Materialize model-side runtime state before repeated predictions.
Implementations may use this hook to lazily build dependent parameter blocks, Wilson groups, decay caches, or other mutable runtime structures that must exist before the first parameter update is committed. The default implementation is a no-op so existing non-cloneable models keep their previous behavior.
Reimplemented in ObservableInterfaceProxy.