simulatedAnnealing.hpp
Go to the documentation of this file.
87 std::vector<double> calculate(F f,PA prob_accept,std::vector<double> x_initial, int iters_per_t);
148 std::vector<double> SimulatedAnnealing::calculate(F f, PA prob_accept, std::vector<double> x_initial, int iters_per_t) {
File contains template of deep-coping smart pointer.
Definition: cadHoliday.cpp:3
SimulatedAnnealing(SmartPointer< UniformRNG > rng, SmartPointer< RandomVariable > rand)
Constructor.
Definition: simulatedAnnealing.hpp:76
void setExponentialCooling(double Tstart, double Tend, double param)
Calculates exponential cooling schedule.
Definition: simulatedAnnealing.cpp:31
File contains implementation of RNG generating random variables from uniform distribution.
void setLinearCooling(double Tstart, double Tend, double param)
Calculates linear cooling schedule.
Definition: simulatedAnnealing.cpp:18
std::vector< double > cooling_schedule_
Cooling schedule.
Definition: simulatedAnnealing.hpp:97
Class implements Simulated Annealing minimizer.
Definition: simulatedAnnealing.hpp:72
SmartPointer< UniformRNG > rng_
Random number generator used in acceptance of new state.
Definition: simulatedAnnealing.hpp:96
SmartPointer< RandomVariable > step_
Distribution used in picking of neighbour state.
Definition: simulatedAnnealing.hpp:95
void setCoolingSchedule(const std::vector< double > &cooling_schedule)
Set cooling schedule.
Definition: simulatedAnnealing.cpp:8
~SimulatedAnnealing()
Destructor.
Definition: simulatedAnnealing.hpp:93
double takeStep(double x)
Calculate the new state.
Definition: simulatedAnnealing.cpp:40
double calculate(F f, PA prob_accept, double x_initial, int iters_per_t)
Method finds the minimum of provided function.
Definition: simulatedAnnealing.hpp:109
File contains definition of RandomVariable.