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
147 IsotopeDistribution run(const EmpiricalFormula& ef) const override;
148
150 void setThreshold(double stop_condition)
151 {
152 stop_condition_ = stop_condition;
153 }
154
156 double getThreshold() const
157 {
158 return stop_condition_;
159 }
160
162 void setAbsolute(bool absolute)
163 {
164 absolute_ = absolute;
165 }
166
168 bool getAbsolute() const
169 {
170 return absolute_;
171 }
172
174 void setTotalProbability(bool total)
175 {
176 use_total_prob_ = total;
177 }
178
181 {
182 return use_total_prob_;
183 }
184
185 protected:
186 double stop_condition_ = 0.01;
187 bool absolute_ = false;
188 bool use_total_prob_ = true;
189
190 };
191
192} // namespace OpenMS
193
Representation of an empirical formula.
Definition EmpiricalFormula.h:62
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:162
bool getTotalProbability() const
Returns whether total probability should be computed (see FineIsotopePatternGenerator() )
Definition FineIsotopePatternGenerator.h:180
bool getAbsolute() const
Returns whether threshold is absolute or relative probability (ignored if use_total_prob is true,...
Definition FineIsotopePatternGenerator.h:168
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:156
void setThreshold(double stop_condition)
Set probability stop condition (lower values generate fewer results)
Definition FineIsotopePatternGenerator.h:150
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:174
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