⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stat.tmpl

📁 这是linux下的进化计算的源代码。 === === === === === === === === === === === ===== check latest news at http:
💻 TMPL
字号:
/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-The above line is usefulin Emacs-like editors *//*Template for computing statistics on eoPop============================================*/#ifndef _eoMyStructStat_h#define _eoMyStructStat_h// include the base definition of eoInit#include <utils/eoStat.h>/**  *  Always write a comment in this format before class definition *  if you want the class to be documented by Doxygen * * ASSUMPTION on the class GenoypeT:  *             it needs to derive from EO (i.e. has a Fitness). * * It is assumed that you want to compute a double.  * In case you want something else, then your stat should derive from  *                      eoStat<GenotypeT, T> *  where class T is the class of the computed statistics */template <class EOT>class eoMyStructStat : public eoStat<EOT, double>{public :    typedef typename EOT::Fitness Fitness;// START eventually add or modify the anyVariable argument  /** Ctor - you change the default name of course.    * @param   *  _description : inherited from eoValueParam (eoStat is an  from eoVapueParam)   */  eoMyStructStat(std::string _description = "eoMyStructStat ") :    eoStat<EOT, double>(0.0, _description)// END eventually add or modify the anyVariable argument  {    // START Code of Ctor of an eoMonReelStat object    // END   Code of Ctor of an eoMonReelStat object  }    void operator()(const eoPop<EOT>& _pop){      double tmpStat;    // START Code for computing the statistics - in tmpStat      // tmpStat = blablabla    // END   Code for computing the statistics      eoStat<EOT,double>::value() = tmpStat;      // store the stat in the eoParam value() field    }  virtual std::string className(void) const { return "eoMyStructStat"; }private :// START Private data of an eoMyStructStat object  //  varType anyVariable;		   // for example ...// END   Private data of an eoMyStructStat object};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -