37 #include <OpenMS/OpenMSConfig.h>
52 static void getKeys(
const T&
object, std::vector<String>& keys)
91 template<
typename T_In,
typename T_Out>
95 min_frequency = std::min(100.0f, std::max(0.0f, min_frequency));
97 std::map<String, UInt> counter;
98 typedef std::vector<String> KeysType;
100 for (
typename T_In::const_iterator it = it_start; it != it_end; ++it)
102 getter.getKeys(*it, keys);
103 for (KeysType::const_iterator itk = keys.begin(); itk != keys.end(); ++itk)
109 const UInt required_counts =
UInt(min_frequency / 100.0 * std::distance(it_start, it_end));
111 for (
const auto& [key, count] : counter)
113 if (count >= required_counts)
115 common_keys.insert(common_keys.end(), key);
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47