36 #ifndef OPENMS_CHEMISTRY_MASSDECOMPOSITION_IMS_IMSISOTOPEDISTRIBUTION_H
37 #define OPENMS_CHEMISTRY_MASSDECOMPOSITION_IMS_IMSISOTOPEDISTRIBUTION_H
43 #include <OpenMS/config.h>
105 mass(mass), abundance(abundance)
158 nominal_mass_(nominalMass)
165 peaks_.push_back(peaks_container::value_type(mass, 1.0));
172 nominal_mass_(nominalMass)
177 peaks_(distribution.peaks_),
178 nominal_mass_(distribution.nominal_mass_)
253 return peaks_[i].mass + nominal_mass_ + i;
264 return peaks_[i].abundance;
272 mass_type getAverageMass()
const;
288 this->nominal_mass_ = nominalMass;
296 masses_container getMasses()
const;
303 abundances_container getAbundances()
const;
317 bool empty()
const {
return peaks_.empty(); }
327 void setMinimumSize_();
336 OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
342 #endif // OPENMS_CHEMISTRY_MASSDECOMPOSITION_IMS_ISOTOPE_DISTRIBUTION_H
Peak peak_type
Type of isotope peak.
Definition: IMSIsotopeDistribution.h:118
Structure that represents an isotope peak - pair of mass and abundance.
Definition: IMSIsotopeDistribution.h:102
IMSIsotopeDistribution(const IMSIsotopeDistribution &distribution)
Copy constructor.
Definition: IMSIsotopeDistribution.h:176
std::vector< abundance_type > abundances_container
Type of container with isotope abundances.
Definition: IMSIsotopeDistribution.h:142
IMSIsotopeDistribution(mass_type mass)
Constructor with single isotope.
Definition: IMSIsotopeDistribution.h:162
std::vector< mass_type > masses_container
Type of container with isotope masses.
Definition: IMSIsotopeDistribution.h:133
static size_type SIZE
Length of isotope distribution.
Definition: IMSIsotopeDistribution.h:154
nominal_mass_type nominal_mass_
Nominal mass of distribution.
Definition: IMSIsotopeDistribution.h:324
masses_container::const_iterator const_masses_iterator
Type of const iterator over container with isotope masses.
Definition: IMSIsotopeDistribution.h:139
double mass_type
Type of isotope mass.
Definition: IMSIsotopeDistribution.h:93
IMSIsotopeDistribution(nominal_mass_type nominalMass=0)
Constructor with nominal mass.
Definition: IMSIsotopeDistribution.h:157
mass_type mass
Definition: IMSIsotopeDistribution.h:113
Represents a distribution of isotopes restricted to the first K elements.
Definition: IMSIsotopeDistribution.h:88
OPENSWATHALGO_DLLAPI void normalize(const std::vector< double > &intensities, double normalization_factor, std::vector< double > &normalized_intensities)
Normalize intensities in vector by normalization_factor.
mass_type getMass(size_type i) const
Definition: IMSIsotopeDistribution.h:251
IMSIsotopeDistribution(const peaks_container &peaks, nominal_mass_type nominalMass=0)
Constructor with isotopes and nominal mass.
Definition: IMSIsotopeDistribution.h:169
void setNominalMass(nominal_mass_type nominalMass)
Definition: IMSIsotopeDistribution.h:286
peaks_container::const_iterator const_peaks_iterator
Type of const iterator over container with peaks.
Definition: IMSIsotopeDistribution.h:127
peaks_container::size_type size_type
Type of peaks container's size.
Definition: IMSIsotopeDistribution.h:130
double abundance_type
Type of isotope abundance.
Definition: IMSIsotopeDistribution.h:96
abundance_type abundance
Definition: IMSIsotopeDistribution.h:114
std::vector< peak_type > peaks_container
Type of container to store peaks.
Definition: IMSIsotopeDistribution.h:121
masses_container::iterator masses_iterator
Type of iterator over container with isotope masses.
Definition: IMSIsotopeDistribution.h:136
~IMSIsotopeDistribution()
Destructor.
Definition: IMSIsotopeDistribution.h:182
abundances_container::const_iterator const_abundances_iterator
Type of const iterator over container with isotope abundances.
Definition: IMSIsotopeDistribution.h:148
static abundance_type ABUNDANCES_SUM_ERROR
Error to be allowed for isotope distribution.
Definition: IMSIsotopeDistribution.h:151
unsigned int nominal_mass_type
Type of isotope nominal mass.
Definition: IMSIsotopeDistribution.h:99
abundance_type getAbundance(size_type i) const
Definition: IMSIsotopeDistribution.h:262
size_type size() const
Definition: IMSIsotopeDistribution.h:191
nominal_mass_type getNominalMass() const
Definition: IMSIsotopeDistribution.h:279
bool operator==(const Peak &peak) const
Definition: IMSIsotopeDistribution.h:108
bool empty() const
Definition: IMSIsotopeDistribution.h:317
peaks_container peaks_
Container for isotopes.
Definition: IMSIsotopeDistribution.h:321
peaks_container::iterator peaks_iterator
Type of iterator over container with peaks.
Definition: IMSIsotopeDistribution.h:124
abundances_container::iterator abundances_iterator
Type of iterator over container with isotope abundances.
Definition: IMSIsotopeDistribution.h:145
Peak(mass_type mass=0.0, abundance_type abundance=0.0)
Definition: IMSIsotopeDistribution.h:104
std::ostream & operator<<(std::ostream &os, const IMSAlphabet &alphabet)