6 return get_correlation(pid_1, pid_2, type);
12 return get_correlation(oid_1, oid_2, type);
21 return (*
this)(experiment, obs_id_1, obs_id_2, type);
30 return (*
this)(experiment, oid_1_b, oid_2_b, type);
37 return get_correlation(experiment, oid_1, oid_2, type);
42 const std::string& exp_2,
45 return get_correlation(exp_1, oid_1, exp_2, oid_2, type);
51 return get_correlation(pid_1, pid_2, type) != 0.0;
57 return get_correlation(oid_1, oid_2, type) != 0.0;
64 return (*
this)(experiment, oid_1, oid_2, type) != 0.0;
71 return (*
this)(experiment, oid_1, oid_2, type) != 0.0;
78 return (*
this)(experiment, oid_1, oid_2, type) != 0.0;
83 const std::string& exp_2,
86 return (*
this)(exp_1, oid_1, exp_2, oid_2, type) != 0.0;
90inline double CorrelationProvider::get_correlation(
const T& id_1,
92 CorrelationType type)
const {
107 LOG_ERROR(
"CorrelationProvider",
"Unknown correlation type requested.");
112double CorrelationProvider::get_correlation(
const std::string& experiment,
115 CorrelationType type)
const {
126 return correlation_repo.
get_correlation(experiment, id_1, id_2).second;
129 return std::hypot(corr.first, corr.second);
132 LOG_ERROR(
"CorrelationProvider",
"Unknown correlation type requested.");
137double CorrelationProvider::get_correlation(
const std::string& exp_1,
139 const std::string& exp_2,
141 CorrelationType type)
const {
142 if (exp_1 == exp_2 && id_1 == id_2) {
150 return correlation_repo.
get_correlation(exp_1, id_1, exp_2, id_2).first;
152 return correlation_repo.
get_correlation(exp_1, id_1, exp_2, id_2).second;
154 auto corr = correlation_repo.
get_correlation(exp_1, id_1, exp_2, id_2);
155 return std::hypot(corr.first, corr.second);
158 LOG_ERROR(
"CorrelationProvider",
"Unknown correlation type requested.");
High-level access to parameter and experiment-scoped observable correlations.
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
double operator()(const ParamId &pid_1, const ParamId &pid_2, CorrelationType type)
Retrieves a correlation between two parameters.
bool exists(const ParamId &pid_1, const ParamId &pid_2, CorrelationType type)
Checks if a correlation between two parameters is non-zero.
CorrelationType
Type of correlation component requested.
Manages correlations between parameters and experiment-scoped observables.
double get_combined_correlation(T p1, T p2) const
Computes the combined correlation (quadratic sum) between two entities of the same type.
std::pair< double, double > get_correlation(ParamId p1, ParamId p2) const
Retrieves the correlation between two parameters.
static IdOf< ObservableTag > to_id(Observables e)
Converts an enum value to an IdOf<Tag>.
static MemoryManager * GetInstance()
Retrieves the singleton instance of MemoryManager.
const CorrelationRepository & get_correlation_repository()
Retrieves the current correlation repository.
double T(double x)
Wilson coefficient T(x).
Identifies an observable together with a numerical bin.
Composite identifier for a single parameter.