1 #ifndef MAXCOMBINATIONCONDITION_ICC
2 #define MAXCOMBINATIONCONDITION_ICC
4 #include "CombinationsIterator.h"
8 MaxCombinationCondition<T>::MaxCombinationCondition(std::size_t k,
9 std::unique_ptr<ICondition> cond, const T& cmp):
10 m_k{k},m_acceptingCondition{std::move(cond)}, m_cmp{cmp} {
15 MaxCombinationCondition<T>::isSatisfied(const HypoJetVector& hjv,
16 const std::unique_ptr<ITrigJetHypoInfoCollector>& c) const {
18 if (n < m_k) {return false;}
19 auto begin = CombinationsIterator(m_k, hjv);
20 auto end = begin.endIter();
23 return m_acceptingCondition->isSatisfied(*std::max_element(begin,
30 std::string MaxCombinationCondition<T>::toString() const {
32 ss << "MaxCombinationCondition:"
34 << " capacity " << m_k
35 << " accepting condition " << m_acceptingCondition->toString()