00001 /******************************************************************* 00002 * File: Gamma.h 00003 * Description: 00004 * Author: Subhasis Ray 00005 * E-mail: ray.subhasis@gmail.com 00006 * Created: 2007-11-05 19:22:32 00007 ********************************************************************/ 00008 /********************************************************************** 00009 ** This program is part of 'MOOSE', the 00010 ** Messaging Object Oriented Simulation Environment, 00011 ** also known as GENESIS 3 base code. 00012 ** copyright (C) 2003-2005 Upinder S. Bhalla. and NCBS 00013 ** It is made available under the terms of the 00014 ** GNU General Public License version 2 00015 ** See the file COPYING.LIB for the full notice. 00016 **********************************************************************/ 00017 00018 #ifndef _GAMMA_H 00019 #define _GAMMA_H 00020 #include "Probability.h" 00021 #include <iostream> 00022 using namespace std; 00023 00024 class Gamma: public Probability 00025 { 00026 public: 00027 Gamma(double alpha, double theta); 00028 double getAlpha(); 00029 double getTheta(); 00030 double getMean() const; 00031 double getVariance() const; 00032 double getNextSample() const; 00033 private: 00034 double alpha_; 00035 double theta_; 00036 double gammaSmall() const; 00037 double gammaLarge() const; 00038 00039 }; 00040 00041 00042 #endif