---
name: "IsoSpec_IsoLayeredGenerator"
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_IsoLayeredGenerator"
---

# IsoSpec\_IsoLayeredGenerator(3)

## NAME

IsoSpec::IsoLayeredGenerator

## SYNOPSIS

Inherits **IsoSpec::IsoGenerator**.

### Public Member Functions

**IsoLayeredGenerator** (const **IsoLayeredGenerator** &other)=delete\
 **IsoLayeredGenerator** & **operator=** (const **IsoLayeredGenerator** &other)=delete\
 void **get\_conf\_signature** (int \*space) const override final\
 Write the signature of configuration into target memory location. It must be large enough to accomodate it.  double **get\_currentLThreshold** () const\
 **IsoLayeredGenerator** (**Iso** &&iso, int \_tabSize=1000, int \_hashSize=1000, bool reorder\_marginals=true, double t\_prob\_hint=0.99)\
 ISOSPEC\_FORCE\_INLINE bool **advanceToNextConfiguration** () override final\
 Advance to the next, not yet visited, most probable isotopologue.  ISOSPEC\_FORCE\_INLINE bool **advanceToNextConfigurationWithinLayer** ()\
 ISOSPEC\_FORCE\_INLINE double **lprob** () const override final\
 Get the log-probability of the current isotopologue.  ISOSPEC\_FORCE\_INLINE double **mass** () const override final\
 Get the mass of the current isotopologue.  ISOSPEC\_FORCE\_INLINE double **prob** () const override final\
 Get the probability of the current isotopologue.  void **terminate\_search** ()\
 Block the subsequent search of isotopologues.  ISOSPEC\_FORCE\_INLINE void **recalc** (int idx)\
 Recalculate the current partial log-probabilities, masses, and probabilities.  bool **nextLayer** (double offset)\

Public Member Functions inherited from **IsoSpec::IsoGenerator** **IsoGenerator** (**Iso** &&iso, bool alloc\_partials=true)\
 Move constructor.  virtual **~IsoGenerator** ()\
 Destructor.

Public Member Functions inherited from **IsoSpec::Iso** **Iso** (int \_dimNumber, const int \*\_isotopeNumbers, const int \*\_atomCounts, const double \*\_isotopeMasses, const double \*\_isotopeProbabilities)\
 General constructror.  **Iso** (int \_dimNumber, const int \*\_isotopeNumbers, const int \*\_atomCounts, const double \*const \*\_isotopeMasses, const double \*const \*\_isotopeProbabilities)\
 **Iso** (const char \*formula, bool use\_nominal\_masses=false)\
 Constructor from the formula object.  **Iso** (const std::string &formula, bool use\_nominal\_masses=false)\
 Constructor from C++ std::string chemical formula.  **Iso** (**Iso** &&other)\
 The move constructor.  **Iso** & **operator=** (const **Iso** &other)=delete\
 **Iso** (const **Iso** &other, bool fullcopy)\
 The copy constructor.  virtual **~Iso** ()\
 Destructor.  double **getLightestPeakMass** () const\
 Get the mass of the lightest peak in the isotopic distribution.  double **getHeaviestPeakMass** () const\
 Get the mass of the heaviest peak in the isotopic distribution.  double **getMonoisotopicPeakMass** () const\
 double **getModeLProb** () const\
 Get the log-probability of the mode-configuration (if there are many modes, they share this value).  double **getUnlikeliestPeakLProb** () const\
 Get the logprobability of the least probable subisotopologue.  double **getModeMass** () const\
 Get the mass of the mode-configuration (if there are many modes, it is undefined which one will be selected).  double **getTheoreticalAverageMass** () const\
 Get the theoretical average mass of the molecule.  double **variance** () const\
 Get the theoretical variance of the distribution.  double **stddev** () const\
 Get the standard deviation of the theoretical distribution.  int **getDimNumber** () const\
 Get the number of elements in the chemical formula of the molecule.  int **getAllDim** () const\
 Get the total number of isotopes of elements present in a chemical formula.  void **addElement** (int atomCount, int noIsotopes, const double \*isotopeMasses, const double \*isotopeProbabilities)\
 Add an element to the molecule. Note: this method can only be used BEFORE **Iso** is used to construct an **IsoGenerator** instance.  void **saveMarginalLogSizeEstimates** (double \*priorities, double target\_total\_prob) const\
 Save estimates of logarithms of target sizes of marginals using Gaussian approximation into argument array. Array priorities must have length equal to dimNumber.

### Additional Inherited Members

