Loading...
Searching...
No Matches
IsoSpec::FixedEnvelope Class Reference

## Public Member Functions

| FixedEnvelope (const FixedEnvelope &other)
| FixedEnvelope (FixedEnvelope &&other)
| FixedEnvelope (double *masses, double *probs, size_t confs_no, bool masses_sorted=false, bool probs_sorted=false, double _total_prob=NAN)
FixedEnvelope | operator+ (const FixedEnvelope &other) const
FixedEnvelope | operator* (const FixedEnvelope &other) const
size_t | confs_no () const
int | getAllDim () const
const double * | masses () const
const double * | probs () const
const int * | confs () const
double * | release_masses ()
double * | release_probs ()
int * | release_confs ()
void | release_everything ()
double | mass (size_t i) const
double | prob (size_t i) const
const int * | conf (size_t i) const
void | sort_by_mass ()
void | sort_by_prob ()
double | get_total_prob ()
void | scale (double factor)
void | normalize ()
void | shift_mass (double shift)
void | resample (size_t ionic_current, double beta_bias=1.0)
double | empiric_average_mass ()
double | empiric_variance ()
double | empiric_stddev ()
double | WassersteinDistance (FixedEnvelope &other)
double | OrientedWassersteinDistance (FixedEnvelope &other)
double | AbyssalWassersteinDistance (FixedEnvelope &other, double abyss_depth, double other_scale=1.0)
std::tuple< double, double, double > | WassersteinMatch (FixedEnvelope &other, double flow_distance, double other_scale=1.0)
FixedEnvelope | bin (double bin_width=1.0, double middle=0.0)
template<bool tgetConfs>
void | threshold_init (Iso &&iso, double threshold, bool absolute)
template<bool tgetConfs, typename GenType = IsoLayeredGenerator>
void | addConfILG (const GenType &generator)
template<bool tgetConfs>
void | total_prob_init (Iso &&iso, double target_prob, bool trim)
template<bool tgetConfs>
void | stochastic_init (Iso &&iso, size_t _no_molecules, double _precision, double _beta_bias)

## Static Public Member Functions

static FixedEnvelope | LinearCombination (const std::vector< const FixedEnvelope * > &spectra, const std::vector< double > &intensities)
static FixedEnvelope | LinearCombination (const FixedEnvelope *const *spectra, const double *intensities, size_t size)
static FixedEnvelope | FromThreshold (Iso &&iso, double threshold, bool absolute, bool tgetConfs=false)
static FixedEnvelope | FromThreshold (const Iso &iso, double _threshold, bool _absolute, bool tgetConfs=false)
static FixedEnvelope | FromTotalProb (Iso &&iso, double target_total_prob, bool optimize, bool tgetConfs=false)
static FixedEnvelope | FromTotalProb (const Iso &iso, double _target_total_prob, bool _optimize, bool tgetConfs=false)
static FixedEnvelope | FromStochastic (Iso &&iso, size_t _no_molecules, double _precision=0.9999, double _beta_bias=5.0, bool tgetConfs=false)
static FixedEnvelope | FromStochastic (const Iso &iso, size_t _no_molecules, double _precision=0.9999, double _beta_bias=5.0, bool tgetConfs=false)
static FixedEnvelope | Binned (Iso &&iso, double target_total_prob, double bin_width, double bin_middle=0.0)
static FixedEnvelope | Binned (const Iso &iso, double target_total_prob, double bin_width, double bin_middle=0.0)

## Protected Member Functions

template<typename T, bool tgetConfs>
ISOSPEC_FORCE_INLINE void | store_conf (const T &generator)
ISOSPEC_FORCE_INLINE void | store_conf (double _mass, double _prob)
template<bool tgetConfs>
ISOSPEC_FORCE_INLINE void | swap (size_t idx1, size_t idx2, ISOSPEC_MAYBE_UNUSED int *conf_swapspace)
template<bool tgetConfs>
void | reallocate_memory (size_t new_size)
void | slow_reallocate_memory (size_t new_size)

## Protected Attributes

double * | _masses
double * | _probs
int * | _confs
size_t | _confs_no
int | allDim
bool | sorted_by_mass
bool | sorted_by_prob
double | total_prob
size_t | current_size
double * | tmasses
double * | tprobs
int * | tconfs
int | allDimSizeofInt

## Friends

double | AbyssalWassersteinDistanceGrad (FixedEnvelope *const *envelopes, const double *scales, double *ret_gradient, size_t N, double abyss_depth_exp, double abyss_depth_the)

## Detailed Description

Definition at line 40 of file fixedEnvelopes.h.

## Constructor & Destructor Documentation

## FixedEnvelope() [1/4]

ISOSPEC_FORCE_INLINE IsoSpec::FixedEnvelope::FixedEnvelope | ( |  | ) |

