11 #include <OpenMS/OpenMSConfig.h>
26 static void getKeys(
const T&
object, std::vector<String>& keys)
66 template<
typename T_In,
typename T_Out>
70 min_frequency = std::min(100.0f, std::max(0.0f, min_frequency));
72 std::map<String, UInt> counter;
73 typedef std::vector<String> KeysType;
75 for (
typename T_In::const_iterator it = it_start; it != it_end; ++it)
77 getter.getKeys(*it, keys);
78 for (KeysType::const_iterator itk = keys.begin(); itk != keys.end(); ++itk)
84 const UInt required_counts =
UInt(min_frequency / 100.0 * std::distance(it_start, it_end));
86 for (
const auto& [key, count] : counter)
88 if (count >= required_counts)
90 common_keys.insert(common_keys.end(), key);
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19