.TH "IsoSpec::IsoThresholdGenerator" 3 "Version 2.2.1" "IsoSpec" \" -*- nroff -*- .ad l .nh .SH NAME IsoSpec::IsoThresholdGenerator \- The generator of isotopologues above a given threshold value\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBIsoSpec::IsoGenerator\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBIsoThresholdGenerator\fP (const \fBIsoThresholdGenerator\fP &other)=delete" .br .ti -1c .RI "\fBIsoThresholdGenerator\fP & \fBoperator=\fP (const \fBIsoThresholdGenerator\fP &other)=delete" .br .ti -1c .RI "void \fBget_conf_signature\fP (int *space) const override final" .br .RI "Write the signature of configuration into target memory location\&. It must be large enough to accomodate it\&. " .ti -1c .RI "\fBIsoThresholdGenerator\fP (\fBIso\fP &&iso, double _threshold, bool _absolute=true, int _tabSize=1000, int _hashSize=1000, bool reorder_marginals=true)" .br .RI "The move-constructor\&. " .ti -1c .RI "ISOSPEC_FORCE_INLINE bool \fBadvanceToNextConfiguration\fP () override final" .br .RI "Advance to the next, not yet visited, most probable isotopologue\&. " .ti -1c .RI "ISOSPEC_FORCE_INLINE double \fBlprob\fP () const override final" .br .RI "Get the log-probability of the current isotopologue\&. " .ti -1c .RI "ISOSPEC_FORCE_INLINE double \fBmass\fP () const override final" .br .RI "Get the mass of the current isotopologue\&. " .ti -1c .RI "ISOSPEC_FORCE_INLINE double \fBprob\fP () const override final" .br .RI "Get the probability of the current isotopologue\&. " .ti -1c .RI "void \fBterminate_search\fP ()" .br .RI "Block the subsequent search of isotopologues\&. " .ti -1c .RI "void \fBreset\fP ()" .br .ti -1c .RI "size_t \fBcount_confs\fP ()" .br .in -1c Public Member Functions inherited from \fBIsoSpec::IsoGenerator\fP .in +1c .ti -1c .RI "\fBIsoGenerator\fP (\fBIso\fP &&iso, bool alloc_partials=true)" .br .RI "Move constructor\&. " .ti -1c .RI "virtual \fB~IsoGenerator\fP ()" .br .RI "Destructor\&. " .in -1c Public Member Functions inherited from \fBIsoSpec::Iso\fP .in +1c .ti -1c .RI "\fBIso\fP (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *_isotopeMasses, const double *_isotopeProbabilities)" .br .RI "General constructror\&. " .ti -1c .RI "\fBIso\fP (int _dimNumber, const int *_isotopeNumbers, const int *_atomCounts, const double *const *_isotopeMasses, const double *const *_isotopeProbabilities)" .br .ti -1c .RI "\fBIso\fP (const char *formula, bool use_nominal_masses=false)" .br .RI "Constructor from the formula object\&. " .ti -1c .RI "\fBIso\fP (const std::string &formula, bool use_nominal_masses=false)" .br .RI "Constructor from C++ std::string chemical formula\&. " .ti -1c .RI "\fBIso\fP (\fBIso\fP &&other)" .br .RI "The move constructor\&. " .ti -1c .RI "\fBIso\fP & \fBoperator=\fP (const \fBIso\fP &other)=delete" .br .ti -1c .RI "\fBIso\fP (const \fBIso\fP &other, bool fullcopy)" .br .RI "The copy constructor\&. " .ti -1c .RI "virtual \fB~Iso\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "double \fBgetLightestPeakMass\fP () const" .br .RI "Get the mass of the lightest peak in the isotopic distribution\&. " .ti -1c .RI "double \fBgetHeaviestPeakMass\fP () const" .br .RI "Get the mass of the heaviest peak in the isotopic distribution\&. " .ti -1c .RI "double \fBgetMonoisotopicPeakMass\fP () const" .br .ti -1c .RI "double \fBgetModeLProb\fP () const" .br .RI "Get the log-probability of the mode-configuration (if there are many modes, they share this value)\&. " .ti -1c .RI "double \fBgetUnlikeliestPeakLProb\fP () const" .br .RI "Get the logprobability of the least probable subisotopologue\&. " .ti -1c .RI "double \fBgetModeMass\fP () const" .br .RI "Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected)\&. " .ti -1c .RI "double \fBgetTheoreticalAverageMass\fP () const" .br .RI "Get the theoretical average mass of the molecule\&. " .ti -1c .RI "double \fBvariance\fP () const" .br .RI "Get the theoretical variance of the distribution\&. " .ti -1c .RI "double \fBstddev\fP () const" .br .RI "Get the standard deviation of the theoretical distribution\&. " .ti -1c .RI "int \fBgetDimNumber\fP () const" .br .RI "Get the number of elements in the chemical formula of the molecule\&. " .ti -1c .RI "int \fBgetAllDim\fP () const" .br .RI "Get the total number of isotopes of elements present in a chemical formula\&. " .ti -1c .RI "void \fBaddElement\fP (int atomCount, int noIsotopes, const double *isotopeMasses, const double *isotopeProbabilities)" .br .RI "Add an element to the molecule\&. Note: this method can only be used BEFORE \fBIso\fP is used to construct an \fBIsoGenerator\fP instance\&. " .ti -1c .RI "void \fBsaveMarginalLogSizeEstimates\fP (double *priorities, double target_total_prob) const" .br .RI "Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array\&. Array priorities must have length equal to dimNumber\&. " .in -1c .SS "Additional Inherited Members" Static Public Member Functions inherited from \fBIsoSpec::Iso\fP .in +1c .ti -1c .RI "static \fBIso\fP \fBFromFASTA\fP (const char *fasta, bool use_nominal_masses=false, bool add_water=true)" .br .RI "Constructor (named) from aminoacid FASTA sequence as C string\&. " .ti -1c .RI "static \fBIso\fP \fBFromFASTA\fP (const std::string &fasta, bool use_nominal_masses=false, bool add_water=true)" .br .RI "Constructor (named) from aminoacid FASTA sequence as C++ std::string\&. See above for details\&. " .in -1c Public Attributes inherited from \fBIsoSpec::IsoGenerator\fP .in +1c .ti -1c .RI "const double \fBmode_lprob\fP" .br .in -1c Protected Member Functions inherited from \fBIsoSpec::Iso\fP .in +1c .ti -1c .RI "bool \fBdoMarginalsNeedSorting\fP () const" .br .in -1c Protected Attributes inherited from \fBIsoSpec::IsoGenerator\fP .in +1c .ti -1c .RI "double * \fBpartialLProbs\fP" .br .ti -1c .RI "double * \fBpartialMasses\fP" .br .ti -1c .RI "double * \fBpartialProbs\fP" .br .in -1c Protected Attributes inherited from \fBIsoSpec::Iso\fP .in +1c .ti -1c .RI "int \fBdimNumber\fP" .br .ti -1c .RI "int * \fBisotopeNumbers\fP" .br .ti -1c .RI "int * \fBatomCounts\fP" .br .ti -1c .RI "unsigned int \fBconfSize\fP" .br .ti -1c .RI "int \fBallDim\fP" .br .ti -1c .RI "\fBMarginal\fP ** \fBmarginals\fP" .br .in -1c .SH "Detailed Description" .PP The generator of isotopologues above a given threshold value\&. Attention: the calculated configurations are only partially ordeded and the user should not assume they will be ordered\&. This algorithm computes N isotopologues in O(N)\&. It is a considerable advantage w\&.r\&.t\&. the \fBIsoOrderedGenerator\fP\&. .PP Definition at line \fB295\fP of file \fBisoSpec++\&.h\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "IsoSpec::IsoThresholdGenerator::IsoThresholdGenerator (\fBIso\fP && iso, double _threshold, bool _absolute = \fCtrue\fP, int _tabSize = \fC1000\fP, int _hashSize = \fC1000\fP, bool reorder_marginals = \fCtrue\fP)" .PP The move-constructor\&. .PP \fBParameters\fP .RS 4 \fIiso\fP An instance of the \fBIso\fP class\&. .br \fI_threshold\fP The threshold value\&. .br \fI_absolute\fP If true, the _threshold is interpreted as the absolute minimal peak height for the isotopologues\&. If false, the _threshold is the fraction of the heighest peak's probability\&. .br \fItabSize\fP The size of the extension of the table with configurations\&. .br \fIhashSize\fP The size of the hash-table used to store subisotopologues and check if they have been already calculated\&. .RE .PP .PP Definition at line \fB478\fP of file \fBisoSpec++\&.cpp\fP\&. .SS "IsoSpec::IsoThresholdGenerator::~IsoThresholdGenerator ()" .PP Definition at line \fB637\fP of file \fBisoSpec++\&.cpp\fP\&. .SH "Member Function Documentation" .PP .SS "ISOSPEC_FORCE_INLINE bool IsoSpec::IsoThresholdGenerator::advanceToNextConfiguration ()\fC [inline]\fP, \fC [final]\fP, \fC [override]\fP, \fC [virtual]\fP" .PP Advance to the next, not yet visited, most probable isotopologue\&. .PP \fBReturns\fP .RS 4 Return false if it is not possible to advance\&. .RE .PP .PP Implements \fBIsoSpec::IsoGenerator\fP\&. .PP Definition at line \fB352\fP of file \fBisoSpec++\&.h\fP\&. .SS "size_t IsoSpec::IsoThresholdGenerator::count_confs ()" Count the number of configurations in the distribution\&. This can be used to pre-allocate enough memory to store it (e\&.g\&. std::vector's reserve() method - this is faster than depending on the vector's dynamic resizing, even though it means that the configuration space is walked through twice\&. This method has to be called before the first call to advanceToNextConfiguration and has undefined results (incl\&. segfaults) otherwise\&. .PP Definition at line \fB566\fP of file \fBisoSpec++\&.cpp\fP\&. .SS "void IsoSpec::IsoThresholdGenerator::get_conf_signature (int * space) const\fC [inline]\fP, \fC [final]\fP, \fC [override]\fP, \fC [virtual]\fP" .PP Write the signature of configuration into target memory location\&. It must be large enough to accomodate it\&. .PP Implements \fBIsoSpec::IsoGenerator\fP\&. .PP Definition at line \fB315\fP of file \fBisoSpec++\&.h\fP\&. .SS "ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::lprob () const\fC [inline]\fP, \fC [final]\fP, \fC [override]\fP, \fC [virtual]\fP" .PP Get the log-probability of the current isotopologue\&. .PP \fBReturns\fP .RS 4 The log-probability of the current isotopologue\&. .RE .PP .PP Reimplemented from \fBIsoSpec::IsoGenerator\fP\&. .PP Definition at line \fB391\fP of file \fBisoSpec++\&.h\fP\&. .SS "ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::mass () const\fC [inline]\fP, \fC [final]\fP, \fC [override]\fP, \fC [virtual]\fP" .PP Get the mass of the current isotopologue\&. .PP \fBReturns\fP .RS 4 The mass of the current isotopologue\&. .RE .PP .PP Reimplemented from \fBIsoSpec::IsoGenerator\fP\&. .PP Definition at line \fB392\fP of file \fBisoSpec++\&.h\fP\&. .SS "ISOSPEC_FORCE_INLINE double IsoSpec::IsoThresholdGenerator::prob () const\fC [inline]\fP, \fC [final]\fP, \fC [override]\fP, \fC [virtual]\fP" .PP Get the probability of the current isotopologue\&. .PP \fBReturns\fP .RS 4 The probability of the current isotopologue\&. .RE .PP .PP Reimplemented from \fBIsoSpec::IsoGenerator\fP\&. .PP Definition at line \fB393\fP of file \fBisoSpec++\&.h\fP\&. .SS "void IsoSpec::IsoThresholdGenerator::reset ()" Reset the generator to the beginning of the sequence\&. Allows it to be reused, eg\&. to go through the conf space once, calculate the amount of space needed to store configurations, then to allocate that memory, and go through it again, this time saving configurations (and \fIis\fP in fact faster than allocating a std::vector and depending on it to grow as needed\&. This is cheaper than throwing away the generator and making a new one too: marginal distributions don't need to be recalculated\&. .PP Definition at line \fB620\fP of file \fBisoSpec++\&.cpp\fP\&. .SS "void IsoSpec::IsoThresholdGenerator::terminate_search ()" .PP Block the subsequent search of isotopologues\&. .PP Definition at line \fB555\fP of file \fBisoSpec++\&.cpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for IsoSpec from the source code\&.