ITK  5.2.0
Insight Toolkit
itkProbabilityDistribution.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 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 : public Object
73 {
74 public:
75  ITK_DISALLOW_COPY_AND_MOVE(ProbabilityDistribution);
76 
79  using Superclass = Object;
82 
84  itkTypeMacro(ProbabilityDistribution, Object);
85 
88 
92  virtual SizeValueType
93  GetNumberOfParameters() const = 0;
94 
98  itkGetConstReferenceMacro(Parameters, ParametersType);
99 
103  virtual void
104  SetParameters(const ParametersType & params);
105 
108  virtual double
109  EvaluatePDF(double x) const = 0;
110 
114  virtual double
115  EvaluatePDF(double x, const ParametersType &) const = 0;
116 
120  virtual double
121  EvaluateCDF(double x) const = 0;
122 
126  virtual double
127  EvaluateCDF(double x, const ParametersType &) const = 0;
128 
133  virtual double
134  EvaluateInverseCDF(double p) const = 0;
135 
140  virtual double
141  EvaluateInverseCDF(double p, const ParametersType &) const = 0;
142 
144  virtual bool
145  HasMean() const = 0;
146 
148  virtual bool
149  HasVariance() const = 0;
150 
153  virtual double
154  GetMean() const = 0;
155 
158  virtual double
159  GetVariance() const = 0;
160 
161 protected:
163  ~ProbabilityDistribution() override;
164  void
165  PrintSelf(std::ostream & os, Indent indent) const override;
166 
168 }; // end of class
169 } // end of namespace Statistics
170 } // end namespace itk
171 
172 #endif
itkObjectFactory.h
itk::Statistics::ProbabilityDistribution::m_Parameters
ParametersType m_Parameters
Definition: itkProbabilityDistribution.h:167
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkIntTypes.h
itk::Statistics::ProbabilityDistribution
ProbabilityDistribution class defines common interface for statistical distributions (pdfs,...
Definition: itkProbabilityDistribution.h:72
itkArray.h
itkObject.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Array< double >
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83