IsoSpec  1.95
Public Member Functions | List of all members
IsoSpec::IsoOrderedGenerator Class Reference

The generator of isotopologues sorted by their probability of occurrence. More...

#include <isoSpec++.h>

Inheritance diagram for IsoSpec::IsoOrderedGenerator:
IsoSpec::IsoGenerator IsoSpec::Iso

Public Member Functions

bool advanceToNextConfiguration () override final
 Advance to the next, not yet visited, most probable isotopologue. More...
 
void get_conf_signature (int *space) const override final
 Save the counts of isotopes in the space. More...
 
 IsoOrderedGenerator (Iso &&iso, int _tabSize=1000, int _hashSize=1000)
 The move-contstructor.
 
virtual ~IsoOrderedGenerator ()
 Destructor.
 
- Public Member Functions inherited from IsoSpec::IsoGenerator
virtual double lprob () const
 Get the log-probability of the current isotopologue. More...
 
virtual double mass () const
 Get the mass of the current isotopologue. More...
 
virtual double prob () const
 Get the probability of the current isotopologue. More...
 
 IsoGenerator (Iso &&iso, bool alloc_partials=true)
 Move constructor.
 
virtual ~IsoGenerator ()
 Destructor.
 
- Public Member Functions inherited from IsoSpec::Iso
 Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities)
 General constructror. More...
 
 Iso (const char *formula)
 Constructor from the formula object.
 
 Iso (Iso &&other)
 The move constructor.
 
 Iso (const Iso &other, bool fullcopy)
 The copy constructor. More...
 
virtual ~Iso ()
 Destructor.
 
double getLightestPeakMass () const
 Get the mass of the lightest peak in the isotopic distribution.
 
double getHeaviestPeakMass () const
 Get the mass of the heaviest peak in the isotopic distribution.
 
double getModeLProb () const
 Get the log-probability of the mode-configuration (if there are many modes, they share this value).
 
int getDimNumber () const
 Get the number of elements in the chemical formula of the molecule.
 
int getAllDim () const
 Get the total number of isotopes of elements present in a chemical formula.
 

Additional Inherited Members

- Public Attributes inherited from IsoSpec::Iso
bool disowned
 
- Protected Attributes inherited from IsoSpec::IsoGenerator
double * partialLProbs
 
double * partialMasses
 
double * partialProbs
 
- Protected Attributes inherited from IsoSpec::Iso
int dimNumber
 
int * isotopeNumbers
 
int * atomCounts
 
unsigned int confSize
 
int allDim
 
Marginal ** marginals
 
double modeLProb
 

Detailed Description

The generator of isotopologues sorted by their probability of occurrence.

The subsequent isotopologues are generated with diminishing probability, starting from the mode. This algorithm take O(N*log(N)) to compute the N isotopologues because of using the Priority Queue data structure. Obtaining the N isotopologues can be achieved in O(N) if they are not required to be spit out in the descending order.

Definition at line 179 of file isoSpec++.h.

Member Function Documentation

◆ advanceToNextConfiguration()

bool IsoSpec::IsoOrderedGenerator::advanceToNextConfiguration ( )
finaloverridevirtual

Advance to the next, not yet visited, most probable isotopologue.

Returns
Return false if it is not possible to advance.

Implements IsoSpec::IsoGenerator.

Definition at line 486 of file isoSpec++.cpp.

◆ get_conf_signature()

void IsoSpec::IsoOrderedGenerator::get_conf_signature ( int *  space) const
inlinefinaloverridevirtual

Save the counts of isotopes in the space.

Parameters
spaceAn array where counts of isotopes shall be written. Must be as big as the overall number of isotopes.

Implements IsoSpec::IsoGenerator.

Definition at line 202 of file isoSpec++.h.


The documentation for this class was generated from the following files: