26 class IsotopeDistribution;
27 class IsotopePatternGenerator;
28 class CoarseIsotopePatternGenerator;
79 if (a ==
nullptr || b ==
nullptr)
return std::less<const Element*>()(a, b);
81 const std::string& symbol_a = a->
getSymbol();
82 const std::string& symbol_b = b->
getSymbol();
83 if (symbol_a.size() != symbol_b.size())
return symbol_a.size() < symbol_b.size();
84 if (symbol_a != symbol_b)
return symbol_a < symbol_b;
85 return std::less<const Element*>()(a, b);
90 typedef std::map<const Element*, SignedSize, ElementLess_>
MapType_;
224 const std::set<UInt>& precursor_isotopes,
278 std::map<std::string, int>
toMap()
const;
406 std::vector<std::pair<std::string, OpenMS::SignedSize>> elements;
407 for (
const auto& [element_ptr, count] : ef)
409 elements.emplace_back(element_ptr->getSymbol(), count);
413 std::sort(elements.begin(), elements.end());
416 std::size_t seed = 0;
417 for (
const auto& [symbol, count] : elements)
Isotope pattern generator for coarse isotope distributions.
Definition CoarseIsotopePatternGenerator.h:81
Representation of an element.
Definition Element.h:34
const std::string & getSymbol() const
returns symbol of the element
unsigned int getAtomicNumber() const
returns the unique atomic number
Definition IsotopeDistribution.h:40
Provides an interface for different isotope pattern generator methods.
Definition IsotopePatternGenerator.h:42
int Int
Signed integer type.
Definition Types.h:72
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition Types.h:104
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
std::size_t hash_int(T value) noexcept
Hash for an integer type.
Definition HashUtils.h:107
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Combine a hash value with additional data using golden ratio mixing.
Definition HashUtils.h:87
std::size_t fnv1a_hash_string(const std::string &s) noexcept
FNV-1a hash for a string.
Definition HashUtils.h:70