mlpack  1.0.12
exponential_schedule.hpp
Go to the documentation of this file.
1 
14 #ifndef __MLPACK_CORE_OPTIMIZERS_SA_EXPONENTIAL_SCHEDULE_HPP
15 #define __MLPACK_CORE_OPTIMIZERS_SA_EXPONENTIAL_SCHEDULE_HPP
16 
17 namespace mlpack {
18 namespace optimization {
19 
35 {
36  public:
37  /*
38  * Construct the ExponentialSchedule with the given parameter.
39  *
40  * @param lambda Cooling speed.
41  */
42  ExponentialSchedule(const double lambda = 0.001) : lambda(lambda) { }
43 
52  const double currentTemperature,
53  const double /* currentEnergy */)
54  {
55  return (1 - lambda) * currentTemperature;
56  }
57 
59  double Lambda() const { return lambda; }
61  double& Lambda() { return lambda; }
62 
63  private:
65  double lambda;
66 };
67 
68 }; // namespace optimization
69 }; // namespace mlpack
70 
71 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23
double NextTemperature(const double currentTemperature, const double)
Returns the next temperature given current status.
double Lambda() const
Get the cooling speed, lambda.
The exponential cooling schedule cools the temperature T at every step according to the equation...
double & Lambda()
Modify the cooling speed, lambda.