From 3c34d068fe4f0a2a68eb29426bfff975e2f5a0e7 Mon Sep 17 00:00:00 2001 From: Graeme A Stewart Date: Fri, 7 Jun 2024 18:50:24 +0200 Subject: [PATCH] Re-add algorithm2power (#55) This was dropped by accident during a rebase and is used by the examples --- src/AlgorithmStrategyEnums.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AlgorithmStrategyEnums.jl b/src/AlgorithmStrategyEnums.jl index 415c020..9b6a121 100644 --- a/src/AlgorithmStrategyEnums.jl +++ b/src/AlgorithmStrategyEnums.jl @@ -41,6 +41,14 @@ const power2algorithm = Dict(-1 => JetAlgorithm.AntiKt, 0 => JetAlgorithm.CA, 1 => JetAlgorithm.Kt) +""" + algorithm2power + +A dictionary that maps pp algorithm names to their corresponding power values. + +The dictionary is created by iterating over the `power2algorithm` dictionary and swapping the keys and values. +""" +const algorithm2power = Dict((i.second, i.first) for i in power2algorithm) """ Base.tryparse(E::Type{<:Enum}, str::String)