gsl_anneal Class Template Reference

#include <gsl_anneal.h>

Inheritance diagram for gsl_anneal:

sim_anneal multi_min

Detailed Description

template<class param_t, class func_t, class vec_t = ovector_view, class rng_t = gsl_rnga>
class gsl_anneal< param_t, func_t, vec_t, rng_t >

Multidimensional minimization by simulated annealing (GSL).

Minimize by simulated annealing for an arbitrary temperature schedule and random number generator. A move is defined by

\[ x_{i,\mathrm{new}} = \mathrm{stepsize} (2 u_i - 1) + x_{i,\mathrm{old}} \]

where the $u_i$ are random numbers between 0 and 1. The random number generator and temperature schedule are set in the parent, sim_anneal. The variables minimize::tolx and minimize::tolf are not used

Todo:
Implement different stepsizes for the different dimensions
Idea for future:
Implement a more general routine which would allow the solution of discrete problems like the Traveling Salesman problem.

Definition at line 55 of file gsl_anneal.h.


Public Member Functions

virtual ~gsl_anneal ()
virtual int mmin (size_t nvar, vec_t &x0, double &fmin, param_t &pa, func_t &func)
 Calculate the minimum fmin of func w.r.t the array x0 of size nvar.
virtual const char * type ()
 Return string denoting type ("gsl_anneal").

Data Fields

double step_size
 Size of step (default 10.0).
double boltz
 Boltzmann factor (default 1.0).

Protected Member Functions

int allocate (size_t n, double ustep=10.0, double boltz_factor=1.0)
 Allocate memory for a minimizer over n dimensions with stepsize step and Boltzmann factor boltz_factor.
int free ()
 Free allocated memory.
int step (vec_t &sx, int nvar)
 Make a step to a new attempted minimum.

Protected Attributes

Storage for present, next, and best vectors
ovector x
ovector new_x
ovector best_x

The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page