 |
IsoSpec
2.1.2
|
25 #include "allocator.h"
26 #include "operators.h"
28 #include "pod_vector.h"
66 const double* _masses,
90 inline const double* get_lProbs()
const {
return atom_lProbs; }
168 inline void ensureModeConf() {
if (
mode_conf ==
nullptr) setupMode(); }
180 std::priority_queue<ProbAndConfPtr, pod_vector<ProbAndConfPtr> > pq;
187 bool add_next_conf();
213 while(current_count <= idx)
249 unsigned int no_confs;
281 inline bool inRange(
unsigned int idx)
const {
return idx < no_confs; }
288 inline const double&
get_lProb(
int idx)
const {
return lProbs[idx]; }
295 inline const double&
get_prob(
int idx)
const {
return probs[idx]; }
302 inline const double&
get_mass(
int idx)
const {
return masses[idx]; }
322 inline const Conf&
get_conf(
int idx)
const {
return confs[idx]; }
346 double current_threshold;
356 double* guarded_lProbs;
374 bool extend(
double new_threshold,
bool do_sort =
true);
377 inline double get_lProb(
int idx)
const {
return guarded_lProbs[idx]; }
380 inline double get_prob(
int idx)
const {
return probs[idx]; }
383 inline double get_mass(
int idx)
const {
return masses[idx]; }
389 inline const Conf&
get_conf(
int idx)
const {
return configurations[idx]; }
392 inline unsigned int get_no_confs()
const {
return configurations.size(); }
double getMonoisotopicConfMass() const
Get the mass of the monoisotopic subisotopologue.
PrecalculatedMarginal(Marginal &&m, double lCutOff, bool sort=true, int tabSize=1000, int hashSize=1000)
The move constructor (disowns the Marginal).
double variance() const
Calculate the variance of the theoretical distribution describing the subisotopologue.
Marginal(const double *_masses, const double *_probs, int _isotopeNo, int _atomCnt)
Class constructor.
const double * get_masses_ptr() const
Get the table of the masses of subisotopologues.
Precalculated Marginal class.
The marginal distribution class (a subisotopologue).
unsigned int get_no_confs() const
Get the number of precomputed subisotopologues, see details in PrecalculatedMarginal::get_no_confs.
ISOSPEC_FORCE_INLINE double unnormalized_logProb(Conf conf) const
Calculate the log-probability of a given subisotopologue.
const double * get_lProbs_ptr() const
Get the table of the log-probabilities of subisotopologues.
const double & get_mass(int idx) const
Get the mass of the idx-th subisotopologue.
LayeredMarginal(Marginal &&m, int tabSize=1000, int hashSize=1000)
Move constructor: specializes the Marginal class.
double fastGetModeLProb()
Get the log-probability of the mode subisotopologue. Results undefined if ensureModeConf() wasn't cal...
double getHeaviestConfMass() const
Get the mass of the heaviest subisotopologue.
double getSmallestLProb() const
The the log-probability of the lightest subisotopologue.
double getModeLProb() const
Get the log-probability of the mode subisotopologue.
const Conf & get_conf(int idx) const
Get the counts of isotopes that define the subisotopologue.
const double & get_lProb(int idx) const
Get the log-probability of the idx-th subisotopologue.
virtual ~PrecalculatedMarginal()
Destructor.
double get_mass(int idx) const
get the mass of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_mass.
double getLightestConfMass() const
Get the mass of the lightest subisotopologue.
const double *const atom_masses
Conf computeModeConf() const
The the probability of the mode subisotopologue.
double getModeLProb() const
Get the log-probability of the mode subisotopologue.
const unsigned int atomCnt
const Conf & get_conf(int idx) const
get the counts of isotopes that define the subisotopologue, see details in PrecalculatedMarginal::get...
unsigned int get_no_confs() const
Get the number of precomputed subisotopologues.
double getAtomAverageMass() const
The average mass of a single atom.
double getLogSizeEstimate(double logEllipsoidRadius) const
Return estimated logarithm of size of the marginal at a given ellipsoid radius.
double getTheoreticalAverageMass() const
The theoretical average mass of the molecule.
double get_min_mass() const
Get the minimal mass in current layer.
const double * get_lProbs_ptr() const
get the pointer to lProbs array. Accessing index -1 is legal and returns a guardian of -inf....
bool probeConfigurationIdx(int idx)
Check if the table of computed subisotopologues does not have to be extended.
int get_isotopeNo() const
Get the number of isotopes of the investigated element.
const double *const atom_lProbs
virtual ~Marginal()
Destructor.
double get_prob(int idx) const
get the probability of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_eProb.
double getModeMass()
The the mass of the mode subisotopologue.
bool extend(double new_threshold, bool do_sort=true)
Extend the set of computed subisotopologues to those above the new threshold.
MarginalTrek(Marginal &&m, int tabSize=1000, int hashSize=1000)
Move constructor: specializes the Marginal class.
bool inRange(unsigned int idx) const
Is there a subisotopologue with a given number?
The marginal distribution class (a subisotopologue).
double get_lProb(int idx) const
get the log-probability of the idx-th subisotopologue, see details in PrecalculatedMarginal::get_lPro...
const double & get_prob(int idx) const
Get the probability of the idx-th subisotopologue.
const unsigned int isotopeNo
const double loggamma_nominator
double get_max_mass() const
Get the maximal mass in current layer.
double getModeLProb()
Get the log-probability of the mode subisotopologue.
double getModeLProb() const
Get the log-probability of the mode subisotopologue.