---
name: "IsoSpec_MarginalTrek"
section: "3"
platform: "linux"
package: "libisospec++-dev"
version: "2.2.1-4.1+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/IsoSpec_MarginalTrek"
---

# IsoSpec\_MarginalTrek(3)

The marginal distribution class (a subisotopologue).

## NAME

IsoSpec::MarginalTrek - The marginal distribution class (a subisotopologue).

## SYNOPSIS

`#include <marginalTrek++.h>`

Inherits **IsoSpec::Marginal**.

### Public Member Functions

**MarginalTrek** (**Marginal** &&m, int tabSize=1000, int hashSize=1000)\
 Move constructor: specializes the **Marginal** class.  **MarginalTrek** (const **MarginalTrek** &other)=delete\
 **MarginalTrek** & **operator=** (const **MarginalTrek** &other)=delete\
 bool **probeConfigurationIdx** (int idx)\
 Check if the table of computed subisotopologues does not have to be extended.  double **getModeLProb** () const\
 Get the log-probability of the mode subisotopologue.  const **pod\_vector**\< double \> & **conf\_lprobs** () const\
 const **pod\_vector**\< double \> & **conf\_masses** () const\
 const **pod\_vector**\< Conf \> & **confs** () const\

Public Member Functions inherited from **IsoSpec::Marginal** **Marginal** (const double \*\_masses, const double \*\_probs, int \_isotopeNo, int \_atomCnt)\
 Class constructor.  **Marginal** & **operator=** (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.  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

The marginal distribution class (a subisotopologue).

Definition at line **175** of file **marginalTrek++.h**.

## Constructor & Destructor Documentation

### IsoSpec::MarginalTrek::MarginalTrek (Marginal && m, int tabSize = `1000`, int hashSize = `1000`)

Move constructor: specializes the **Marginal** class.

**Parameters**

*tabSize* The size of the table used to store configurations in the allocator. \
 *hashSize* The size of the hash table used to store visited subisotopologues.

Definition at line **323** of file **marginalTrek++.cpp**.

### IsoSpec::MarginalTrek::~MarginalTrek ()` [virtual]`

Definition at line **434** of file **marginalTrek++.cpp**.

## Member Function Documentation

### const pod\_vector\< double \> & IsoSpec::MarginalTrek::conf\_lprobs () const` [inline]`

Definition at line **233** of file **marginalTrek++.h**.

### const pod\_vector\< double \> & IsoSpec::MarginalTrek::conf\_masses () const` [inline]`

Definition at line **234** of file **marginalTrek++.h**.

### const pod\_vector\< Conf \> & IsoSpec::MarginalTrek::confs () const` [inline]`

Definition at line **235** of file **marginalTrek++.h**.

### double IsoSpec::MarginalTrek::getModeLProb () const` [inline]`

Get the log-probability of the mode subisotopologue.

**Returns**

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

Definition at line **230** of file **marginalTrek++.h**.

### bool IsoSpec::MarginalTrek::probeConfigurationIdx (int idx)` [inline]`

Check if the table of computed subisotopologues does not have to be extended. This function checks if the idx-th most probable subisotopologue was memoized and if not, computes it and memoizes it.

**Parameters**

*idx* The number of the idx-th most probable subisotopologue.

**Returns**

Returns false if it the provided idx exceeds the total number of subisotopologues.

Definition at line **218** of file **marginalTrek++.h**.

## Author

Generated automatically by Doxygen for IsoSpec from the source code.
