ITK  6.0.0
Insight Toolkit
itkTDistribution.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 itkTDistribution_h
19#define itkTDistribution_h
20
22#include "itkNumericTraits.h"
23#include "ITKStatisticsExport.h"
24
25namespace itk
26{
27namespace Statistics
28{
59class ITKStatistics_EXPORT TDistribution : public ProbabilityDistribution
60{
61public:
62 ITK_DISALLOW_COPY_AND_MOVE(TDistribution);
63
69
71 itkOverrideGetNameOfClassMacro(TDistribution);
72
74 itkNewMacro(Self);
75
79 GetNumberOfParameters() const override
80 {
81 return 1;
82 }
83
86 double
87 EvaluatePDF(double x) const override;
88
92 double
93 EvaluatePDF(double x, const ParametersType &) const override;
94
97 virtual double
98 EvaluatePDF(double x, SizeValueType degreesOfFreedom) const;
99
102 double
103 EvaluateCDF(double x) const override;
104
108 double
109 EvaluateCDF(double x, const ParametersType &) const override;
110
113 virtual double
114 EvaluateCDF(double x, SizeValueType degreesOfFreedom) const;
115
119 double
120 EvaluateInverseCDF(double p) const override;
121
126 double
127 EvaluateInverseCDF(double p, const ParametersType &) const override;
128
132 virtual double
133 EvaluateInverseCDF(double p, SizeValueType degreesOfFreedom) const;
134
138
141 virtual SizeValueType
143
145 bool
146 HasMean() const override
147 {
148 return true;
149 }
150
152 double
153 GetMean() const override;
154
157 bool
158 HasVariance() const override;
159
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 ~TDistribution() 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.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs,...
TDistribution class defines the interface for a univariate Student-t distribution (pdfs,...
bool HasVariance() const override
double GetVariance() const override
SizeValueType GetNumberOfParameters() const override
~TDistribution() override=default
static double CDF(double x, SizeValueType degreesOfFreedom)
virtual double EvaluateCDF(double x, SizeValueType degreesOfFreedom) const
double EvaluateCDF(double x) const override
double EvaluateInverseCDF(double p) const override
static double PDF(double x, SizeValueType degreesOfFreedom)
void PrintSelf(std::ostream &os, Indent indent) const override
virtual SizeValueType GetDegreesOfFreedom() const
double EvaluateCDF(double x, const ParametersType &) const override
static double InverseCDF(double p, SizeValueType degreesOfFreedom)
virtual double EvaluateInverseCDF(double p, SizeValueType degreesOfFreedom) const
double EvaluatePDF(double x) const override
double EvaluateInverseCDF(double p, const ParametersType &) const override
double GetMean() const override
virtual double EvaluatePDF(double x, SizeValueType degreesOfFreedom) const
bool HasMean() const override
virtual void SetDegreesOfFreedom(SizeValueType)
static double InverseCDF(double p, const ParametersType &)
double EvaluatePDF(double x, const ParametersType &) const override
static double CDF(double x, const ParametersType &)
static double PDF(double x, const ParametersType &)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86