OpenMS
GammaDistributionFitter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Andreas Bertsch $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
13 
14 #include <vector>
15 
16 
17 namespace OpenMS
18 {
19  namespace Math
20  {
34  class OPENMS_DLLAPI GammaDistributionFitter
35  {
36 public:
37 
40  {
41 public:
42 
43  GammaDistributionFitResult(double bIn, double pIn) :
44  b(bIn),
45  p(pIn)
46  {
47  }
48 
50  double b;
51 
53  double p;
54  };
55 
60 
63 
71  GammaDistributionFitResult fit(const std::vector<DPosition<2> >& points) const;
72 
73 protected:
74 
76 
77 private:
82  };
83  }
84 }
85 
Implements a fitter for the Gamma distribution.
Definition: GammaDistributionFitter.h:35
GammaDistributionFitter()
Default constructor.
void setInitialParameters(const GammaDistributionFitResult &result)
sets the gamma distribution start parameters b and p for the fitting
virtual ~GammaDistributionFitter()
Destructor.
GammaDistributionFitResult init_param_
Definition: GammaDistributionFitter.h:75
GammaDistributionFitter(const GammaDistributionFitter &rhs)
Copy constructor (not implemented to prevent usage)
GammaDistributionFitter & operator=(const GammaDistributionFitter &rhs)
assignment operator (not implemented to prevent usage)
GammaDistributionFitResult fit(const std::vector< DPosition< 2 > > &points) const
Fits a gamma distribution to the given data points.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
struct to represent the parameters of a gamma distribution
Definition: GammaDistributionFitter.h:40
double b
parameter b of the gamma distribution
Definition: GammaDistributionFitter.h:50
GammaDistributionFitResult(double bIn, double pIn)
Definition: GammaDistributionFitter.h:43
double p
parameter p of the gamma distribution
Definition: GammaDistributionFitter.h:53