eoGaussRealWeightUp.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
00002 
00003 //-----------------------------------------------------------------------------
00004 // eoGaussRealWeightUp.h
00005 // (c) OPAC 2007
00006 /*
00007     Contact: paradiseo-help@lists.gforge.inria.fr
00008  */
00009 //-----------------------------------------------------------------------------
00010 
00011 #ifndef EOGAUSSREALWEIGHTUP_H
00012 #define EOGAUSSREALWEIGHTUP_H
00013 
00014 //-----------------------------------------------------------------------------
00015 #include <eoWeightUpdater.h>
00016 #include <utils/eoRNG.h>
00017 //-----------------------------------------------------------------------------
00018 
00019 
00023 class eoGaussRealWeightUp:public eoWeightUpdater<double>
00024 {
00025 public:
00026 
00032     eoGaussRealWeightUp(
00033         double  _mean=0,
00034         double  _stdev=1.0
00035     ):mean(_mean),stdev(_stdev){}
00036 
00041     void operator() (double & _weight)
00042     {
00043         _weight=rng.normal(mean,stdev);
00044     }
00045 
00046 
00047 protected:
00048     double mean,stdev;
00049 
00050 };
00051 
00052 
00053 
00054 #endif/*EOGAUSSREALWEIGHTUP_H*/

Generated on Fri Jun 22 10:17:02 2007 for EO-PSO by  doxygen 1.4.7