ITK  6.0.0
Insight Toolkit
itkChiSquareDistribution.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 * https://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 itkChiSquareDistribution_h
19#define itkChiSquareDistribution_h
20
22#include "itkNumericTraits.h"
23#include "ITKStatisticsExport.h"
24
25namespace itk
26{
27namespace Statistics
28{
58class ITKStatistics_EXPORT ChiSquareDistribution : public ProbabilityDistribution
59{
60public:
61 ITK_DISALLOW_COPY_AND_MOVE(ChiSquareDistribution);
62
68
70 itkOverrideGetNameOfClassMacro(ChiSquareDistribution);
71
73 itkNewMacro(Self);
74
78 GetNumberOfParameters() const override
79 {
80 return 1;
81 }
82
85 double
86 EvaluatePDF(double x) const override;
87
91 double
92 EvaluatePDF(double x, const ParametersType &) const override;
93
96 virtual double
97 EvaluatePDF(double x, SizeValueType degreesOfFreedom) const;
98
101 double
102 EvaluateCDF(double x) const override;
103
107 double
108 EvaluateCDF(double x, const ParametersType &) const override;
109
112 virtual double
113 EvaluateCDF(double x, SizeValueType degreesOfFreedom) const;
114
118 double
119 EvaluateInverseCDF(double p) const override;
120
125 double
126 EvaluateInverseCDF(double p, const ParametersType &) const override;
127
131 virtual double
132 EvaluateInverseCDF(double p, SizeValueType degreesOfFreedom) const;
133
137
140 virtual SizeValueType
142
144 bool
145 HasMean() const override
146 {
147 return true;
148 }
149
151 double
152 GetMean() const override;
153
155 bool
156 HasVariance() const override
157 {
158 return true;
159 }
160
162 double
163 GetVariance() const override;
164
170 static double
171 PDF(double x, const ParametersType &);
172
177 static double
178 PDF(double x, SizeValueType degreesOfFreedom);
179
189 static double
190 CDF(double x, const ParametersType &);
191
200 static double
201 CDF(double x, SizeValueType degreesOfFreedom);
202
213 static double
214 InverseCDF(double p, const ParametersType &);
215
226 static double
227 InverseCDF(double p, SizeValueType degreesOfFreedom);
228
229protected:
231 ~ChiSquareDistribution() override = default;
232
233 void
234 PrintSelf(std::ostream & os, Indent indent) const override;
235}; // end of class
236} // end of namespace Statistics
237} // end namespace itk
238
239#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
ChiSquareDistribution class defines the interface for a univariate Chi-Square distribution (pdfs,...
void PrintSelf(std::ostream &os, Indent indent) const override
double GetVariance() const override
virtual void SetDegreesOfFreedom(SizeValueType)
static double PDF(double x, const ParametersType &)
static double InverseCDF(double p, const ParametersType &)
double EvaluatePDF(double x, const ParametersType &) const override
virtual SizeValueType GetDegreesOfFreedom() const
virtual double EvaluatePDF(double x, SizeValueType degreesOfFreedom) const
double EvaluateCDF(double x, const ParametersType &) const override
virtual double EvaluateInverseCDF(double p, SizeValueType degreesOfFreedom) const
double EvaluateCDF(double x) const override
static double CDF(double x, const ParametersType &)
virtual double EvaluateCDF(double x, SizeValueType degreesOfFreedom) const
double EvaluatePDF(double x) const override
double EvaluateInverseCDF(double p) const override
SizeValueType GetNumberOfParameters() const override
double EvaluateInverseCDF(double p, const ParametersType &) const override
static double InverseCDF(double p, SizeValueType degreesOfFreedom)
static double PDF(double x, SizeValueType degreesOfFreedom)
static double CDF(double x, SizeValueType degreesOfFreedom)
ProbabilityDistribution class defines common interface for statistical distributions (pdfs,...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86