![]() |
IsoSpec
1.95
|
The marginal distribution class (a subisotopologue). More...
#include <marginalTrek++.h>
Public Member Functions | |
Marginal (const double *_masses, const double *_probs, int _isotopeNo, int _atomCnt) | |
Class constructor. More... | |
Marginal (Marginal &other)=delete | |
Marginal & | operator= (const Marginal &other)=delete |
Marginal (Marginal &&other) | |
Move constructor. | |
virtual | ~Marginal () |
Destructor. | |
int | get_isotopeNo () const |
Get the number of isotopes of the investigated element. More... | |
double | getLightestConfMass () const |
Get the mass of the lightest subisotopologue. More... | |
double | getHeaviestConfMass () const |
Get the mass of the heaviest subisotopologue. More... | |
double | getModeLProb () const |
Get the log-probability of the mode subisotopologue. More... | |
double | getModeMass () const |
The the mass of the mode subisotopologue. More... | |
double | getModeProb () const |
The the probability of the mode subisotopologue. More... | |
double | getSmallestLProb () const |
The the log-probability of the lightest subisotopologue. More... | |
double | logProb (Conf conf) const |
Calculate the log-probability of a given subisotopologue. More... | |
Protected Attributes | |
const unsigned int | isotopeNo |
const unsigned int | atomCnt |
const double *const | atom_masses |
const double *const | atom_lProbs |
const double | loggamma_nominator |
const Conf | mode_conf |
const double | mode_lprob |
const double | mode_mass |
const double | mode_prob |
const double | smallest_lprob |
The marginal distribution class (a subisotopologue).
This class mostly provides some basic common API for subclasses, but itself is not abstract. This class represents the probability distribution generated by one element only – a subisotopologue. For instance, it might be the distribution of C200, that might be part of, say, C200H402. It corresponds to the multinomial distribution, where each configuration can also be attributed a precise mass. The constructor method perform initial hill-climbing to find the most probable sub-isotopologue (the mode).
Definition at line 45 of file marginalTrek++.h.
IsoSpec::Marginal::Marginal | ( | const double * | _masses, |
const double * | _probs, | ||
int | _isotopeNo, | ||
int | _atomCnt | ||
) |
Class constructor.
_masses | A table of masses of the stable isotopes of the investigated element, e.g. for C10 it is 2: C12 and C13. |
_probs | A table of natural frequencies of the stable isotopes of the investigated element, see IUPAC at https://iupac.org/isotopesmatter/ |
_isotopeNo | Number of isotopes of a given element. |
_atomCnt | The number of atoms of the given element, e.g. 10 for C10. |
Definition at line 187 of file marginalTrek++.cpp.
|
inline |
Get the number of isotopes of the investigated element.
Definition at line 92 of file marginalTrek++.h.
double IsoSpec::Marginal::getHeaviestConfMass | ( | ) | const |
Get the mass of the heaviest subisotopologue.
This is trivially obtained by considering all atomNo atoms to be the heaviest isotope possible.
Definition at line 259 of file marginalTrek++.cpp.
double IsoSpec::Marginal::getLightestConfMass | ( | ) | const |
Get the mass of the lightest subisotopologue.
This is trivially obtained by considering all atomNo atoms to be the lightest isotope possible.
Definition at line 250 of file marginalTrek++.cpp.
|
inline |
Get the log-probability of the mode subisotopologue.
Definition at line 110 of file marginalTrek++.h.
|
inline |
The the mass of the mode subisotopologue.
Definition at line 116 of file marginalTrek++.h.
|
inline |
The the probability of the mode subisotopologue.
Definition at line 122 of file marginalTrek++.h.
|
inline |
The the log-probability of the lightest subisotopologue.
Definition at line 129 of file marginalTrek++.h.
|
inline |
Calculate the log-probability of a given subisotopologue.
conf | A subisotopologue (a table of integers describing subsequent isotope-counts). |
Definition at line 136 of file marginalTrek++.h.
|
protected |
Table of log-probabilities of all the isotopeNo isotopes.
Definition at line 53 of file marginalTrek++.h.
|
protected |
Table of atomic masses of all the isotopeNo isotopes.
Definition at line 52 of file marginalTrek++.h.
|
protected |
The number of atoms of the given element.
Definition at line 51 of file marginalTrek++.h.
|
protected |
The number of isotopes of the given element.
Definition at line 50 of file marginalTrek++.h.
|
protected |
The constant nominator that appears in the expressions for the multinomial probabilities.
Definition at line 54 of file marginalTrek++.h.
|
protected |
A subisotopologue with most probability. If not unique, one of the representatives of that class of subisotopologues.
Definition at line 55 of file marginalTrek++.h.
|
protected |
The log-probability of the mode subisotopologue.
Definition at line 56 of file marginalTrek++.h.
|
protected |
The mass of the mode subisotopologue.
Definition at line 57 of file marginalTrek++.h.
|
protected |
The probability of the mode subisotopologue.
Definition at line 58 of file marginalTrek++.h.
|
protected |
The smallest-achievable log-probability in the distribution of subisotopologues.
Definition at line 59 of file marginalTrek++.h.