37 #include <OpenMS/OpenMSConfig.h> 73 template<
typename T_In,
typename T_Out>
74 static T_Out
findCommonMetaKeys(
const typename T_In::const_iterator& it_start,
const typename T_In::const_iterator& it_end,
float min_frequency)
77 min_frequency = std::min((
float)100.0, std::max((
float)0.0, min_frequency));
79 std::map<String, uint> counter;
80 typedef std::vector<String> KeysType;
82 for (
typename T_In::const_iterator it = it_start; it != it_end; ++it)
85 for (KeysType::const_iterator itk = keys.begin(); itk != keys.end(); ++itk)
91 const uint required_counts = uint(min_frequency / 100.0 * std::distance(it_start, it_end));
93 for (std::map<String, uint>::const_iterator it = counter.begin(); it != counter.end(); ++it)
95 if (it->second >= required_counts)
97 common_keys.insert(common_keys.end(), it->first);
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46