OpenMS

Generate the stream of configurations, ordered from most likely to least likely. More...
#include <OpenMS/CHEMISTRY/ISOTOPEDISTRIBUTION/IsoSpecWrapper.h>
Public Member Functions  
IsoSpecOrderedGeneratorWrapper (const std::vector< int > &isotopeNumbers, const std::vector< int > &atomCounts, const std::vector< std::vector< double > > &isotopeMasses, const std::vector< std::vector< double > > &isotopeProbabilities)  
Constructor. More...  
IsoSpecOrderedGeneratorWrapper (const IsoSpecOrderedGeneratorWrapper &)=delete  
IsoSpecOrderedGeneratorWrapper (const EmpiricalFormula &formula)  
Setup the algorithm to run on an EmpiricalFormula. More...  
~IsoSpecOrderedGeneratorWrapper ()  
bool  nextConf () final 
Move the generator to a next isotopologue. More...  
Peak1D  getConf () final 
Obtain the current isotopologue. More...  
double  getMass () final 
Obtain the mass of the current isotopologue. More...  
double  getIntensity () final 
Obtain the intensity (probability, relative peak height) of the current configuration. More...  
double  getLogIntensity () final 
Obtain the natural logarithm of the intensity (probability, relative peak height) of the current configuration. More...  
Public Member Functions inherited from IsoSpecGeneratorWrapper  
virtual  ~IsoSpecGeneratorWrapper ()=default 
Destructor. More...  
Protected Attributes  
std::unique_ptr< IsoSpec::IsoOrderedGenerator >  IOG 
Generate the stream of configurations, ordered from most likely to least likely.
This generator walks through the entire set of isotopologues of a given molecule, allowing the user to terminate the search on the fly. The returned isotopologues are guaranteed to be generated in order of descending probability (unlike IsoSpecThresholdGeneratorWrapper and IsoSpecTotalProbGeneratorWrapper which make no such guarantees).
This causes the algorithm to run in O(n*log(n))
and means that is it much slower than the previous two classes IsoSpecThresholdGeneratorWrapper and IsoSpecTotalProbGeneratorWrapper.
You should only use this generator if you don't know upfront when to stop the walk through the configuration space, and need to make the decision on the fly. If you know the threshold or the total probability needed, and only need the configurations sorted, it will be much faster to generate them using one of the previous algorithms and sort them afterwards.
IsoSpecOrderedGeneratorWrapper  (  const std::vector< int > &  isotopeNumbers, 
const std::vector< int > &  atomCounts,  
const std::vector< std::vector< double > > &  isotopeMasses,  
const std::vector< std::vector< double > > &  isotopeProbabilities  
) 
Constructor.
isotopeNumbers  A vector of how many isotopes each element has, e.g. [2, 2, 3]) 
atomCounts  How many atoms of each we have [e.g. 12, 6, 6 for Glucose] 
isotopeMasses  Array with the individual elements isotopic masses 
isotopeProbabilities  Array with the individual elements isotopic probabilities 

delete 
IsoSpecOrderedGeneratorWrapper  (  const EmpiricalFormula &  formula  ) 
Setup the algorithm to run on an EmpiricalFormula.

inlinefinalvirtual 
Obtain the current isotopologue.
Implements IsoSpecGeneratorWrapper.

inlinefinalvirtual 
Obtain the intensity (probability, relative peak height) of the current configuration.
Implements IsoSpecGeneratorWrapper.

inlinefinalvirtual 
Obtain the natural logarithm of the intensity (probability, relative peak height) of the current configuration.
This will be more precise (and faster) than just calling std::log(getIntensity())  it will produce correct results even for configurations so unlikely that the doubleprecision floating point number returned from getIntensity() underflows to zero.
Implements IsoSpecGeneratorWrapper.

inlinefinalvirtual 
Obtain the mass of the current isotopologue.
Implements IsoSpecGeneratorWrapper.

inlinefinalvirtual 
Move the generator to a next isotopologue.
Advance the internal generator to the next isotopologue. The value returned determines whether the generator has been exhausted (that is, all eligible configurations have already been visited). It is invalid to call any other generator methods before the first call to nextConf(), as well as after this method returns false.
Implements IsoSpecGeneratorWrapper.

protected 