ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkTDistribution.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
58 class ITKStatistics_EXPORT TDistribution:
60 {
61 public:
67 
70 
72  itkNewMacro(Self);
73 
76  virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 1; }
77 
80  virtual double EvaluatePDF(double x) const ITK_OVERRIDE;
81 
85  virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE;
86 
89  virtual double EvaluatePDF(double x, SizeValueType degreesOfFreedom) const;
90 
93  virtual double EvaluateCDF(double x) const ITK_OVERRIDE;
94 
98  virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE;
99 
102  virtual double EvaluateCDF(double x, SizeValueType degreesOfFreedom) const;
103 
107  virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE;
108 
113  virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE;
114 
118  virtual double EvaluateInverseCDF(double p, SizeValueType degreesOfFreedom) const;
119 
122  virtual void SetDegreesOfFreedom(SizeValueType);
123 
126  virtual SizeValueType GetDegreesOfFreedom() const;
127 
129  virtual bool HasMean() const ITK_OVERRIDE { return true; }
130 
132  virtual double GetMean() const ITK_OVERRIDE;
133 
136  virtual bool HasVariance() const ITK_OVERRIDE;
137 
140  virtual double GetVariance() const ITK_OVERRIDE;
141 
147  static double PDF(double x, const ParametersType &);
148 
153  static double PDF(double x, SizeValueType degreesOfFreedom);
154 
164  static double CDF(double x, const ParametersType &);
165 
174  static double CDF(double x, SizeValueType degreesOfFreedom);
175 
186  static double InverseCDF(double p, const ParametersType &);
187 
198  static double InverseCDF(double p, SizeValueType degreesOfFreedom);
199 
200 protected:
201  TDistribution();
202  virtual ~TDistribution(void) ITK_OVERRIDE {}
203 
204  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
205 
206 private:
207  ITK_DISALLOW_COPY_AND_ASSIGN(TDistribution);
208 }; // end of class
209 } // end of namespace Statistics
210 } // end namespace itk
211 
212 #endif
Light weight base class for most itk classes.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ProbabilityDistribution Superclass
virtual SizeValueType GetNumberOfParameters() const override
TDistribution class defines the interface for a univariate Student-t distribution (pdfs...
Control indentation during Print() invocation.
Definition: itkIndent.h:49