|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Composite identifier for a single parameter. More...
#include <ParamID.h>

Public Member Functions | |
| ParamId () | |
| Default constructor. | |
| ParamId (const BlockName &block, const LhaID &code) | |
| Constructs a ParamId from a block name and an index. | |
| ParamId (ParameterType type, const BlockName &block, const LhaID &code) | |
| Constructs a ParamId from a type, block name and index. | |
| void | set_parameter_type (ParameterType type) |
| Sets or overwrites the parameter type. | |
| bool friend | operator== (const ParamId &lhs, const ParamId &rhs) |
| Equality comparison between two ParamId objects. | |
| bool | operator< (const ParamId &other) const |
| Strict ordering operator for ParamId. | |
Public Attributes | |
| std::optional< ParameterType > | type |
| Optional high-level parameter category. | |
| BlockName | block |
| Name of the block where the parameter is stored. | |
| LhaID | code |
| Index or multi-index of the parameter inside the block. | |
Composite identifier for a single parameter.
ParamId ties together three pieces of information:
This allows one to uniquely reference a given entry in a parameter file or internal parameter store. The type field is optional; for some use cases only the (block, code) pair is relevant.
Comparison operators (== and <) are defined so that ParamId can be used as a key in ordered containers. A hash specialization is also provided to enable its use in unordered containers.
| ParamId::ParamId | ( | ) |
Default constructor.
Initializes a "null" parameter identifier with:
This can be used as a sentinel value.
Definition at line 4 of file ParamID.cpp.
Constructs a ParamId from a block name and an index.
The parameter type remains unset (std::nullopt). This is useful when the (block, code) pair is sufficient to identify the parameter.
| block | Block to which the parameter belongs. |
| code | Index or multi-index within the block. |
Definition at line 5 of file ParamID.cpp.
| ParamId::ParamId | ( | ParameterType | type, |
| const BlockName & | block, | ||
| const LhaID & | code | ||
| ) |
Constructs a ParamId from a type, block name and index.
This constructor sets all three fields explicitly, providing the most detailed identification of the parameter.
| type | High-level parameter category. |
| block | Block to which the parameter belongs. |
| code | Index or multi-index within the block. |
Definition at line 6 of file ParamID.cpp.
| bool ParamId::operator< | ( | const ParamId & | other | ) | const |
Strict ordering operator for ParamId.
The ordering is defined lexicographically on (type, block, code):
This allows ParamId to be used as a key in ordered containers such as std::map or std::set.
| other | Right-hand side. |
*this is lexicographically smaller than other. Definition at line 14 of file ParamID.cpp.
Equality comparison between two ParamId objects.
Two ParamId objects are equal if and only if all three components (type, block, code) are equal. For the type field, equality of std::optional<ParameterType> is used, so both must either be unset or hold the same value.
| lhs | Left-hand side. |
| rhs | Right-hand side. |
| void ParamId::set_parameter_type | ( | ParameterType | type | ) |
Sets or overwrites the parameter type.
This can be useful when constructing a ParamId in several steps or when inferring the parameter type after the fact.
| type | New parameter type to assign. |
Definition at line 8 of file ParamID.cpp.
| BlockName ParamId::block |
| LhaID ParamId::code |
| std::optional<ParameterType> ParamId::type |