IsoSpec::I...dGenerator(3)

πŸ“¦
version 2.2.1 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

IsoSpec::IsoOrderedGenerator β€” the generator of isotopologues sorted by their probability of occurrence. That's it, that's the whole assignment, and she ate πŸ’…

(Also hi bestie, this is from the Library Functions Manual, section 3, so you know we're in the C++ library girlies zone ✨)


✨ SYNOPSIS ✨

#include <isoSpec++.h>

Inherits IsoSpec::IsoGenerator. Yes she comes from a whole family, no cap 🫢

πŸŽ€ Public Member Functions

  • IsoOrderedGenerator (const IsoOrderedGenerator &other)=delete β€” marked =delete, so copying is just not on the table, periodt.
  • IsoOrderedGenerator & operator= (const IsoOrderedGenerator &other)=delete β€” also =delete, no assignment happening either, we don't do that here πŸ™ˆ
  • bool advanceToNextConfiguration () override final β€” advance to the next, not yet visited, most probable isotopologue. She's override final, so nobody's overriding her.
  • void get_conf_signature (int *space) const override final β€” save the counts of isotopes in the space.
  • IsoOrderedGenerator (Iso &&iso, int _tabSize=1000, int _hashSize=1000) β€” the move-contstructor. Defaults are 1000 and 1000, keep 'em in your back pocket.
  • virtual ~IsoOrderedGenerator () β€” destructor. Say bye bye, she's virtual.

🌸 Public Member Functions inherited from IsoSpec::IsoGenerator

  • virtual double lprob () const β€” get the log-probability of the current isotopologue.
  • virtual double mass () const β€” get the mass of the current isotopologue.
  • virtual double prob () const β€” get the probability of the current isotopologue.
  • IsoGenerator (Iso &&iso, bool alloc_partials=true) β€” move constructor. alloc_partials defaults to true.
  • virtual ~IsoGenerator () β€” destructor.

πŸ¦‹ Public Member Functions inherited from IsoSpec::Iso

  • Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities) β€” general constructror.
  • Iso (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities) β€” the const-const-flavoured sibling of the one above.
  • Iso (const char *formula, bool use_nominal_masses=false) β€” constructor from the formula object. use_nominal_masses defaults to false.
  • Iso (const std::string &formula, bool use_nominal_masses=false) β€” constructor from a C++ std::string chemical formula. Same default, false.
  • Iso (Iso &&other) β€” the move constructor.
  • Iso & operator= (const Iso &other)=delete β€” deleted, so no assigning.
  • Iso (const Iso &other, bool fullcopy) β€” the copy constructor. Note fullcopy, she takes a bool.
  • 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 getMonoisotopicPeakMass () const β€” monoisotopic peak mass, iconic behaviour, no notes.
  • double getModeLProb () const β€” get the log-probability of the mode-configuration (if there are many modes, they share this value).
  • double getUnlikeliestPeakLProb () const β€” get the logprobability of the least probable subisotopologue. (Yes, "logprobability", one word, that's how she wrote it πŸ’€)
  • double getModeMass () const β€” get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected). Lowkey chaotic, but that's the documented behaviour fr fr.
  • double getTheoreticalAverageMass () const β€” get the theoretical average mass of the molecule.
  • double variance () const β€” get the theoretical variance of the distribution.
  • double stddev () const β€” get the standard deviation of the theoretical distribution.
  • 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.
  • 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. Do not test her, she will not test you πŸ’€
  • void saveMarginalLogSizeEstimates (double *priorities, double target_total_prob) const β€” save estimates of logarithms of target sizes of marginals using Gaussian approximation into the argument array. Array priorities must have length equal to dimNumber. Size matters, bestie, she said it not me.

🌈 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 an aminoacid FASTA sequence as a C string. Defaults: use_nominal_masses=false, add_water=true.
  • static Iso FromFASTA (const std::string &fasta, bool use_nominal_masses=false, bool add_water=true) β€” constructor (named) from an aminoacid FASTA sequence as a C++ std::string. See above for details β€” same energy, different string type πŸ’…

πŸ‘‘ Public Attributes inherited from IsoSpec::IsoGenerator

  • const double mode_lprob β€” she's const, she's a double, she's a public attribute, and she's not taking questions.

🧚 Protected Member Functions inherited from IsoSpec::Iso

  • bool doMarginalsNeedSorting () const β€” a protected member function, so it's giving iykyk.

πŸ’œ 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

🌸 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.

So: sorted output costs you O(N*log(N)), and the O(N) glow-up only happens if you don't need them spit out in descending order. Trade-offs, bestie, always trade-offs ✨

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


πŸŽ€ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸŽ€

IsoSpec::IsoOrderedGenerator::IsoOrderedGenerator (Iso && iso, int _tabSize = 1000, int _hashSize = 1000)

The move-contstructor.

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

IsoSpec::IsoOrderedGenerator::~IsoOrderedGenerator () [virtual]

Destructor. Virtual, as she should be πŸ‘‘

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


πŸ”₯ MEMBER FUNCTION DOCUMENTATION πŸ”₯

bool IsoSpec::IsoOrderedGenerator::advanceToNextConfiguration () [final], [override], [virtual]

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

Returns

Return false if it is not possible to advance. (So like, when she's out of isotopologues, she'll tell you false and you move on, respectfully 😭)

Implements IsoSpec::IsoGenerator.

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

void IsoSpec::IsoOrderedGenerator::get_conf_signature (int * space) const [inline], [final], [override], [virtual]

Save the counts of isotopes in the space.

Parameters

space β€” an array where counts of isotopes shall be written. Must be as big as the overall number of isotopes. Do not shortchange her on the array size, that's the whole rule 🫢

Implements IsoSpec::IsoGenerator.

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


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for IsoSpec from the source code. (So don't @ me about the prose, @ the code generator πŸŽ€)


Okay that's the whole page bestie, you're so welcome πŸ’– This was IsoSpec, Version 2.2.1, straight from the source code to you, slay, periodt βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from