Class diff_evo_adapt (o2scl)

O2scl : Class List

template<class func_t = multi_funct, class vec_t = boost::numeric::ublas::vector<double>, class init_funct_t = mm_funct>
class diff_evo_adapt : public o2scl::diff_evo<multi_funct, boost::numeric::ublas::vector<double>, mm_funct>

Multidimensional minimization by the differential evolution method.

This class minimizes a function using differential evolution. This method is a genetic algorithm and as such works well for discontinuous problems, since it does not require the gradient of the function to be minimized.

This is an adaptive version of diff_evo as described in

[Brest06] .

Lower bound and range of F (defaults 0.1 and 0.9)

double fl
double fr
vec_t variables

Vector containing the tunable variable F and CR.

ubvector fmins

Vector that keeps track of fmins values.

inline diff_evo_adapt()
inline 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.

inline virtual void print_iter(size_t nvar, double fmin, int iter, vec_t &best_fit, size_t pop_size_loc)

Print out iteration information.

inline virtual int initialize_population(size_t nvar, vec_t &x0, size_t pop_size_loc)

Initialize a population of random agents.

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>&)

Public Types

typedef boost::numeric::ublas::vector<double> ubvector

Public Members

double tau_1

Probability of adjusting f (default 0.1)

double tau_2

Probability of adjusting cr (default 0.1)