ITK  5.3.0
Insight Toolkit
itkGaussianDistribution.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkGaussianDistribution_h
19 #define itkGaussianDistribution_h
20 
22 #include "ITKStatisticsExport.h"
23 
24 namespace itk
25 {
26 namespace Statistics
27 {
61 class ITKStatistics_EXPORT GaussianDistribution : public ProbabilityDistribution
62 {
63 public:
64  ITK_DISALLOW_COPY_AND_MOVE(GaussianDistribution);
65 
71 
74 
76  itkNewMacro(Self);
77 
81  GetNumberOfParameters() const override
82  {
83  return 2;
84  }
85 
88  double
89  EvaluatePDF(double x) const override;
90 
94  double
95  EvaluatePDF(double x, const ParametersType &) const override;
96 
99  virtual double
100  EvaluatePDF(double x, double mean, double variance) const;
101 
104  double
105  EvaluateCDF(double x) const override;
106 
110  double
111  EvaluateCDF(double x, const ParametersType &) const override;
112 
115  virtual double
116  EvaluateCDF(double x, double mean, double variance) const;
117 
121  double
122  EvaluateInverseCDF(double p) const override;
123 
128  double
129  EvaluateInverseCDF(double p, const ParametersType &) const override;
130 
134  virtual double
135  EvaluateInverseCDF(double p, double mean, double variance) const;
136 
139  virtual void
140  SetMean(double);
141 
144  double
145  GetMean() const override;
146 
148  bool
149  HasMean() const override
150  {
151  return true;
152  }
153 
157  virtual void
158  SetVariance(double);
159 
162  double
163  GetVariance() const override;
164 
166  bool
167  HasVariance() const override
168  {
169  return true;
170  }
171 
176  static double
177  PDF(double x);
178 
184  static double
185  PDF(double x, const ParametersType &);
186 
191  static double
192  PDF(double x, double mean, double variance);
193 
198  static double
199  CDF(double x);
200 
206  static double
207  CDF(double x, const ParametersType &);
208 
213  static double
214  CDF(double x, double mean, double variance);
215 
246  static double
247  InverseCDF(double p);
249 
256  static double
257  InverseCDF(double p, const ParametersType &);
258 
264  static double
265  InverseCDF(double p, double mean, double variance);
266 
267 protected:
269  ~GaussianDistribution() override = default;
270 
271  void
272  PrintSelf(std::ostream & os, Indent indent) const override;
273 }; // end of class
274 } // end of namespace Statistics
275 } // end namespace itk
276 
277 #endif
itk::Statistics::GaussianDistribution
GaussianDistribution class defines the interface for a univariate Gaussian distribution (pdfs,...
Definition: itkGaussianDistribution.h:61
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Statistics::GaussianDistribution::HasVariance
bool HasVariance() const override
Definition: itkGaussianDistribution.h:167
itkProbabilityDistribution.h
itk::Statistics::GaussianDistribution::GetNumberOfParameters
SizeValueType GetNumberOfParameters() const override
Definition: itkGaussianDistribution.h:81
itk::Statistics::ProbabilityDistribution
ProbabilityDistribution class defines common interface for statistical distributions (pdfs,...
Definition: itkProbabilityDistribution.h:72
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Statistics::GaussianDistribution::HasMean
bool HasMean() const override
Definition: itkGaussianDistribution.h:149
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83