Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ParamID.cpp
Go to the documentation of this file.
1
2#include "ParamID.h"
3
4ParamId::ParamId() : block("NULL"), code(0) {}
5ParamId::ParamId(const BlockName& block, const LhaID& code) : block(block), code(code) {}
6ParamId::ParamId(ParameterType type, const BlockName& block, const LhaID& code) : type(type), block(block), code(code) {}
7
8void ParamId::set_parameter_type(ParameterType type) { this->type = type; }
9
10bool operator==(const ParamId& lhs, const ParamId& rhs) {
11 return lhs.type == rhs.type && lhs.block == rhs.block && lhs.code == rhs.code;
12};
13
14bool ParamId::operator<(const ParamId& other) const {
15 if (type != other.type) return type < other.type;
16 if (block != other.block) return block < other.block;
17 return code < other.code;
18}
ParameterType
bool operator==(const ParamId &lhs, const ParamId &rhs)
Definition ParamID.cpp:10
Block identifier with alias support.
Definition BlockName.h:59
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
Composite identifier for a single parameter.
Definition ParamID.h:57
std::optional< ParameterType > type
Optional high-level parameter category.
Definition ParamID.h:65
void set_parameter_type(ParameterType type)
Sets or overwrites the parameter type.
Definition ParamID.cpp:8
BlockName block
Name of the block where the parameter is stored.
Definition ParamID.h:73
ParamId()
Default constructor.
Definition ParamID.cpp:4
bool operator<(const ParamId &other) const
Strict ordering operator for ParamId.
Definition ParamID.cpp:14
LhaID code
Index or multi-index of the parameter inside the block.
Definition ParamID.h:82