17 #include <OpenMS/config.h>
79 mass(local_mass), abundance(local_abundance)
129 nominal_mass_(nominalMass)
136 peaks_.push_back(peaks_container::value_type(mass, 1.0));
143 nominal_mass_(nominalMass)
148 peaks_(distribution.peaks_),
149 nominal_mass_(distribution.nominal_mass_)
224 return peaks_[i].mass + nominal_mass_ + i;
235 return peaks_[i].abundance;
259 this->nominal_mass_ = nominalMass;
288 bool empty()
const {
return peaks_.empty(); }
Represents a distribution of isotopes restricted to the first K elements.
Definition: IMSIsotopeDistribution.h:63
masses_container getMasses() const
IMSIsotopeDistribution & operator*=(unsigned int pow)
peaks_container peaks_
Container for isotopes.
Definition: IMSIsotopeDistribution.h:292
void setMinimumSize_()
Sets peaks/isotopes container minimum size.
std::vector< peak_type > peaks_container
Type of container to store peaks.
Definition: IMSIsotopeDistribution.h:92
bool operator!=(const IMSIsotopeDistribution &distribution) const
nominal_mass_type nominal_mass_
Nominal mass of distribution.
Definition: IMSIsotopeDistribution.h:295
IMSIsotopeDistribution(nominal_mass_type nominalMass=0)
Constructor with nominal mass.
Definition: IMSIsotopeDistribution.h:128
IMSIsotopeDistribution(const peaks_container &peaks, nominal_mass_type nominalMass=0)
Constructor with isotopes and nominal mass.
Definition: IMSIsotopeDistribution.h:140
nominal_mass_type getNominalMass() const
Definition: IMSIsotopeDistribution.h:250
IMSIsotopeDistribution & operator=(const IMSIsotopeDistribution &distribution)
double abundance_type
Type of isotope abundance.
Definition: IMSIsotopeDistribution.h:70
IMSIsotopeDistribution(mass_type mass)
Constructor with single isotope.
Definition: IMSIsotopeDistribution.h:133
mass_type getAverageMass() const
size_type size() const
Definition: IMSIsotopeDistribution.h:162
std::vector< abundance_type > abundances_container
Type of container with isotope abundances.
Definition: IMSIsotopeDistribution.h:113
bool empty() const
Definition: IMSIsotopeDistribution.h:288
abundances_container getAbundances() const
IMSIsotopeDistribution & operator*=(const IMSIsotopeDistribution &distribution)
peaks_container::size_type size_type
Type of peaks container's size.
Definition: IMSIsotopeDistribution.h:101
peaks_container::iterator peaks_iterator
Type of iterator over container with peaks.
Definition: IMSIsotopeDistribution.h:95
static size_type SIZE
Length of isotope distribution.
Definition: IMSIsotopeDistribution.h:125
~IMSIsotopeDistribution()
Destructor.
Definition: IMSIsotopeDistribution.h:153
bool operator==(const IMSIsotopeDistribution &distribution) const
Peak peak_type
Type of isotope peak.
Definition: IMSIsotopeDistribution.h:89
IMSIsotopeDistribution(const IMSIsotopeDistribution &distribution)
Copy constructor.
Definition: IMSIsotopeDistribution.h:147
abundance_type getAbundance(size_type i) const
Definition: IMSIsotopeDistribution.h:233
mass_type getMass(size_type i) const
Definition: IMSIsotopeDistribution.h:222
abundances_container::iterator abundances_iterator
Type of iterator over container with isotope abundances.
Definition: IMSIsotopeDistribution.h:116
masses_container::const_iterator const_masses_iterator
Type of const iterator over container with isotope masses.
Definition: IMSIsotopeDistribution.h:110
abundances_container::const_iterator const_abundances_iterator
Type of const iterator over container with isotope abundances.
Definition: IMSIsotopeDistribution.h:119
peaks_container::const_iterator const_peaks_iterator
Type of const iterator over container with peaks.
Definition: IMSIsotopeDistribution.h:98
std::vector< mass_type > masses_container
Type of container with isotope masses.
Definition: IMSIsotopeDistribution.h:104
masses_container::iterator masses_iterator
Type of iterator over container with isotope masses.
Definition: IMSIsotopeDistribution.h:107
double mass_type
Type of isotope mass.
Definition: IMSIsotopeDistribution.h:67
static abundance_type ABUNDANCES_SUM_ERROR
Error to be allowed for isotope distribution.
Definition: IMSIsotopeDistribution.h:122
void setNominalMass(nominal_mass_type nominalMass)
Definition: IMSIsotopeDistribution.h:257
unsigned int nominal_mass_type
Type of isotope nominal mass.
Definition: IMSIsotopeDistribution.h:73
std::ostream & operator<<(std::ostream &os, const IMSAlphabet &alphabet)
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Structure that represents an isotope peak - pair of mass and abundance.
Definition: IMSIsotopeDistribution.h:77
bool operator==(const Peak &peak) const =default
Peak(mass_type local_mass=0.0, abundance_type local_abundance=0.0)
Definition: IMSIsotopeDistribution.h:78
abundance_type abundance
Definition: IMSIsotopeDistribution.h:85
mass_type mass
Definition: IMSIsotopeDistribution.h:84