Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

Review/Statistics/itkChiSquareDistribution.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkChiSquareDistribution.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-02 05:43:55 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkChiSquareDistribution_h
00018 #define __itkChiSquareDistribution_h
00019 
00020 #include "itkProbabilityDistribution.h"
00021 #include "itkNumericTraits.h"
00022 
00023 namespace itk { 
00024 namespace Statistics {
00025 
00054 class ITK_EXPORT ChiSquareDistribution :
00055     public ProbabilityDistribution
00056 {
00057 public:
00059   typedef ChiSquareDistribution    Self;
00060   typedef ProbabilityDistribution  Superclass;
00061   typedef SmartPointer<Self>       Pointer;
00062   typedef SmartPointer<const Self> ConstPointer;
00063 
00065   itkTypeMacro(ChiSquareDistribution, ProbabilityDistribution);
00066 
00068   itkNewMacro(Self);
00069 
00072   virtual unsigned long GetNumberOfParameters() const { return 1; }
00073 
00076   virtual double EvaluatePDF(double x) const;
00077 
00081   virtual double EvaluatePDF(double x, const ParametersType&) const;
00082 
00085   virtual double EvaluatePDF(double x, long degreesOfFreedom) const;
00086 
00089   virtual double EvaluateCDF(double x) const;
00090 
00094   virtual double EvaluateCDF(double x, const ParametersType&) const;
00095 
00098   virtual double EvaluateCDF(double x, long degreesOfFreedom) const;
00099 
00103   virtual double EvaluateInverseCDF(double p) const;
00104 
00109   virtual double EvaluateInverseCDF(double p, const ParametersType&) const;
00110 
00114   virtual double EvaluateInverseCDF(double p, long degreesOfFreedom) const;
00115 
00118   virtual void SetDegreesOfFreedom(long);
00119 
00122   virtual long GetDegreesOfFreedom() const;
00123 
00125   virtual bool HasMean() const { return true; }
00126 
00128   virtual double GetMean() const;
00129 
00131   virtual bool HasVariance() const { return true; }
00132 
00134   virtual double GetVariance() const;
00135 
00136     
00142   static double PDF(double x, const ParametersType&);
00143 
00148   static double PDF(double x, long degreesOfFreedom);
00149 
00159   static double CDF(double x, const ParametersType&);
00160 
00169   static double CDF(double x, long degreesOfFreedom);
00170 
00181   static double InverseCDF(double p, const ParametersType&);
00182 
00193   static double InverseCDF(double p, long degreesOfFreedom);
00194 
00195 protected:
00196   ChiSquareDistribution(void);
00197   virtual ~ChiSquareDistribution(void) {}
00198 
00199   void PrintSelf(std::ostream& os, Indent indent) const;
00200 
00201 private:
00202   ChiSquareDistribution(const Self&); //purposely not implemented
00203   void operator=(const Self&); //purposely not implemented
00204   
00205 }; // end of class
00206 
00207 } // end of namespace Statistics
00208 } // end namespace itk
00209 
00210 #endif
00211 

Generated at Thu May 28 09:36:25 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000