00001 /******************************************************************* 00002 * File: RandGenerator.h 00003 * Description: 00004 * Author: Subhasis Ray 00005 * E-mail: ray.subhasis@gmail.com 00006 * Created: 2007-11-07 16:25:08 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 _RANDGENERATOR_H 00019 #define _RANDGENERATOR_H 00020 00021 #include "randnum.h" 00022 #include "basecode/header.h" 00023 #include "Probability.h" 00024 00029 class RandGenerator 00030 { 00031 public: 00032 RandGenerator(); 00033 virtual ~RandGenerator(); 00034 double getMean() const; 00035 double getVariance() const; 00036 double getSample() const; 00037 void process( const Eref& e, ProcPtr info); 00038 void reinit( const Eref& e, ProcPtr info); 00039 virtual void vReinit( const Eref& e, ProcPtr info); 00040 00041 static const Cinfo * initCinfo(); 00042 protected: 00043 Probability* rng_; 00044 double sample_; 00045 }; 00046 00047 00048 #endif