Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
EGHModel.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2017.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg$
32 // $Authors: Stephan Aiche $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_SIMULATION_EGHMODEL_H
36 #define OPENMS_SIMULATION_EGHMODEL_H
37 
40 
41 #include <boost/math/tr1.hpp>
42 
43 namespace OpenMS
44 {
56  class OPENMS_DLLAPI EGHModel :
57  public InterpolationModel
58  {
59 
60 public:
64 
66  EGHModel();
67 
69  EGHModel(const EGHModel & source);
70 
72  virtual ~EGHModel();
73 
75  virtual EGHModel & operator=(const EGHModel & source);
76 
78  static BaseModel<1> * create()
79  {
80  return new EGHModel();
81  }
82 
84  static const String getProductName()
85  {
86  return "EGHModel";
87  }
88 
90  void setOffset(CoordinateType offset);
91 
93  void setSamples();
94 
96  CoordinateType getCenter() const;
97 
98 protected:
99  CoordinateType min_;
100  CoordinateType max_;
101  BasicStatistics statistics_;
102  CoordinateType height_; // H in paper
103  CoordinateType apex_rt_;
104 
105  CoordinateType A_;
106  CoordinateType B_;
107 
108  CoordinateType tau_;
109  CoordinateType sigma_square_;
110  CoordinateType sigma_square_2_;
111 
112 
113  void updateMembers_();
114 
116  void computeBoundaries_();
117 
124  inline void evaluateEGH_(CoordinateType & rt, CoordinateType & egh_value)
125  {
126  CoordinateType denominator = sigma_square_2_ + tau_ * rt;
127 
128  if (denominator > 0)
129  {
130  // evaluate egh ->
131  egh_value = height_ * exp(
132  (-1 * rt * rt) / denominator
133  );
134  }
135  else
136  {
137  egh_value = 0.0;
138  }
139  }
140 
141  };
142 
143 } // namespace OpenMS
144 
145 #endif // OPENMS_SIMULATION_ELUTIONMODEL_H
A more convenient string class.
Definition: String.h:57
std::vector< value_type > container_type
Definition: LinearInterpolation.h:85
static const String getProductName()
name of the model (needed by Factory)
Definition: EGHModel.h:84
CoordinateType sigma_square_
Definition: EGHModel.h:109
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
CoordinateType tau_
Definition: EGHModel.h:108
CoordinateType A_
Definition: EGHModel.h:105
CoordinateType max_
Definition: EGHModel.h:100
LinearInterpolation::container_type ContainerType
Definition: EGHModel.h:63
CoordinateType sigma_square_2_
Definition: EGHModel.h:110
Abstract class for 1D-models that are approximated using linear interpolation.
Definition: InterpolationModel.h:55
CoordinateType B_
Definition: EGHModel.h:106
Math::BasicStatistics< CoordinateType > BasicStatistics
Definition: EGHModel.h:62
CoordinateType height_
Definition: EGHModel.h:102
Exponential-Gaussian hybrid distribution model for elution profiles.
Definition: EGHModel.h:56
BasicStatistics statistics_
Definition: EGHModel.h:101
InterpolationModel::CoordinateType CoordinateType
Definition: EGHModel.h:61
static BaseModel< 1 > * create()
create new ElutionModel object (needed by Factory)
Definition: EGHModel.h:78
void evaluateEGH_(CoordinateType &rt, CoordinateType &egh_value)
Evaluate the EGH function at position rt.
Definition: EGHModel.h:124
CoordinateType apex_rt_
Definition: EGHModel.h:103
CoordinateType min_
Definition: EGHModel.h:99

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:00 using doxygen 1.8.13