paradiseo/tutorial/eo/Templates/stat.tmpl
Adèle Harrissart 490e837f7a * New tree configuration of the project:
.../
   ...           + -- EO
   |             |
   |             |
   +-- src ----- + -- EDO
   |             |
   |             |
   +-- test      + -- MO
   |             |
   |             |
   +-- tutorial  + -- MOEO
   |             |
   |             |
   +-- doc       + -- SMP
   |             |
   |             |
   ...           + -- EOMPI
                 |
                 |
                 + -- EOSERIAL

Question for current maintainers: ./README: new release?

Also:

* Moving out eompi & eoserial modules (issue #2).

* Correction of the errors when executing "make doc" command.

* Adding a solution for the conflicting headers problem (see the two CMake Cache
 Values: PROJECT_TAG & PROJECT_HRS_INSTALL_SUBPATH) (issue #1)

* Header inclusions:
        ** src: changing absolute paths into relative paths ('#include <...>' -> '#include "..."')
        ** test, tutorial: changing relative paths into absolute paths ('#include "..."' -> '#include <...>')

* Moving out some scripts from EDO -> to the root

* Add a new script for compilation and installation (see build_gcc_linux_install)

* Compilation with uBLAS library or EDO module: now ok

* Minor modifications on README & INSTALL files

* Comment eompi failed tests with no end

*** TODO: CPack (debian (DEB) & RedHat (RPM) packages) (issues #6 & #7) ***
2014-09-06 13:04:35 +02:00

63 lines
1.9 KiB
C++
Executable file

/** -*- 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(0.);
// 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