# CMAParams.h

    00001 /*
    00002  * C++ification of Nikolaus Hansen's original C-source code for the
    00003  * CMA-ES.
    00004  *
    00005  * Copyright (C) 1996, 2003, Nikolaus Hansen
    00006  *           (C) 2005, Maarten Keijzer
    00007  *
    00008  * License: LGPL
    00009  *
    00010  */
    00011
    00012 #ifndef CMAPARAMS_H__
    00013 #define CMAPARAMS_H__
    00014
    00015 #include <valarray>
    00016
    00017 class eoParser;
    00018 namespace eo {
    00019
    00020 class CMAParams {
    00021
    00022     public:
    00023
    00024     CMAParams() { /* Call this and all values need to be set by hand */ }
    00025     CMAParams(eoParser& parser, unsigned dimensionality = 0); // 0 dimensionality -> user needs to set it
    00026
    00027     void defaults(unsigned n_, unsigned maxgen_); /* apply all defaults using n and maxgen */
    00028
    00029     unsigned n;
    00030     unsigned maxgen;
    00031
    00032     unsigned lambda;          /* -> mu */
    00033     unsigned mu;              /* -> weights, lambda */
    00034
    00035     std::valarray<double> weights;     /* <- mu, -> mueff -> mucov -> ccov */
    00036     double mueff;       /* <- weights */
    00037
    00038     double mucov;
    00039
    00040     double damp;         /* <- ccumsig, maxeval, lambda */
    00041     double ccumsig;      /* -> damp, <- N */
    00042     double ccumcov;
    00043     double ccov;         /* <- mucov, N */
    00044
    00045     std::valarray<double> minStdevs;     /* Minimum standard deviations per coordinate (default = 0.0) */
    00046     std::valarray<double> initialStdevs; /* Initial standard deviations per coordinate (default = 0.3) */
    00047 };
    00048
    00049 } // namespace eo
    00050
    00051 #endif
    00052