OpenMS
Loading...
Searching...
No Matches
FineIsotopePatternGenerator.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Hannes Rost $
6// $Authors: Hannes Rost $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
13namespace OpenMS
14{
15
96 class OPENMS_DLLAPI FineIsotopePatternGenerator
98 {
99
100 public:
101
107
122 FineIsotopePatternGenerator(double stop_condition, bool use_total_prob = true, bool absolute = false) :
123 stop_condition_(stop_condition),
124 absolute_(absolute),
125 use_total_prob_(use_total_prob)
126 {}
127
144 IsotopeDistribution run(const EmpiricalFormula& ef) const override;
145
147 void setThreshold(double stop_condition)
148 {
149 stop_condition_ = stop_condition;
150 }
151
153 double getThreshold() const
154 {
155 return stop_condition_;
156 }
157
159 void setAbsolute(bool absolute)
160 {
161 absolute_ = absolute;
162 }
163
165 bool getAbsolute() const
166 {
167 return absolute_;
168 }
169
171 void setTotalProbability(bool total)
172 {
173 use_total_prob_ = total;
174 }
175
178 {
179 return use_total_prob_;
180 }
181
182 protected:
183 double stop_condition_ = 0.01;
184 bool absolute_ = false;
185 bool use_total_prob_ = true;
186
187 };
188
189} // namespace OpenMS
190
Representation of an empirical formula.
Definition EmpiricalFormula.h:63
Isotope pattern generator for fine isotope distributions.
Definition FineIsotopePatternGenerator.h:98
void setAbsolute(bool absolute)
Set whether threshold is absolute or relative probability (ignored if use_total_prob is true,...
Definition FineIsotopePatternGenerator.h:159
bool getTotalProbability() const
Returns whether total probability should be computed (see FineIsotopePatternGenerator() )
Definition FineIsotopePatternGenerator.h:177
bool getAbsolute() const
Returns whether threshold is absolute or relative probability (ignored if use_total_prob is true,...
Definition FineIsotopePatternGenerator.h:165
FineIsotopePatternGenerator()=default
Default Constructor.
IsotopeDistribution run(const EmpiricalFormula &ef) const override
Creates an isotope distribution from an empirical sum formula.
double getThreshold() const
Get probability stop condition (lower values generate fewer results)
Definition FineIsotopePatternGenerator.h:153
void setThreshold(double stop_condition)
Set probability stop condition (lower values generate fewer results)
Definition FineIsotopePatternGenerator.h:147
FineIsotopePatternGenerator(double stop_condition, bool use_total_prob=true, bool absolute=false)
Constructor.
Definition FineIsotopePatternGenerator.h:122
void setTotalProbability(bool total)
Set whether total probability should be computed (see FineIsotopePatternGenerator() )
Definition FineIsotopePatternGenerator.h:171
Definition IsotopeDistribution.h:40
Provides an interface for different isotope pattern generator methods.
Definition IsotopePatternGenerator.h:42
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19