|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Stores a pair of correlation matrices (statistical and systematic) for a given key type. More...
#include <CorrelationRepo.h>
Public Member Functions | |
| std::pair< double, double > | at (const std::pair< T, T > &key) const |
| Retrieves the correlation values for a given pair. | |
| void | emplace (std::pair< T, T > &&key, double stat_val, double syst_val) |
| Inserts a new entry into both the statistical and systematic matrices, enforcing symmetry. | |
Public Attributes | |
| SparseMatrix< T > | stat |
| Statistical correlation matrix. | |
| SparseMatrix< T > | syst |
| Systematic correlation matrix. | |
Friends | |
| template<typename U > | |
| std::ostream & | operator<< (std::ostream &, const CorrelationMatrixPair< U > &) |
| Stream output operator for a CorrelationMatrixPair. | |
Stores a pair of correlation matrices (statistical and systematic) for a given key type.
The template parameter T is the type used as keys in the correlation matrices (e.g. ParamId or ExperimentObs). Internally this relies on SparseMatrix<T>, which behaves like an associative container:
contains(key) tests presence of an entry.at(key) retrieves the stored double value.(std::pair<T,T>, double).Symmetry: The helper emplace below automatically inserts entries both for (a,b) and (b,a), enforcing a symmetric correlation structure.
| T | Key type used to index the correlation entries. |
Definition at line 28 of file CorrelationRepo.h.
|
inline |
Retrieves the correlation values for a given pair.
If a given (T,T) pair is not present in one of the matrices, the corresponding correlation component is assumed to be 0.0.
| key | A pair of keys (T, T) representing two parameters/observables. |
(stat_value, syst_value) for the requested key. Definition at line 41 of file CorrelationRepo.h.
|
inline |
Inserts a new entry into both the statistical and systematic matrices, enforcing symmetry.
This function:
so that the resulting correlation matrices are symmetric by construction.
| key | The pair of keys (T, T). |
| stat_val | Statistical correlation value. |
| syst_val | Systematic correlation value. |
Definition at line 62 of file CorrelationRepo.h.
|
friend |
Stream output operator for a CorrelationMatrixPair.
The output iterates over all entries in the statistical matrix and prints them together with their corresponding systematic values:
(i, j): rho_stat + rho_syst
The format is intended for debugging/logging rather than for machine parsing.
| U | Key type. |
| os | Output stream. |
| cmp | The CorrelationMatrixPair to print. |
Definition at line 99 of file CorrelationRepo.cpp.
| SparseMatrix<T> CorrelationMatrixPair< T >::stat |
Statistical correlation matrix.
Definition at line 29 of file CorrelationRepo.h.
| SparseMatrix<T> CorrelationMatrixPair< T >::syst |
Systematic correlation matrix.
Definition at line 30 of file CorrelationRepo.h.