36 #ifndef OPENMS_CHEMISTRY_MASSDECOMPOSITION_IMS_WEIGHTS_H 37 #define OPENMS_CHEMISTRY_MASSDECOMPOSITION_IMS_WEIGHTS_H 42 #include <OpenMS/config.h> 95 Weights(
const alphabet_masses_type & masses, alphabet_mass_type precision) :
96 alphabet_masses_(masses),
99 setPrecision(precision);
108 alphabet_masses_(other.alphabet_masses_),
109 precision_(other.precision_),
110 weights_(other.weights_) {}
127 return weights_.size();
146 void setPrecision(alphabet_mass_type precision);
178 return weights_.back();
189 return alphabet_masses_[i];
195 alphabet_mass_type getParentMass(
const std::vector<unsigned int> & decomposition)
const;
203 void swap(size_type index1, size_type index2);
219 alphabet_mass_type getMinRoundingError()
const;
221 alphabet_mass_type getMaxRoundingError()
const;
245 OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
const Weights & weights);
250 #endif // OPENMS_CHEMISTRY_MASSDECOMPOSITION_IMS_WEIGHTS_H alphabet_mass_type precision_
Definition: Weights.h:231
Weights(const alphabet_masses_type &masses, alphabet_mass_type precision)
Definition: Weights.h:95
std::vector< weight_type > weights_type
Type of container to store integer values.
Definition: Weights.h:78
Weights(const Weights &other)
Definition: Weights.h:107
Represents a set of weights (double values and scaled with a certain precision their integer counterp...
Definition: Weights.h:68
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
weight_type back() const
Definition: Weights.h:176
Weights()
Empty constructor.
Definition: Weights.h:87
alphabet_masses_type alphabet_masses_
Definition: Weights.h:226
double alphabet_mass_type
Type of double values to be used.
Definition: Weights.h:75
weight_type getWeight(size_type i) const
Definition: Weights.h:136
long unsigned int weight_type
Type of integer values to be used.
Definition: Weights.h:72
weights_type weights_
Definition: Weights.h:236
alphabet_mass_type getAlphabetMass(size_type i) const
Definition: Weights.h:187
weight_type operator[](size_type i) const
Definition: Weights.h:166
size_type size() const
Definition: Weights.h:125
weights_type::size_type size_type
Type of container's size.
Definition: Weights.h:84
std::vector< alphabet_mass_type > alphabet_masses_type
Type of container to store double values.
Definition: Weights.h:81
alphabet_mass_type getPrecision() const
Definition: Weights.h:153
std::ostream & operator<<(std::ostream &os, const IMSAlphabet &alphabet)