CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: 00003 //---------------------BetaDistribution-------------------------------------// 00004 // // 00005 // Class Beta, x^(a-1)(1-x)^beta-1 Gamma(a+b)/Gamma(a)/Gamma(b); // 00006 // Joe Boudreau, Jan 2007 // 00007 // // 00008 //--------------------------------------------------------------------------// 00009 #ifndef BetaDistribution_h 00010 #define BetaDistribution_h 1 00011 #include "CLHEP/GenericFunctions/AbsFunction.hh" 00012 #include "CLHEP/GenericFunctions/Parameter.hh" 00013 #include "CLHEP/GenericFunctions/LogGamma.hh" 00014 #define _BETADISTRIBUTION_REVISED_ 1 00015 namespace Genfun { 00016 00021 class BetaDistribution : public AbsFunction { 00022 00023 FUNCTION_OBJECT_DEF(BetaDistribution) 00024 00025 public: 00026 00027 // Constructor 00028 BetaDistribution(); 00029 00030 // Copy constructor 00031 BetaDistribution(const BetaDistribution &right); 00032 00033 // Destructor 00034 virtual ~BetaDistribution(); 00035 00036 // Retreive function value 00037 virtual double operator ()(double argument) const; 00038 virtual double operator ()(const Argument & a) const {return operator() (a[0]);} 00039 00040 // Get the paramter alpha 00041 Parameter & alpha(); 00042 00043 // Get the paramter alpha 00044 Parameter & beta(); 00045 00046 private: 00047 00048 // It is illegal to assign an adjustable constant 00049 const BetaDistribution & operator=(const BetaDistribution &right); 00050 00051 // Here are the two parameters alpha and beta: 00052 00053 Parameter _alpha; 00054 Parameter _beta; 00055 00056 00057 // This function has a LogGamma Function; 00058 LogGamma _logGamma; 00059 00060 00061 }; 00062 } // namespace Genfun 00063 #endif