IsoSpec
Loading...
Searching...
No Matches
IsoSpec::SingleAtomMarginal< add_guards > Class Template Reference
Inheritance diagram for IsoSpec::SingleAtomMarginal< add_guards >:
IsoSpec::Marginal

Public Member Functions

 SingleAtomMarginal (Marginal &&m, int tabSize=1000, int hashSize=1000)
 Move constructor: specializes the Marginal class.
 SingleAtomMarginal (const SingleAtomMarginal &other)=delete
SingleAtomMarginaloperator= (const SingleAtomMarginal &other)=delete
bool extend (double new_threshold, bool do_sort=true)
 Extend the set of computed subisotopologues to those above the new threshold.
double get_lProb (int idx) const
 get the log-probability of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_lProb.
double get_prob (int idx) const
 get the probability of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_eProb.
double get_mass (int idx) const
 get the mass of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_mass.
const double * get_lProbs_ptr () const
 get the pointer to lProbs array. Accessing index -1 is legal and returns a guardian of -inf. Warning: The pointer gets invalidated on calls to extend()
const Conf & get_conf (int idx) const
 get the counts of isotopes that define the subisotopologue, see details in PrecalculatedMarginal::get_conf.
unsigned int get_no_confs () const
 Get the number of precomputed subisotopologues, see details in PrecalculatedMarginal::get_no_confs.
double get_min_mass () const
 Get the minimal mass in current layer.
double get_max_mass () const
 Get the maximal mass in current layer.
double getModeLProb () const
 Get the log-probability of the mode subisotopologue.
bool probeConfigurationIdx (int idx)
const pod_vector< double > & conf_lprobs () const
const pod_vector< double > & conf_masses () const
int get_original_position (int idx) const
Public Member Functions inherited from IsoSpec::Marginal
 Marginal (const double *_masses, const double *_probs, int _isotopeNo, int _atomCnt)
 Class constructor.
Marginaloperator= (const Marginal &other)=delete
 Marginal (const Marginal &other)
 Copy constructor.
 Marginal (Marginal &&other)
 Move constructor.
virtual ~Marginal ()
 Destructor.
int get_isotopeNo () const
 Get the number of isotopes of the investigated element.
const double * get_lProbs () const
double getLightestConfMass () const
 Get the mass of the lightest subisotopologue.
double getHeaviestConfMass () const
 Get the mass of the heaviest subisotopologue.
double getMonoisotopicConfMass () const
 Get the mass of the monoisotopic subisotopologue.
size_t getMonoisotopicAtomIndex () const
 Get the index of the monoisotopic (most probable) atom.
double getModeMass ()
 The the mass of the mode subisotopologue.
double getModeLProb ()
 Get the log-probability of the mode subisotopologue.
double fastGetModeLProb ()
 Get the log-probability of the mode subisotopologue. Results undefined if ensureModeConf() wasn't called before.
Conf computeModeConf () const
 The the probability of the mode subisotopologue.
double getSmallestLProb () const
 The the log-probability of the lightest subisotopologue.
double getAtomAverageMass () const
 The average mass of a single atom.
double getTheoreticalAverageMass () const
 The theoretical average mass of the molecule.
double variance () const
 Calculate the variance of the theoretical distribution describing the subisotopologue.
double getLogSizeEstimate (double logEllipsoidRadius) const
 Return estimated logarithm of size of the marginal at a given ellipsoid radius.
void ensureModeConf ()

Additional Inherited Members

Protected Member Functions inherited from IsoSpec::Marginal
ISOSPEC_FORCE_INLINE double unnormalized_logProb (Conf conf) const
 Calculate the log-probability of a given subisotopologue.
ISOSPEC_FORCE_INLINE double logProb (Conf conf) const
Protected Attributes inherited from IsoSpec::Marginal
const unsigned int isotopeNo
const unsigned int atomCnt
const double *const atom_lProbs
const double *const atom_masses
const double loggamma_nominator
Conf mode_conf
double mode_lprob

Detailed Description

template<bool add_guards>
class IsoSpec::SingleAtomMarginal< add_guards >

Definition at line 433 of file marginalTrek++.h.

Constructor & Destructor Documentation

◆ SingleAtomMarginal()