inline

Definition at line 57 of file fixedEnvelopes.h.

## FixedEnvelope() [2/4]

IsoSpec::FixedEnvelope::FixedEnvelope | ( | const FixedEnvelope & | other | ) |

Definition at line 25 of file fixedEnvelopes.cpp.

## FixedEnvelope() [3/4]

IsoSpec::FixedEnvelope::FixedEnvelope | ( | FixedEnvelope && | other | ) |

Definition at line 36 of file fixedEnvelopes.cpp.

## FixedEnvelope() [4/4]

IsoSpec::FixedEnvelope::FixedEnvelope | ( | double * | masses,
|  | double * | probs,
|  | size_t | confs_no,
|  | bool | masses_sorted = false,
|  | bool | probs_sorted = false,
|  | double | _total_prob = NAN )

Definition at line 53 of file fixedEnvelopes.cpp.

## ~FixedEnvelope()

virtual IsoSpec::FixedEnvelope::~FixedEnvelope | ( |  | ) |

inline virtual

Definition at line 75 of file fixedEnvelopes.h.

## Member Function Documentation

## AbyssalWassersteinDistance()

double IsoSpec::FixedEnvelope::AbyssalWassersteinDistance | ( | FixedEnvelope & | other,
|  | double | abyss_depth,
|  | double | other_scale = 1.0 )

Definition at line 415 of file fixedEnvelopes.cpp.

## addConfILG()

template<bool tgetConfs, typename GenType = IsoLayeredGenerator>

void IsoSpec::FixedEnvelope::addConfILG | ( | const GenType & | generator | ) |

inline

Definition at line 172 of file fixedEnvelopes.h.

## bin()

FixedEnvelope IsoSpec::FixedEnvelope::bin | ( | double | bin_width = 1.0,
|  | double | middle = 0.0 )

Definition at line 803 of file fixedEnvelopes.cpp.

## Binned() [1/2]

FixedEnvelope IsoSpec::FixedEnvelope::Binned | ( | const Iso & | iso,
|  | double | target_total_prob,
|  | double | bin_width,
|  | double | bin_middle = 0.0 )

inline static

Definition at line 236 of file fixedEnvelopes.h.

## Binned() [2/2]

FixedEnvelope IsoSpec::FixedEnvelope::Binned | ( | Iso && | iso,
|  | double | target_total_prob,
|  | double | bin_width,
|  | double | bin_middle = 0.0 )

static

Definition at line 1092 of file fixedEnvelopes.cpp.

## conf()

const int * IsoSpec::FixedEnvelope::conf | ( | size_t | i | ) | const

inline

Definition at line 100 of file fixedEnvelopes.h.

## confs()

const int * IsoSpec::FixedEnvelope::confs | ( |  | ) | const

inline

Definition at line 90 of file fixedEnvelopes.h.

## confs_no()

size_t IsoSpec::FixedEnvelope::confs_no | ( |  | ) | const

inline

Definition at line 85 of file fixedEnvelopes.h.

## empiric_average_mass()

double IsoSpec::FixedEnvelope::empiric_average_mass | ( |  | ) |

Definition at line 1069 of file fixedEnvelopes.cpp.

## empiric_stddev()

double IsoSpec::FixedEnvelope::empiric_stddev | ( |  | ) |

inline

Definition at line 113 of file fixedEnvelopes.h.

## empiric_variance()

double IsoSpec::FixedEnvelope::empiric_variance | ( |  | ) |

Definition at line 1079 of file fixedEnvelopes.cpp.

## FromStochastic() [1/2]

FixedEnvelope IsoSpec::FixedEnvelope::FromStochastic | ( | const Iso & | iso,
|  | size_t | _no_molecules,
|  | double | _precision = 0.9999,
|  | double | _beta_bias = 5.0,
|  | bool | tgetConfs = false )

inline static

Definition at line 230 of file fixedEnvelopes.h.

## FromStochastic() [2/2]

FixedEnvelope IsoSpec::FixedEnvelope::FromStochastic | ( | Iso && | iso,
|  | size_t | _no_molecules,
|  | double | _precision = 0.9999,
|  | double | _beta_bias = 5.0,
|  | bool | tgetConfs = false )

inline static

Definition at line 218 of file fixedEnvelopes.h.

## FromThreshold() [1/2]

FixedEnvelope IsoSpec::FixedEnvelope::FromThreshold | ( | const Iso & | iso,
|  | double | _threshold,
|  | bool | _absolute,
|  | bool | tgetConfs = false )

inline static

Definition at line 194 of file fixedEnvelopes.h.

## FromThreshold() [2/2]

