ITK  5.2.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  * 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 itkTDistribution_h
19 #define itkTDistribution_h
20 
22 #include "itkNumericTraits.h"
23 #include "ITKStatisticsExport.h"
24 
25 namespace itk
26 {
27 namespace Statistics
28 {
59 class ITKStatistics_EXPORT TDistribution : public ProbabilityDistribution
60 {
61 public:
62  ITK_DISALLOW_COPY_AND_MOVE(TDistribution);
63 
69 
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 
137  virtual void SetDegreesOfFreedom(SizeValueType);
138 
141  virtual SizeValueType
142  GetDegreesOfFreedom() const;
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 
229 protected:
230  TDistribution();
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
itk::Statistics::TDistribution
TDistribution class defines the interface for a univariate Student-t distribution (pdfs,...
Definition: itkTDistribution.h:59
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Statistics::TDistribution::GetNumberOfParameters
SizeValueType GetNumberOfParameters() const override
Definition: itkTDistribution.h:79
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkProbabilityDistribution.h
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
itkNumericTraits.h
itk::Statistics::TDistribution::HasMean
bool HasMean() const override
Definition: itkTDistribution.h:146
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83