template<bool add_guards>
template IsoSpec::SingleAtomMarginal< add_guards >::SingleAtomMarginal ( Marginal && m,
int tabSize = 1000,
int hashSize = 1000 )

Move constructor: specializes the Marginal class.

Definition at line 707 of file marginalTrek++.cpp.

Member Function Documentation

◆ conf_lprobs()

template<bool add_guards>
const pod_vector< double > & IsoSpec::SingleAtomMarginal< add_guards >::conf_lprobs ( ) const
inline

Definition at line 508 of file marginalTrek++.h.

◆ conf_masses()

template<bool add_guards>
const pod_vector< double > & IsoSpec::SingleAtomMarginal< add_guards >::conf_masses ( ) const
inline

Definition at line 509 of file marginalTrek++.h.

◆ extend()

template<bool add_guards>
bool IsoSpec::SingleAtomMarginal< add_guards >::extend ( double new_threshold,
bool do_sort = true )
inline

Extend the set of computed subisotopologues to those above the new threshold.

Parameters
new_thresholdThe new log-probability limiting the subisotopologues from below.
Returns
Returns false, if there are no fringe-subisotopologues (subisotopologues that were neighbours of the previously calculated subisotopologues, with log-probability below the previous threshold).

Definition at line 458 of file marginalTrek++.h.

◆ get_conf()

template<bool add_guards>
const Conf & IsoSpec::SingleAtomMarginal< add_guards >::get_conf ( int idx) const
inline

get the counts of isotopes that define the subisotopologue, see details in PrecalculatedMarginal::get_conf.

Definition at line 483 of file marginalTrek++.h.

◆ get_lProb()

template<bool add_guards>
double IsoSpec::SingleAtomMarginal< add_guards >::get_lProb ( int idx) const
inline

get the log-probability of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_lProb.

Definition at line 471 of file marginalTrek++.h.

◆ get_lProbs_ptr()

template<bool add_guards>
const double * IsoSpec::SingleAtomMarginal< add_guards >::get_lProbs_ptr ( ) const
inline

get the pointer to lProbs array. Accessing index -1 is legal and returns a guardian of -inf. Warning: The pointer gets invalidated on calls to extend()

Definition at line 480 of file marginalTrek++.h.

◆ get_mass()

template<bool add_guards>
double IsoSpec::SingleAtomMarginal< add_guards >::get_mass ( int idx) const
inline

get the mass of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_mass.

Definition at line 477 of file marginalTrek++.h.

◆ get_max_mass()

template<bool add_guards>
double IsoSpec::SingleAtomMarginal< add_guards >::get_max_mass ( ) const
inline

Get the maximal mass in current layer.

Definition at line 496 of file marginalTrek++.h.

◆ get_min_mass()

template<bool add_guards>
double IsoSpec::SingleAtomMarginal< add_guards >::get_min_mass ( ) const
inline

Get the minimal mass in current layer.

Definition at line 493 of file marginalTrek++.h.

◆ get_no_confs()

template<bool add_guards>
unsigned int IsoSpec::SingleAtomMarginal< add_guards >::get_no_confs ( ) const
inline

Get the number of precomputed subisotopologues, see details in PrecalculatedMarginal::get_no_confs.

Definition at line 486 of file marginalTrek++.h.

◆ get_original_position()

template<bool add_guards>
int IsoSpec::SingleAtomMarginal< add_guards >::get_original_position ( int idx) const
inline

Definition at line 511 of file marginalTrek++.h.

◆ get_prob()

template<bool add_guards>
double IsoSpec::SingleAtomMarginal< add_guards >::get_prob ( int idx) const
inline

get the probability of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_eProb.

Definition at line 474 of file marginalTrek++.h.

◆ getModeLProb()

template<bool add_guards>
double IsoSpec::SingleAtomMarginal< add_guards >::getModeLProb ( ) const
inline

Get the log-probability of the mode subisotopologue.

Returns
The log-probability of a/the most probable subisotopologue.

Definition at line 502 of file marginalTrek++.h.

◆ probeConfigurationIdx()

template<bool add_guards>
bool IsoSpec::SingleAtomMarginal< add_guards >::probeConfigurationIdx ( int idx)
inline

Definition at line 504 of file marginalTrek++.h.


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