TrigDecisionTool: avoid mutables in FeatureContainer
Instead of removing duplicates in the call of getCombinations
(and
cache the result), do the duplicate removal when adding elements in the
container. Switch from using a set
to an unordered_set
as that seems
to be slightly faster (required adding a hash function for
Trig::Combination
).
Also apply some other minor code cleanups and inline comparison operators.
Overall this new code does not seem to perform any worse than the old solution. At least not in the workflows I tested. Not sure if there were any measurement done at the time when the rather complicated getCombinations
was first implemented.
cc @tbold @tamartin @jburr (some careful review would be appreciated)