122 elements_(alphabet.elements_)
132 return elements_.size();
144 return elements_[index];
157 void setElement(
const name_type & name, mass_type mass,
bool forced =
false);
165 bool erase(
const name_type & name);
175 const element_type & getElement(
const name_type & name)
const;
183 const name_type & getName(size_type index)
const;
194 mass_type getMass(
const name_type & name)
const;
203 mass_type getMass(size_type index)
const;
211 masses_type getMasses(size_type isotope_index = 0)
const;
218 masses_type getAverageMasses()
const;
227 bool hasName(
const name_type & name)
const;
250 elements_.push_back(element);
266 virtual void sortByNames();
274 virtual void sortByValues();
286 virtual void load(
const std::string & fname);
336 OPENMS_DLLAPI std::ostream &
operator<<(std::ostream & os,
const IMSAlphabet & alphabet);
std::vector< name_type > name_container
Definition: IMSAlphabet.h:92
size_type size() const
Definition: IMSAlphabet.h:130
void clear()
Definition: IMSAlphabet.h:256
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
container::size_type size_type
Definition: IMSAlphabet.h:89
virtual ~IMSAlphabet()
Definition: IMSAlphabet.h:306
element_type::name_type name_type
Definition: IMSAlphabet.h:87
container elements_
Definition: IMSAlphabet.h:312
mass_container::const_iterator const_mass_iterator
Definition: IMSAlphabet.h:97
void push_back(const name_type &name, mass_type value)
Definition: IMSAlphabet.h:238
Represents a chemical atom with name and isotope distribution.
Definition: IMSElement.h:58
IMSAlphabet(const container &elements)
Definition: IMSAlphabet.h:111
IMSElement element_type
Definition: IMSAlphabet.h:85
mass_container::iterator mass_iterator
Definition: IMSAlphabet.h:96
name_container::iterator name_iterator
Definition: IMSAlphabet.h:93
mass_type getMass(size_type index=0) const
Definition: IMSElement.h:172
Private class-functor to sort out elements in mass ascending order.
Definition: IMSAlphabet.h:317
IMSAlphabet()
Definition: IMSAlphabet.h:103
std::vector< mass_type > masses_type
Definition: IMSAlphabet.h:98
name_container::const_iterator const_name_iterator
Definition: IMSAlphabet.h:94
std::vector< mass_type > mass_container
Definition: IMSAlphabet.h:95
element_type::mass_type mass_type
Definition: IMSAlphabet.h:86
container::iterator iterator
Definition: IMSAlphabet.h:90
IMSAlphabet(const IMSAlphabet &alphabet)
Definition: IMSAlphabet.h:121
Holds an indexed list of bio-chemical elements.
Definition: IMSAlphabet.h:81
container::const_iterator const_iterator
Definition: IMSAlphabet.h:91
std::string name_type
Type of element's name.
Definition: IMSElement.h:62
bool operator()(const element_type &el1, const element_type &el2) const
Definition: IMSAlphabet.h:320
std::vector< element_type > container
Definition: IMSAlphabet.h:88
const element_type & getElement(size_type index) const
Definition: IMSAlphabet.h:142
void push_back(const element_type &element)
Definition: IMSAlphabet.h:248
std::ostream & operator<<(std::ostream &os, const IMSAlphabet &alphabet)