ITK  4.6.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 
24 namespace itk
25 {
26 namespace Statistics
27 {
59 {
60 public:
66 
69 
71  itkNewMacro(Self);
72 
75  virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 1; }
76 
79  virtual double EvaluatePDF(double x) const ITK_OVERRIDE;
80 
84  virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE;
85 
88  virtual double EvaluatePDF(double x, SizeValueType degreesOfFreedom) const;
89 
92  virtual double EvaluateCDF(double x) const ITK_OVERRIDE;
93 
97  virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE;
98 
101  virtual double EvaluateCDF(double x, SizeValueType degreesOfFreedom) const;
102 
106  virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE;
107 
112  virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE;
113 
117  virtual double EvaluateInverseCDF(double p, SizeValueType degreesOfFreedom) const;
118 
121  virtual void SetDegreesOfFreedom(SizeValueType);
122 
125  virtual SizeValueType GetDegreesOfFreedom() const;
126 
128  virtual bool HasMean() const ITK_OVERRIDE { return true; }
129 
131  virtual double GetMean() const ITK_OVERRIDE;
132 
135  virtual bool HasVariance() const ITK_OVERRIDE;
136 
139  virtual double GetVariance() const ITK_OVERRIDE;
140 
146  static double PDF(double x, const ParametersType &);
147 
152  static double PDF(double x, SizeValueType degreesOfFreedom);
153 
163  static double CDF(double x, const ParametersType &);
164 
173  static double CDF(double x, SizeValueType degreesOfFreedom);
174 
185  static double InverseCDF(double p, const ParametersType &);
186 
197  static double InverseCDF(double p, SizeValueType degreesOfFreedom);
198 
199 protected:
200  TDistribution(void);
201  virtual ~TDistribution(void) {}
202 
203  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
204 
205 private:
206  TDistribution(const Self &); //purposely not implemented
207  void operator=(const Self &); //purposely not implemented
208 }; // end of class
209 } // end of namespace Statistics
210 } // end namespace itk
211 
212 #endif
void operator=(const Self &)
virtual bool HasVariance() const ITK_OVERRIDE
static double PDF(double x, const ParametersType &)
virtual double EvaluatePDF(double x) const ITK_OVERRIDE
Light weight base class for most itk classes.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
virtual bool HasMean() const ITK_OVERRIDE
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ProbabilityDistribution Superclass
virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE
static double CDF(double x, const ParametersType &)
virtual double GetVariance() const ITK_OVERRIDE
virtual SizeValueType GetDegreesOfFreedom() const
virtual double GetMean() const ITK_OVERRIDE
virtual void SetDegreesOfFreedom(SizeValueType)
TDistribution class defines the interface for a univariate Student-t distribution (pdfs...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
static double InverseCDF(double p, const ParametersType &)
virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE
virtual double EvaluateCDF(double x) const ITK_OVERRIDE