ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkProbabilityDistribution.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 itkProbabilityDistribution_h
19 #define itkProbabilityDistribution_h
20 
21 #include "itkIntTypes.h"
22 #include "itkObject.h"
23 #include "itkObjectFactory.h"
24 #include "itkArray.h"
25 #include "ITKStatisticsExport.h"
26 
27 namespace itk
28 {
29 namespace Statistics
30 {
72 class ITKStatistics_EXPORT ProbabilityDistribution:
73  public Object
74 {
75 public:
76  ITK_DISALLOW_COPY_AND_ASSIGN(ProbabilityDistribution);
77 
80  using Superclass = Object;
83 
85  itkTypeMacro(ProbabilityDistribution, Object);
86 
89 
93  virtual SizeValueType GetNumberOfParameters() const = 0;
94 
98  itkGetConstReferenceMacro(Parameters, ParametersType);
99 
103  virtual void SetParameters(const ParametersType & params);
104 
107  virtual double EvaluatePDF(double x) const = 0;
108 
112  virtual double EvaluatePDF(double x, const ParametersType &) const = 0;
113 
117  virtual double EvaluateCDF(double x) const = 0;
118 
122  virtual double EvaluateCDF(double x, const ParametersType &) const = 0;
123 
128  virtual double EvaluateInverseCDF(double p) const = 0;
129 
134  virtual double EvaluateInverseCDF(double p, const ParametersType &) const = 0;
135 
137  virtual bool HasMean() const = 0;
138 
140  virtual bool HasVariance() const = 0;
141 
144  virtual double GetMean() const = 0;
145 
148  virtual double GetVariance() const = 0;
149 
150 protected:
152  ~ProbabilityDistribution() override;
153  void PrintSelf(std::ostream & os, Indent indent) const override;
154 
156 }; // end of class
157 } // end of namespace Statistics
158 } // end namespace itk
159 
160 #endif
Light weight base class for most itk classes.
ProbabilityDistribution class defines common interface for statistical distributions (pdfs...
unsigned long SizeValueType
Definition: itkIntTypes.h:83
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60