Multidimensional minimization by the differential evolution method. More...
#include <diff_evo_adapt.h>
This class minimizes a function using differential evolution. This method is a genetic algorithm and as such works well for non continuous problems, since it does not rely on a gradient of the function that is being mind.
This is an adaptive version of diff_evo as described in Brest06 .
Definition at line 56 of file diff_evo_adapt.h.
Public Types | |
| typedef boost::numeric::ublas::vector< double > | ubvector |
Public Types inherited from o2scl::diff_evo< func_t, vec_t, init_funct_t > | |
| typedef boost::numeric::ublas::vector< double > | ubvector |
Public Member Functions | |
| virtual int | mmin (size_t nvar, vec_t &x0, double &fmin, func_t &func) |
Calculate the minimum fmin of func w.r.t the array x of size nvar. | |
| virtual void | print_iter (size_t nvar, double fmin, int iter, vec_t &best_fit) |
| Print out iteration information. More... | |
Public Member Functions inherited from o2scl::diff_evo< func_t, vec_t, init_funct_t > | |
| virtual void | set_init_function (init_funct_t &function) |
| Set the function that is used to produce random init variables. More... | |
Public Member Functions inherited from o2scl::mmin_base< func_t, func_t, vec_t > | |
| mmin_base (const mmin_base< func_t, func_t, vec_t > &mb) | |
| Copy constructor. | |
| int | set_verbose_stream (std::ostream &out, std::istream &in) |
| Set streams for verbose I/O. More... | |
| virtual int | mmin_de (size_t nvar, vec_t &x, double &fmin, func_t &func, func_t &dfunc) |
Calculate the minimum min of func w.r.t. the array x of size nvar with gradient dfunc. | |
| int | print_iter (size_t nv, vec2_t &x, double y, int iter, double value, double limit, std::string comment) |
| Print out iteration information. More... | |
| const char * | type () |
| Return string denoting type ("mmin_base") | |
| mmin_base< func_t, func_t, vec_t > & | operator= (const mmin_base< func_t, func_t, vec_t > &mb) |
| Copy constructor from operator=. | |
Public Attributes | |
| double | tau_1 |
| Probability of adjusting f (default 0.1) | |
| double | tau_2 |
| Probability of adjusting cr (default 0.1) | |
Lower bound and range of F (defaults 0.1 and 0.9) | |
| double | fl |
| double | fr |
Public Attributes inherited from o2scl::diff_evo< func_t, vec_t, init_funct_t > | |
| size_t | pop_size |
| Population size (default 0) More... | |
| size_t | nconv |
| The number of generations without a better fit before we assume that the algorithm has converged (default 25) | |
| double | f |
| Differential weight (default 0.75) More... | |
| double | cr |
| Crossover probability (default 0.8) More... | |
Public Attributes inherited from o2scl::mmin_base< func_t, func_t, vec_t > | |
| int | verbose |
| Output control. | |
| int | ntrial |
| Maximum number of iterations. | |
| double | tol_rel |
| Function value tolerance. | |
| double | tol_abs |
| The independent variable tolerance. | |
| int | last_ntrial |
| The number of iterations for in the most recent minimization. | |
| bool | err_nonconv |
| If true, call the error handler if the routine does not "converge". | |
Protected Member Functions | |
| virtual int | initialize_population (size_t nvar, vec_t &x0) |
| Initialize a population of random agents. | |
Protected Member Functions inherited from o2scl::diff_evo< func_t, vec_t, init_funct_t > | |
| virtual std::vector< int > | pick_unique_agents (int nr, size_t x) |
| Pick number of unique agent id's. More... | |
Protected Attributes | |
| vec_t | variables |
| Vector containing the tunable variable F and CR. | |
| ubvector | fmins |
| Vector that keeps track of fmins values. | |
Protected Attributes inherited from o2scl::diff_evo< func_t, vec_t, init_funct_t > | |
| vec_t | population |
| Vector containing the population. More... | |
| ubvector | fmins |
| Vector that keeps track of fmins values. | |
| init_funct_t * | rand_init_funct |
| Function that is used to produce random init variables. More... | |
| rng_gsl | gr |
| Random number generator. | |
Protected Attributes inherited from o2scl::mmin_base< func_t, func_t, vec_t > | |
| std::ostream * | outs |
| Stream for verbose output. | |
| std::istream * | ins |
| Stream for verbose input. | |
Private Member Functions | |
| diff_evo_adapt (const diff_evo_adapt< func_t, vec_t, init_funct_t > &) | |
| diff_evo_adapt< func_t, vec_t, init_funct_t > & | operator= (const diff_evo_adapt< func_t, vec_t, init_funct_t > &) |
|
inlinevirtual |
Reimplemented from o2scl::diff_evo< func_t, vec_t, init_funct_t >.
Definition at line 211 of file diff_evo_adapt.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).