FixedEnvelope IsoSpec::FixedEnvelope::FromThreshold | ( | Iso && | iso,
|  | double | threshold,
|  | bool | absolute,
|  | bool | tgetConfs = false )

inline static

Definition at line 183 of file fixedEnvelopes.h.

## FromTotalProb() [1/2]

FixedEnvelope IsoSpec::FixedEnvelope::FromTotalProb | ( | const Iso & | iso,
|  | double | _target_total_prob,
|  | bool | _optimize,
|  | bool | tgetConfs = false )

inline static

Definition at line 211 of file fixedEnvelopes.h.

## FromTotalProb() [2/2]

FixedEnvelope IsoSpec::FixedEnvelope::FromTotalProb | ( | Iso && | iso,
|  | double | target_total_prob,
|  | bool | optimize,
|  | bool | tgetConfs = false )

inline static

Definition at line 199 of file fixedEnvelopes.h.

## get_total_prob()

double IsoSpec::FixedEnvelope::get_total_prob | ( |  | ) |

Definition at line 193 of file fixedEnvelopes.cpp.

## getAllDim()

int IsoSpec::FixedEnvelope::getAllDim | ( |  | ) | const

inline

Definition at line 86 of file fixedEnvelopes.h.

## LinearCombination() [1/2]

FixedEnvelope IsoSpec::FixedEnvelope::LinearCombination | ( | const FixedEnvelope *const * | spectra,
|  | const double * | intensities,
|  | size_t | size )

static

Definition at line 272 of file fixedEnvelopes.cpp.

## LinearCombination() [2/2]

FixedEnvelope IsoSpec::FixedEnvelope::LinearCombination | ( | const std::vector< const FixedEnvelope * > & | spectra,
|  | const std::vector< double > & | intensities )

static

Definition at line 267 of file fixedEnvelopes.cpp.

## mass()

double IsoSpec::FixedEnvelope::mass | ( | size_t | i | ) | const

inline

Definition at line 98 of file fixedEnvelopes.h.

## masses()

const double * IsoSpec::FixedEnvelope::masses | ( |  | ) | const

inline

Definition at line 88 of file fixedEnvelopes.h.

## normalize()

void IsoSpec::FixedEnvelope::normalize | ( |  | ) |

Definition at line 211 of file fixedEnvelopes.cpp.

## operator*()

FixedEnvelope IsoSpec::FixedEnvelope::operator* | ( | const FixedEnvelope & | other | ) | const

Definition at line 85 of file fixedEnvelopes.cpp.

## operator+()

FixedEnvelope IsoSpec::FixedEnvelope::operator+ | ( | const FixedEnvelope & | other | ) | const

Definition at line 64 of file fixedEnvelopes.cpp.

## OrientedWassersteinDistance()

double IsoSpec::FixedEnvelope::OrientedWassersteinDistance | ( | FixedEnvelope & | other | ) |

Definition at line 359 of file fixedEnvelopes.cpp.

## prob()

double IsoSpec::FixedEnvelope::prob | ( | size_t | i | ) | const

inline

Definition at line 99 of file fixedEnvelopes.h.

## probs()

const double * IsoSpec::FixedEnvelope::probs | ( |  | ) | const

inline

Definition at line 89 of file fixedEnvelopes.h.

## reallocate_memory()

template<bool tgetConfs>

void IsoSpec::FixedEnvelope::reallocate_memory | ( | size_t | new_size | ) |

protected

Definition at line 855 of file fixedEnvelopes.cpp.

## release_confs()

int * IsoSpec::FixedEnvelope::release_confs | ( |  | ) |

inline

Definition at line 94 of file fixedEnvelopes.h.

## release_everything()

void IsoSpec::FixedEnvelope::release_everything | ( |  | ) |

inline

Definition at line 95 of file fixedEnvelopes.h.

## release_masses()

double * IsoSpec::FixedEnvelope::release_masses | ( |  | ) |

inline

Definition at line 92 of file fixedEnvelopes.h.

## release_probs()

double * IsoSpec::FixedEnvelope::release_probs | ( |  | ) |

inline

Definition at line 93 of file fixedEnvelopes.h.

## resample()

void IsoSpec::FixedEnvelope::resample | ( | size_t | ionic_current,
|  | double | beta_bias = 1.0 )

Definition at line 227 of file fixedEnvelopes.cpp.

## scale()

void IsoSpec::FixedEnvelope::scale | ( | double | factor | ) |

Definition at line 204 of file fixedEnvelopes.cpp.

## shift_mass()

void IsoSpec::FixedEnvelope::shift_mass | ( | double | shift | ) |

Definition at line 221 of file fixedEnvelopes.cpp.

## slow_reallocate_memory()

void IsoSpec::FixedEnvelope::slow_reallocate_memory | ( | size_t | new_size | ) |

protected

