37 #include <OpenMS/OpenMSConfig.h>
80 template<
typename T_In,
typename T_Out>
81 static T_Out
findCommonMetaKeys(
const typename T_In::const_iterator& it_start,
const typename T_In::const_iterator& it_end,
float min_frequency)
84 min_frequency = std::min((
float)100.0, std::max((
float)0.0, min_frequency));
86 std::map<String, uint> counter;
87 typedef std::vector<String> KeysType;
89 for (
typename T_In::const_iterator it = it_start; it != it_end; ++it)
92 for (KeysType::const_iterator itk = keys.begin(); itk != keys.end(); ++itk)
98 const uint required_counts = uint(min_frequency / 100.0 * std::distance(it_start, it_end));
100 for (std::map<String, uint>::const_iterator it = counter.begin(); it != counter.end(); ++it)
102 if (it->second >= required_counts)
104 common_keys.insert(common_keys.end(), it->first);