Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
InterpretedParam.h
Go to the documentation of this file.
1#ifndef INTERPRETED_PARAM_H
2#define INTERPRETED_PARAM_H
3
4#include "Include.h"
5
30 std::string block;
31
34
36 bool is_bsm{false};
37
39 bool is_complex{false};
40
46 bool operator==(const InterpretedParam& other) const {
47 return block == other.block &&
48 code == other.code &&
49 is_bsm == other.is_bsm &&
50 is_complex == other.is_complex;
51 }
52};
53
63inline void hash_combine(std::size_t& seed, std::size_t value) noexcept {
64 seed ^= value + 0x9e3779b97f4a7c15ull + (seed << 6) + (seed >> 2);
65}
66
76namespace std {
77 template<>
78 struct hash<InterpretedParam> {
79 std::size_t operator()(const InterpretedParam& p) const noexcept {
80 std::size_t seed = 0;
81 hash_combine(seed, std::hash<std::string>{}(p.block));
82 hash_combine(seed, hash<LhaID>{}(p.code));
83 hash_combine(seed, std::hash<bool>{}(p.is_bsm));
84 hash_combine(seed, std::hash<bool>{}(p.is_complex));
85 return seed;
86 }
87 };
88}
89
90
91#endif
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Helper to combine hash values (boost-like hash_combine).
Hash specialization for SymbolId<Tag>.
Definition BlockName.h:353
Identifies a single interpreted parameter from an LHA block.
std::string block
Name of the LHA block (e.g. "SMINPUTS", "MASS", "B_Dlnu", ...).
bool is_bsm
True if this parameter belongs to the BSM part of the model.
LhaID code
LHA index (or multi-index) identifying the entry inside the block.
bool is_complex
True if the parameter is interpreted as complex-valued.
bool operator==(const InterpretedParam &other) const
Equality comparison operator.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
std::size_t operator()(const InterpretedParam &p) const noexcept