MLPACK  1.0.10
exponential_schedule.hpp
Go to the documentation of this file.
1 
22 #ifndef __MLPACK_CORE_OPTIMIZERS_SA_EXPONENTIAL_SCHEDULE_HPP
23 #define __MLPACK_CORE_OPTIMIZERS_SA_EXPONENTIAL_SCHEDULE_HPP
24 
25 namespace mlpack {
26 namespace optimization {
27 
43 {
44  public:
45  /*
46  * Construct the ExponentialSchedule with the given parameter.
47  *
48  * @param lambda Cooling speed.
49  */
50  ExponentialSchedule(const double lambda = 0.001) : lambda(lambda) { }
51 
60  const double currentTemperature,
61  const double /* currentEnergy */)
62  {
63  return (1 - lambda) * currentTemperature;
64  }
65 
67  double Lambda() const { return lambda; }
69  double& Lambda() { return lambda; }
70 
71  private:
73  double lambda;
74 };
75 
76 }; // namespace optimization
77 }; // namespace mlpack
78 
79 #endif