00001 #ifndef __RMOL_GAUSSIAN_HPP 00002 #define __RMOL_GAUSSIAN_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // GSL Random Number Generation (GSL Reference Manual, version 1.7, Chapter 17) 00008 #include <gsl/gsl_rng.h> 00009 // RMOL 00010 #include <rmol/field/FldDistributionParameters.hpp> 00011 00012 namespace RMOL { 00013 00015 class Gaussian { 00016 public: 00018 Gaussian (); 00019 Gaussian (const Gaussian&); 00022 Gaussian (const FldDistributionParameters&); 00023 00025 virtual ~Gaussian(); 00026 00027 // Getters 00030 const FldDistributionParameters& getDistributionParameters() const { 00031 return _params; 00032 } 00033 00035 double getMean() const; 00036 00038 double getStandardDeviation() const; 00039 00041 double getVariance() const; 00042 00043 00046 double generateVariate () const; 00047 00048 private: 00049 // Wrapper on GSL Random Generators (type and generator) 00050 const gsl_rng_type* _rngTypePtr; 00051 gsl_rng* _rngPtr; 00052 00053 // Gaussian distribution characteristics 00054 FldDistributionParameters _params; 00055 00056 private: 00057 // Initialise the Random Generator 00058 void initRandomGenerator(); 00059 }; 00060 00061 } 00062 #endif // __RMOL_GAUSSIAN_HPP
Generated on Wed Feb 9 2011 17:09:14 for RMOL by Doxygen 1.7.1