IsoSpec  1.95
Classes | Typedefs | Functions | Variables
IsoSpec Namespace Reference

Classes

class  Allocator
 
class  ConfEqual
 
class  ConfOrder
 
class  ConfOrderMarginal
 
class  ConfOrderMarginalDescending
 
class  DirtyAllocator
 
class  FixedEnvelope
 
class  Iso
 The Iso class for the calculation of the isotopic distribution. More...
 
class  IsoGenerator
 The generator of isotopologues. More...
 
class  IsoLayeredGenerator
 
class  IsoOrderedGenerator
 The generator of isotopologues sorted by their probability of occurrence. More...
 
class  IsoThresholdGenerator
 The generator of isotopologues above a given threshold value. More...
 
class  KeyHasher
 
class  LayeredMarginal
 LayeredMarginal class. More...
 
class  Marginal
 The marginal distribution class (a subisotopologue). More...
 
class  MarginalTrek
 The marginal distribution class (a subisotopologue). More...
 
class  OrderMarginalsBySizeDecresing
 
class  PrecalculatedMarginal
 Precalculated Marginal class. More...
 
class  ReverseOrder
 
class  SSummator
 
class  Summator
 
class  TableOrder
 
class  ThresholdFixedEnvelope
 
class  TotalProbFixedEnvelope
 
class  TSummator
 

Typedefs

typedef int * Conf
 

Functions

template<typename T >
void copyConf (const T *source, T *destination, int dim)
 
template<typename T >
void call_init (T *tabulator, Iso &&iso, bool tgetlProbs, bool tgetMasses, bool tgetProbs, bool tgetConfs)
 
template void call_init< TotalProbFixedEnvelope > (TotalProbFixedEnvelope *tabulator, Iso &&iso, bool tgetlProbs, bool tgetMasses, bool tgetProbs, bool tgetConfs)
 
template void call_init< ThresholdFixedEnvelope > (ThresholdFixedEnvelope *tabulator, Iso &&iso, bool tgetlProbs, bool tgetMasses, bool tgetProbs, bool tgetConfs)
 
void release_g_lfact_table ()
 
double * alloc_lfact_table ()
 
double RationalApproximation (double t)
 
double NormalCDFInverse (double p)
 
double NormalCDFInverse (double p, double mean, double stdev)
 
double NormalCDF (double x, double mean, double stdev)
 
double NormalPDF (double x, double mean, double stdev)
 
double LowerIncompleteGamma2 (int a, double x)
 
double InverseLowerIncompleteGamma2 (int a, double x)
 
double InverseChiSquareCDF2 (int k, double x)
 
unsigned int parse_formula (const char *formula, std::vector< const double * > &isotope_masses, std::vector< const double * > &isotope_probabilities, int **isotopeNumbers, int **atomCounts, unsigned int *confSize)
 
void printConfigurations (const std::tuple< double *, double *, int *, int > &results, int dimNumber, int *isotopeNumbers)
 
Conf initialConfigure (const int atomCnt, const int isotopeNo, const double *probs, const double *lprobs)
 Find one of the most probable subisotopologues. More...
 
void printMarginal (const std::tuple< double *, double *, int *, int > &results, int dim)
 
double * getMLogProbs (const double *probs, int isoNo)
 
double get_loggamma_nominator (int x)
 
int verify_atom_cnt (int atomCnt)
 
Conf initialConfigure (int atomCnt, int isotopeNo, const double *probs)
 
void * quickselect (void **array, int n, int start, int end)
 Quickly select the n'th positional statistic, including the weights.
 
double combinedSum (const int *conf, const std::vector< double > **valuesContainer, int dimNumber)
 
int * getConf (void *conf)
 
double getLProb (void *conf)
 
double unnormalized_logProb (const int *conf, const double *logProbs, int dim)
 
double mass (const int *conf, const double *masses, int dim)
 
bool tupleCmp (std::tuple< double, double, int * > t1, std::tuple< double, double, int * > t2)
 
template<typename T >
void printArray (const T *array, int size, const char *prefix="")
 
template<typename T >
void printVector (const std::vector< T > &vec)
 
template<typename T >
void printOffsets (const T **array, int size, const T *offset, const char *prefix="")
 
template<typename T >
void printNestedArray (const T **array, const int *shape, int size)
 
template<typename T >
void dealloc_table (T *tbl, int dim)
 
template<typename T >
void realloc_append (T **array, T what, size_t old_array_size)
 

Variables

const size_t isospec_number_of_isotopic_entries = ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES
 
const int elem_table_atomicNo [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const double elem_table_mass [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const int elem_table_massNo [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const int elem_table_extraNeutrons [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const char * elem_table_element [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const char * elem_table_symbol [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const bool elem_table_Radioactive [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const double elem_table_probability [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
const double elem_table_log_probability [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES]
 
double * g_lfact_table = alloc_lfact_table()
 
const double sqrt_pi = 1.772453850905516027298167483341145182798
 
const double pi = 3.14159265358979323846264338328
 
const double log2pluslogpi = log(2.0) + log(pi)
 

Detailed Description

Copyright (C) 2015-2019 Mateusz Łącki and Michał Startek.

This file is part of IsoSpec.

IsoSpec is free software: you can redistribute it and/or modify it under the terms of the Simplified ("2-clause") BSD licence.

IsoSpec is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should have received a copy of the Simplified BSD Licence along with IsoSpec. If not, see https://opensource.org/licenses/BSD-2-Clause.

Function Documentation

◆ getMLogProbs()

double* IsoSpec::getMLogProbs ( const double *  probs,
int  isoNo 
)

Here we order the processor to round the numbers up rather than down. Rounding down could result in the algorithm falling in an infinite loop because of the numerical instability of summing.

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

◆ initialConfigure()

Conf IsoSpec::initialConfigure ( const int  atomCnt,
const int  isotopeNo,
const double *  probs,
const double *  lprobs 
)

Find one of the most probable subisotopologues.

The algorithm uses the hill-climbing algorithm. It starts from a subisotopologue close to the mean of the underlying multinomial distribution. There might be more than one modes, in case of which this function will return only one of them, close to the mean.

Parameters
atomCnt

Here we perform hill climbing to the mode of the marginal distribution (the subisotopologue distribution). We start from the point close to the mean of the underlying multinomial distribution.

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