OUGenerator.h

Go to the documentation of this file.
00001 #ifndef OUGENERATOR_H_
00002 #define OUGENERATOR_H_
00003 
00004 #include "ThreadSpecificRandomDistribution.h"
00005 #include "RandomDistribution.h"
00006 #include "RandomEngine.h"
00007 
00009 
00015 class OUGenerator
00016 {
00017 public:
00019         double g0;
00021     double sig;
00023     double tau;
00024     
00026     double dt;
00027         
00028 protected:
00029     
00030     double A, C, D;
00031 
00032     double value;
00033 public:
00034     // default params for exc. Noise
00035     OUGenerator(double g0=0.012e-6, double sig=0.003e-6, double tau=2.7e-3, double dt=1e-4);                    
00036 
00037     virtual ~OUGenerator();
00038 
00040     virtual int reset(double dt);
00041 
00042     virtual int adjust(double dt);
00043 
00045     virtual void advance();
00046 
00048     inline double getValue()
00049     {
00050         return value;
00051     }
00052 
00053     inline double operator()()
00054     {
00055         advance();
00056         return value;
00057     }
00058 
00059 protected:
00061    static ThreadSpecificRandomDistribution< NormalDistribution > white_noise;
00062    
00063 };
00064 
00065 #endif //OUGENERATOR_H_

Generated on Wed Jul 9 16:34:39 2008 for PCSIM by  doxygen 1.5.5