8#include <unordered_set>
9#include <initializer_list>
20namespace fs = std::filesystem;
75 template<
typename... Args>
76 requires (std::convertible_to<Args, long> && ...)
77 LhaID(Args... sub_ids) :
parts({
static_cast<long>(sub_ids)...}) {}
162 operator long()
const;
227 return std::hash<std::string>{}(p.to_string());
Hash specialization for SymbolId<Tag>.
Represents an identifier of a LHA element, possibly containing several sub-ids.
std::vector< long > get_parts() const
Returns the underlying vector of sub-ids.
std::vector< long > parts
LhaID(const std::vector< long > &sub_ids)
Constructs an LhaID from an explicit vector of sub-ids.
friend bool operator==(const LhaID &lhs, const LhaID &rhs)
Equality comparison operator.
friend std::ostream & operator<<(std::ostream &, const LhaID &)
Stream output operator for LhaID.
friend bool operator<(const LhaID &lhs, const LhaID &rhs)
Strict weak ordering based on lexicographic comparison of parts.
LhaID(long id)
Constructs an LhaID with a single identifier.
LhaID(Args... sub_ids)
Constructs an LhaID from a list of integral sub-ids.
LhaID(std::vector< long > &&sub_ids)
std::string to_string() const
Returns the canonical string representation of this LhaID.
friend bool operator!=(const LhaID &lhs, const LhaID &rhs)
Inequality comparison operator.
std::size_t operator()(const LhaID &p) const noexcept
Computes the hash of a given LhaID.