![]() |
IsoSpec 2.2.1
|
The generator of isotopologues sorted by their probability of occurrence. More...
#include <isoSpec++.h>
Public Member Functions | |
| IsoOrderedGenerator (const IsoOrderedGenerator &other)=delete | |
| IsoOrderedGenerator & | operator= (const IsoOrderedGenerator &other)=delete |
| 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. More... | |
| virtual | ~IsoOrderedGenerator () |
| Destructor. More... | |
Public Member Functions inherited from IsoSpec::IsoGenerator | |
| virtual bool | advanceToNextConfiguration ()=0 |
| Advance to the next, not yet visited, most probable isotopologue. More... | |
| 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... | |
| virtual void | get_conf_signature (int *space) const =0 |
| Write the signature of configuration into target memory location. It must be large enough to accomodate it. More... | |
| IsoGenerator (Iso &&iso, bool alloc_partials=true) | |
| Move constructor. More... | |
| virtual | ~IsoGenerator () |
| Destructor. More... | |
Public Member Functions inherited from IsoSpec::Iso | |
| Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities) | |
| General constructror. More... | |
| Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities) | |
| Iso (const char *formula, bool use_nominal_masses=false) | |
| Constructor from the formula object. More... | |
| Iso (const std::string &formula, bool use_nominal_masses=false) | |
| Constructor from C++ std::string chemical formula. More... | |
| Iso (Iso &&other) | |
| The move constructor. More... | |
| Iso & | operator= (const Iso &other)=delete |
| Iso (const Iso &other, bool fullcopy) | |
| The copy constructor. More... | |
| virtual | ~Iso () |
| Destructor. More... | |
| double | getLightestPeakMass () const |
| Get the mass of the lightest peak in the isotopic distribution. More... | |
| double | getHeaviestPeakMass () const |
| Get the mass of the heaviest peak in the isotopic distribution. More... | |
| double | getMonoisotopicPeakMass () const |
| double | getModeLProb () const |
| Get the log-probability of the mode-configuration (if there are many modes, they share this value). More... | |
| double | getUnlikeliestPeakLProb () const |
| Get the logprobability of the least probable subisotopologue. More... | |
| double | getModeMass () const |
| Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected). More... | |
| double | getTheoreticalAverageMass () const |
| Get the theoretical average mass of the molecule. More... | |
| double | variance () const |
| Get the theoretical variance of the distribution. More... | |
| double | stddev () const |
| Get the standard deviation of the theoretical distribution. More... | |
| int | getDimNumber () const |
| Get the number of elements in the chemical formula of the molecule. More... | |
| int | getAllDim () const |
| Get the total number of isotopes of elements present in a chemical formula. More... | |
| void | addElement (int atomCount, int noIsotopes, const double *isotopeMasses, const double *isotopeProbabilities) |
| Add an element to the molecule. Note: this method can only be used BEFORE Iso is used to construct an IsoGenerator instance. More... | |
| void | saveMarginalLogSizeEstimates (double *priorities, double target_total_prob) const |
| Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array. Array priorities must have length equal to dimNumber. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IsoSpec::Iso | |
| static Iso | FromFASTA (const char *fasta, bool use_nominal_masses=false, bool add_water=true) |
| Constructor (named) from aminoacid FASTA sequence as C string. More... | |
| static Iso | FromFASTA (const std::string &fasta, bool use_nominal_masses=false, bool add_water=true) |
| Constructor (named) from aminoacid FASTA sequence as C++ std::string. See above for details. More... | |
Public Attributes inherited from IsoSpec::IsoGenerator | |
| const double | mode_lprob |
Protected Member Functions inherited from IsoSpec::Iso | |
| bool | doMarginalsNeedSorting () const |
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 |
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 236 of file isoSpec++.h.
| IsoSpec::IsoOrderedGenerator::IsoOrderedGenerator | ( | Iso && | iso, |
| int | _tabSize = 1000, |
||
| int | _hashSize = 1000 |
||
| ) |
The move-contstructor.
Definition at line 814 of file isoSpec++.cpp.
|
virtual |
Destructor.
Definition at line 855 of file isoSpec++.cpp.
|
finaloverridevirtual |
Advance to the next, not yet visited, most probable isotopologue.
Implements IsoSpec::IsoGenerator.
Definition at line 867 of file isoSpec++.cpp.
|
inlinefinaloverridevirtual |
Save the counts of isotopes in the space.
| space | An array where counts of isotopes shall be written. Must be as big as the overall number of isotopes. |
Implements IsoSpec::IsoGenerator.
Definition at line 262 of file isoSpec++.h.