|  | OpenMS
    2.6.0
    | 
#include <OpenMS/CHEMISTRY/ISOTOPEDISTRIBUTION/IsotopeDistribution.h>
| Public Types | |
| typedefs | |
| enum | Sorted { INTENSITY, MASS, UNDEFINED } | 
| typedef Peak1D | MassAbundance | 
| container type, first holds the weight of the isotope, second the probability  More... | |
| typedef std::vector< MassAbundance > | ContainerType | 
| typedef ContainerType::iterator | iterator | 
| typedef ContainerType::iterator | Iterator | 
| typedef ContainerType::const_iterator | const_iterator | 
| typedef ContainerType::const_iterator | ConstIterator | 
| typedef ContainerType::reverse_iterator | reverse_iterator | 
| typedef ContainerType::reverse_iterator | ReverseIterator | 
| typedef ContainerType::const_reverse_iterator | const_reverse_iterator | 
| typedef ContainerType::const_reverse_iterator | ConstReverseIterator | 
| Public Member Functions | |
| Constructors and Destructors | |
| IsotopeDistribution () | |
| IsotopeDistribution (const IsotopeDistribution &)=default | |
| Copy constructor.  More... | |
| IsotopeDistribution (IsotopeDistribution &&) noexcept=default | |
| Move constructor.  More... | |
| virtual | ~IsotopeDistribution ()=default | 
| Destructor.  More... | |
| Accessors | |
| void | set (const ContainerType &distribution) | 
| overwrites the container which holds the distribution using distributionMore... | |
| void | set (ContainerType &&distribution) | 
| overwrites the container which holds the distribution using distributionMore... | |
| const ContainerType & | getContainer () const | 
| returns the container which holds the distribution  More... | |
| Peak1D::CoordinateType | getMax () const | 
| returns the isotope with the largest m/z  More... | |
| Peak1D::CoordinateType | getMin () const | 
| returns the isotope with the smallest m/z  More... | |
| Peak1D | getMostAbundant () const | 
| returns the most abundant isotope which is stored in the distribution  More... | |
| Size | size () const | 
| returns the size of the distribution which is the number of isotopes in the distribution  More... | |
| void | clear () | 
| clears the distribution  More... | |
| void | resize (UInt size) | 
| void | trimIntensities (double cutoff) | 
| remove intensities below the cutoff  More... | |
| void | sortByIntensity () | 
| sort isotope distribution by intensity  More... | |
| void | sortByMass () | 
| sort isotope distribution by mass  More... | |
| void | renormalize () | 
| Re-normalizes the sum of the probabilities of all the isotopes to 1.  More... | |
| void | merge (double resolution, double min_prob) | 
| Merges distributions of arbitrary data points with constant defined resolution.  More... | |
| void | trimRight (double cutoff) | 
| Trims the right side of the isotope distribution to isotopes with a significant contribution.  More... | |
| void | trimLeft (double cutoff) | 
| Trims the left side of the isotope distribution to isotopes with a significant contribution.  More... | |
| double | averageMass () const | 
| Compute average mass of isotope distribution (weighted average of all isotopes)  More... | |
| Operators | |
| IsotopeDistribution & | operator= (const IsotopeDistribution &isotope_distribution) | 
| Assignment operator.  More... | |
| bool | operator== (const IsotopeDistribution &isotope_distribution) const | 
| equality operator, returns true if the isotope_distributionis identical to this, false else  More... | |
| bool | operator!= (const IsotopeDistribution &isotope_distribution) const | 
| inequality operator, returns true if the isotope_distributiondiffers from this, false else  More... | |
| bool | operator< (const IsotopeDistribution &isotope_distribution) const | 
| less operator  More... | |
| Iterators | |
| Iterator | begin () | 
| Iterator | end () | 
| ConstIterator | begin () const | 
| ConstIterator | end () const | 
| ReverseIterator | rbegin () | 
| ReverseIterator | rend () | 
| ConstReverseIterator | rbegin () const | 
| ConstReverseIterator | rend () const | 
| void | insert (const Peak1D::CoordinateType &mass, const Peak1D::IntensityType &intensity) | 
| Data Access Operators | |
| ContainerType | distribution_ | 
| stores the isotope distribution  More... | |
| Peak1D & | operator[] (const Size &index) | 
| operator to access a cell of the distribution and wraps it in SpectrumFragment struct  More... | |
| const Peak1D & | operator[] (const Size &index) const | 
| const operator to access a cell of the distribution and wraps it in SpectrumFragment struct  More... | |
| void | sort_ (std::function< bool(const MassAbundance &p1, const MassAbundance &p2)> sorter) | 
| sort wrapper of the distribution  More... | |
| void | transform_ (std::function< void(MassAbundance &)> lambda) | 
| takes a function as a parameter to transform the distribution  More... | |
| typedef ContainerType::const_iterator const_iterator | 
| typedef ContainerType::const_reverse_iterator const_reverse_iterator | 
| typedef ContainerType::const_iterator ConstIterator | 
| typedef ContainerType::const_reverse_iterator ConstReverseIterator | 
| typedef std::vector<MassAbundance> ContainerType | 
| typedef ContainerType::iterator iterator | 
| typedef ContainerType::iterator Iterator | 
| typedef Peak1D MassAbundance | 
container type, first holds the weight of the isotope, second the probability
| typedef ContainerType::reverse_iterator reverse_iterator | 
| typedef ContainerType::reverse_iterator ReverseIterator | 
| enum Sorted | 
Default constructor
| 
 | default | 
Copy constructor.
| 
 | defaultnoexcept | 
Move constructor.
| 
 | virtualdefault | 
Destructor.
| double averageMass | ( | ) | const | 
Compute average mass of isotope distribution (weighted average of all isotopes)
| 
 | inline | 
References IsotopeDistribution::begin().
Referenced by IsotopeDistribution::begin().
| 
 | inline | 
| void clear | ( | ) | 
clears the distribution
| 
 | inline | 
| 
 | inline | 
| const ContainerType& getContainer | ( | ) | const | 
returns the container which holds the distribution
| Peak1D::CoordinateType getMax | ( | ) | const | 
returns the isotope with the largest m/z
| Peak1D::CoordinateType getMin | ( | ) | const | 
returns the isotope with the smallest m/z
| Peak1D getMostAbundant | ( | ) | const | 
returns the most abundant isotope which is stored in the distribution
| 
 | inline | 
Merges distributions of arbitrary data points with constant defined resolution.
It creates a new IsotopeDistribution Container and assigns each isotope to the nearest bin. This function should be used to downsample the existing distribution. If the size of the new Container is larger this function throws an IllegalArgument Exception.
| bool operator!= | ( | const IsotopeDistribution & | isotope_distribution | ) | const | 
inequality operator, returns true if the isotope_distribution differs from this, false else 
| bool operator< | ( | const IsotopeDistribution & | isotope_distribution | ) | const | 
less operator
| IsotopeDistribution& operator= | ( | const IsotopeDistribution & | isotope_distribution | ) | 
Assignment operator.
| bool operator== | ( | const IsotopeDistribution & | isotope_distribution | ) | const | 
equality operator, returns true if the isotope_distribution is identical to this, false else 
operator to access a cell of the distribution and wraps it in SpectrumFragment struct
const operator to access a cell of the distribution and wraps it in SpectrumFragment struct
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| void renormalize | ( | ) | 
Re-normalizes the sum of the probabilities of all the isotopes to 1.
The re-normalisation may be needed as in some distributions with a lot of isotopes the calculations tend to be inexact.
| void resize | ( | UInt | size | ) | 
| void set | ( | const ContainerType & | distribution | ) | 
overwrites the container which holds the distribution using distribution 
| void set | ( | ContainerType && | distribution | ) | 
overwrites the container which holds the distribution using distribution 
| Size size | ( | ) | const | 
returns the size of the distribution which is the number of isotopes in the distribution
| 
 | protected | 
sort wrapper of the distribution
| void sortByIntensity | ( | ) | 
sort isotope distribution by intensity
| void sortByMass | ( | ) | 
sort isotope distribution by mass
| 
 | protected | 
takes a function as a parameter to transform the distribution
| void trimIntensities | ( | double | cutoff | ) | 
remove intensities below the cutoff
| void trimLeft | ( | double | cutoff | ) | 
Trims the left side of the isotope distribution to isotopes with a significant contribution.
If the isotope distribution is calculated for large masses, it might happen that many entries contain only small numbers. This function can be used to remove these entries.
| void trimRight | ( | double | cutoff | ) | 
Trims the right side of the isotope distribution to isotopes with a significant contribution.
If the isotope distribution is calculated for large masses, it might happen that many entries contain only small numbers. This function can be used to remove these entries.
| 
 | protected | 
stores the isotope distribution
 1.8.16
 1.8.16