Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ParameterShifter.cpp
Go to the documentation of this file.
1#include "ParameterShifter.h"
2
3void ParameterShifter::mutate(const ParamId &pid, scalar_t value) {
4 if (!pid.type.has_value()) {
5 LOG_ERROR("LogicError", "Use of incomplete ParamId to mutate parameter. Please specify a ParameterType.");
6 }
7
8 Parameters::GetInstance(pid.type.value())->shiftParameter(pid, value);
9}
10
12 if (!pid.type.has_value()) {
13 LOG_ERROR("LogicError", "Use of incomplete ParamId to mutate parameter. Please specify a ParameterType.");
14 }
15
16 Parameters::GetInstance(pid.type.value())->changeParameterMode(pid, mode);
17}
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
Definition Logger.h:41
Concrete mutator that shifts parameter values.
ParameterMode
Defines the modes in which a parameter can operate.
Definition Parameter.h:45
void mutate(const ParamId &pid, scalar_t value) override
Shifts the value of a parameter by a given amount.
void change_mode(const ParamId &pid, ParameterMode mode) override
Changes the mode of a parameter (e.g., from FIXED to SHIFTABLE).
static std::shared_ptr< Parameters > GetInstance(ParameterType id=ParameterType::SM)
Returns the singleton-like repository for a given parameter type.
Composite identifier for a single parameter.
Definition ParamID.h:57
std::optional< ParameterType > type
Optional high-level parameter category.
Definition ParamID.h:65