11#include <OpenMS/OpenMSConfig.h>
34 Adduct(
Int charge,
Int amount,
double singleMass,
const String& formula,
double log_prob,
double rt_shift,
const String& label =
"");
const double & getRTShift() const
void setLogProb(const double &log_prob)
const String & getLabel() const
String checkFormula_(const String &formula)
const String & getFormula() const
Adduct operator+(const Adduct &rhs)
Add two adducts amount if they are equal (defined by equal formula)
double log_prob_
log probability of observing a single entity of this adduct
Definition Adduct.h:78
void setCharge(const Int &charge)
Adduct operator*(const Int m) const
Increase amount of this adduct by factor.
friend bool operator==(const Adduct &a, const Adduct &b)
Comparator.
String formula_
chemical formula (parsable by EmpiricalFormula)
Definition Adduct.h:79
void setAmount(const Int &amount)
const double & getSingleMass() const
String toAdductString(const String &ion_string, const Int &charge)
const Int & getAmount() const
const Int & getCharge() const
void operator+=(const Adduct &rhs)
Add other adducts amount to *this (equal formula required!)
Adduct(Int charge)
C'tor with initial charge.
String label_
Label for this adduct (can be used to indicate heavy labels)
Definition Adduct.h:81
double rt_shift_
RT shift induced by a single entity of this adduct (this is for adducts attached prior to ESI,...
Definition Adduct.h:80
friend std::ostream & operator<<(std::ostream &os, const Adduct &a)
Print the contents of an Adduct to a stream.
std::vector< Adduct > AdductsType
Definition Adduct.h:25
void setSingleMass(const double &singleMass)
Adduct(Int charge, Int amount, double singleMass, const String &formula, double log_prob, double rt_shift, const String &label="")
C'tor for all members.
void setFormula(const String &formula)
double singleMass_
mass of a single entity
Definition Adduct.h:77
const double & getLogProb() const
Int amount_
number of entities
Definition Adduct.h:76
Int charge_
usually +1
Definition Adduct.h:75
A more convenient string class.
Definition String.h:34
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
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 hash_float(T value) noexcept
Hash for a floating point type (float or double).
Definition HashUtils.h:142
std::size_t fnv1a_hash_string(const std::string &s) noexcept
FNV-1a hash for a string.
Definition HashUtils.h:70
std::size_t operator()(const OpenMS::Adduct &a) const noexcept
Definition Adduct.h:97