Go to the documentation of this file.
23 #ifndef O2SCL_ANNEAL_H
24 #define O2SCL_ANNEAL_H
32 #include <boost/config.hpp>
33 #include <boost/numeric/ublas/vector.hpp>
34 #include <boost/numeric/ublas/matrix.hpp>
36 #include <o2scl/multi_funct.h>
37 #include <o2scl/mmin.h>
38 #include <o2scl/rng_gsl.h>
39 #include <o2scl/prob_dens_func.h>
41 #ifndef DOXYGEN_NO_O2NS
70 #ifdef O2SCL_NEVER_DEFINED
81 virtual ~anneal_base() {}
86 virtual int mmin(
size_t nvar, vec_t &x,
double &fmin,
98 virtual int print_iter(
size_t nv, vec_t &x,
double y,
int iter,
99 double tptr, std::string comment)
101 if (this->verbose<=0)
return 0;
106 (*this->outs) << comment <<
" Iteration: " << iter << std::endl;
108 for(i=0;i<nv;i++) std::cout << x[i] <<
" ";
109 std::cout << std::endl;
110 (*this->outs) <<
"y: " << y <<
" Tptr: " << tptr << std::endl;
111 if (this->verbose>1) {
112 (*this->outs) <<
"Press a key and type enter to continue. ";
127 virtual const char *
type() {
return "anneal_base"; }
153 #ifndef DOXYGEN_NO_O2NS
Random number generator (GSL)
o2scl::prob_dens_uniform dist
The random distribution object.
mmin_base< func_t, dfunc_t, vec_t > & operator=(const mmin_base< func_t, dfunc_t, vec_t > &mb)
Copy constructor from operator=.
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
rng_t rng
The default random number generator.
Simulated annealing base.
std::function< double(size_t, const boost::numeric::ublas::vector< double > &)> multi_funct
Multi-dimensional function typedef in src/base/multi_funct.h.
Multidimensional minimization [abstract base].
virtual int print_iter(size_t nv, vec_t &x, double y, int iter, double tptr, std::string comment)
Print out iteration information.
virtual const char * type()
Return string denoting type, "anneal_base".
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).