Static Public Member Functions inherited from **IsoSpec::Iso** static **Iso** **FromFASTA** (const char \*fasta, bool use\_nominal\_masses=false, bool add\_water=true)\
 Constructor (named) from aminoacid FASTA sequence as C string.  static **Iso** **FromFASTA** (const std::string &fasta, bool use\_nominal\_masses=false, bool add\_water=true)\
 Constructor (named) from aminoacid FASTA sequence as C++ std::string. See above for details.

Public Attributes inherited from **IsoSpec::IsoGenerator** const double **mode\_lprob**\

Protected Member Functions inherited from **IsoSpec::Iso** bool **doMarginalsNeedSorting** () const\

Protected Attributes inherited from **IsoSpec::IsoGenerator** double \* **partialLProbs**\
 double \* **partialMasses**\
 double \* **partialProbs**\

Protected Attributes inherited from **IsoSpec::Iso** int **dimNumber**\
 int \* **isotopeNumbers**\
 int \* **atomCounts**\
 unsigned int **confSize**\
 int **allDim**\
 **Marginal** \*\* **marginals**\

## Detailed Description

Definition at line **439** of file **isoSpec++.h**.

## Constructor & Destructor Documentation

### IsoSpec::IsoLayeredGenerator::IsoLayeredGenerator (Iso && iso, int \_tabSize = `1000`, int \_hashSize = `1000`, bool reorder\_marginals = `true`, double t\_prob\_hint = `0.99`)

Definition at line **654** of file **isoSpec++.cpp**.

### IsoSpec::IsoLayeredGenerator::~IsoLayeredGenerator ()

Definition at line **796** of file **isoSpec++.cpp**.

## Member Function Documentation

### ISOSPEC\_FORCE\_INLINE bool IsoSpec::IsoLayeredGenerator::advanceToNextConfiguration ()` [inline]`, ` [final]`, ` [override]`, ` [virtual]`

Advance to the next, not yet visited, most probable isotopologue.

**Returns**

Return false if it is not possible to advance.

Implements **IsoSpec::IsoGenerator**.

Definition at line **489** of file **isoSpec++.h**.

### ISOSPEC\_FORCE\_INLINE bool IsoSpec::IsoLayeredGenerator::advanceToNextConfigurationWithinLayer ()` [inline]`

Definition at line **499** of file **isoSpec++.h**.

### void IsoSpec::IsoLayeredGenerator::get\_conf\_signature (int \* space) const` [inline]`, ` [final]`, ` [override]`, ` [virtual]`

Write the signature of configuration into target memory location. It must be large enough to accomodate it.

Implements **IsoSpec::IsoGenerator**.

Definition at line **461** of file **isoSpec++.h**.

### double IsoSpec::IsoLayeredGenerator::get\_currentLThreshold () const` [inline]`

Definition at line **483** of file **isoSpec++.h**.

### ISOSPEC\_FORCE\_INLINE double IsoSpec::IsoLayeredGenerator::lprob () const` [inline]`, ` [final]`, ` [override]`, ` [virtual]`

Get the log-probability of the current isotopologue.

**Returns**

The log-probability of the current isotopologue.

Reimplemented from **IsoSpec::IsoGenerator**.

Definition at line **511** of file **isoSpec++.h**.

### ISOSPEC\_FORCE\_INLINE double IsoSpec::IsoLayeredGenerator::mass () const` [inline]`, ` [final]`, ` [override]`, ` [virtual]`

Get the mass of the current isotopologue.

**Returns**

The mass of the current isotopologue.

Reimplemented from **IsoSpec::IsoGenerator**.

Definition at line **512** of file **isoSpec++.h**.

### bool IsoSpec::IsoLayeredGenerator::nextLayer (double offset)

Definition at line **721** of file **isoSpec++.cpp**.

### ISOSPEC\_FORCE\_INLINE double IsoSpec::IsoLayeredGenerator::prob () const` [inline]`, ` [final]`, ` [override]`, ` [virtual]`

Get the probability of the current isotopologue.

**Returns**

The probability of the current isotopologue.

Reimplemented from **IsoSpec::IsoGenerator**.

Definition at line **513** of file **isoSpec++.h**.

### ISOSPEC\_FORCE\_INLINE void IsoSpec::IsoLayeredGenerator::recalc (int idx)` [inline]`

Recalculate the current partial log-probabilities, masses, and probabilities.

Definition at line **520** of file **isoSpec++.h**.

### void IsoSpec::IsoLayeredGenerator::terminate\_search ()

Block the subsequent search of isotopologues.

Definition at line **785** of file **isoSpec++.cpp**.

## Author

Generated automatically by Doxygen for IsoSpec from the source code.