Definition at line 878 of file fixedEnvelopes.cpp.

## sort_by_mass()

void IsoSpec::FixedEnvelope::sort_by_mass | ( |  | ) |

Definition at line 112 of file fixedEnvelopes.cpp.

## sort_by_prob()

void IsoSpec::FixedEnvelope::sort_by_prob | ( |  | ) |

Definition at line 124 of file fixedEnvelopes.cpp.

## stochastic_init()

template<bool tgetConfs>

template void IsoSpec::FixedEnvelope::stochastic_init< false > | ( | Iso && | iso,
|  | size_t | _no_molecules,
|  | double | _precision,
|  | double | _beta_bias )

Definition at line 1053 of file fixedEnvelopes.cpp.

## store_conf() [1/2]

template<typename T, bool tgetConfs>

ISOSPEC_FORCE_INLINE void IsoSpec::FixedEnvelope::store_conf | ( | const T & | generator | ) |

inline protected

Definition at line 132 of file fixedEnvelopes.h.

## store_conf() [2/2]

ISOSPEC_FORCE_INLINE void IsoSpec::FixedEnvelope::store_conf | ( | double | _mass,
|  | double | _prob )

inline protected

Definition at line 139 of file fixedEnvelopes.h.

## swap()

template<bool tgetConfs>

ISOSPEC_FORCE_INLINE void IsoSpec::FixedEnvelope::swap | ( | size_t | idx1,
|  | size_t | idx2,
|  | ISOSPEC_MAYBE_UNUSED int * | conf_swapspace )

inline protected

Definition at line 152 of file fixedEnvelopes.h.

## threshold_init()

template<bool tgetConfs>

template void IsoSpec::FixedEnvelope::threshold_init< false > | ( | Iso && | iso,
|  | double | threshold,
|  | bool | absolute )

Definition at line 901 of file fixedEnvelopes.cpp.

## total_prob_init()

template<bool tgetConfs>

template void IsoSpec::FixedEnvelope::total_prob_init< false > | ( | Iso && | iso,
|  | double | target_prob,
|  | bool | trim )

Definition at line 931 of file fixedEnvelopes.cpp.

## WassersteinDistance()

double IsoSpec::FixedEnvelope::WassersteinDistance | ( | FixedEnvelope & | other | ) |

Definition at line 300 of file fixedEnvelopes.cpp.

## WassersteinMatch()

std::tuple< double, double, double > IsoSpec::FixedEnvelope::WassersteinMatch | ( | FixedEnvelope & | other,
|  | double | flow_distance,
|  | double | other_scale = 1.0 )

Definition at line 730 of file fixedEnvelopes.cpp.

## Member Data Documentation

## _confs

int* IsoSpec::FixedEnvelope::_confs

protected

Definition at line 44 of file fixedEnvelopes.h.

## _confs_no

size_t IsoSpec::FixedEnvelope::_confs_no

protected

Definition at line 45 of file fixedEnvelopes.h.

## _masses

double* IsoSpec::FixedEnvelope::_masses

protected

Definition at line 42 of file fixedEnvelopes.h.

## _probs

double* IsoSpec::FixedEnvelope::_probs

protected

Definition at line 43 of file fixedEnvelopes.h.

## allDim

int IsoSpec::FixedEnvelope::allDim

protected

Definition at line 46 of file fixedEnvelopes.h.

## allDimSizeofInt

int IsoSpec::FixedEnvelope::allDimSizeofInt

protected

Definition at line 54 of file fixedEnvelopes.h.

## current_size

size_t IsoSpec::FixedEnvelope::current_size

protected

Definition at line 50 of file fixedEnvelopes.h.

## sorted_by_mass

bool IsoSpec::FixedEnvelope::sorted_by_mass

protected

Definition at line 47 of file fixedEnvelopes.h.

## sorted_by_prob

bool IsoSpec::FixedEnvelope::sorted_by_prob

protected

Definition at line 48 of file fixedEnvelopes.h.

## tconfs

int* IsoSpec::FixedEnvelope::tconfs

protected

Definition at line 53 of file fixedEnvelopes.h.

## tmasses

double* IsoSpec::FixedEnvelope::tmasses

protected

Definition at line 51 of file fixedEnvelopes.h.

## total_prob

double IsoSpec::FixedEnvelope::total_prob

protected

Definition at line 49 of file fixedEnvelopes.h.

## tprobs

double* IsoSpec::FixedEnvelope::tprobs

protected

Definition at line 52 of file fixedEnvelopes.h.

The documentation for this class was generated from the following files:

- /build/isospec-8QB56o/isospec-2.3.2/src/IsoSpec++/fixedEnvelopes.h
- /build/isospec-8QB56o/isospec-2.3.2/src/IsoSpec++/fixedEnvelopes.cpp