ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkChiSquareDistribution.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 itkChiSquareDistribution_h
19 #define itkChiSquareDistribution_h
20 
22 #include "itkNumericTraits.h"
23 #include "ITKStatisticsExport.h"
24 
25 namespace itk
26 {
27 namespace Statistics
28 {
58 class ITKStatistics_EXPORT ChiSquareDistribution:
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 
135  virtual bool HasVariance() const ITK_OVERRIDE { return true; }
136 
138  virtual double GetVariance() const ITK_OVERRIDE;
139 
145  static double PDF(double x, const ParametersType &);
146 
151  static double PDF(double x, SizeValueType degreesOfFreedom);
152 
162  static double CDF(double x, const ParametersType &);
163 
172  static double CDF(double x, SizeValueType degreesOfFreedom);
173 
184  static double InverseCDF(double p, const ParametersType &);
185 
196  static double InverseCDF(double p, SizeValueType degreesOfFreedom);
197 
198 protected:
200  virtual ~ChiSquareDistribution() ITK_OVERRIDE {}
201 
202  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
203 
204 private:
205  ITK_DISALLOW_COPY_AND_ASSIGN(ChiSquareDistribution);
206 }; // end of class
207 } // end of namespace Statistics
208 } // end namespace itk
209 
210 #endif
ChiSquareDistribution class defines the interface for a univariate Chi-Square distribution (pdfs...
Light weight base class for most itk classes.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs...
unsigned long SizeValueType
Definition: itkIntTypes.h:143
virtual SizeValueType GetNumberOfParameters() const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49