This adaptor takes Gain functor and adopts it to simulated annealing. For each move, if it has positive gain it is chosen otherwise the move is chosen wit probability e^(movesGain/Temperature). Temperature is given by getTemperature functor.
More...
#include <simulated_annealing.hpp>
|
struct | is_chosen |
| This object represents Delta computed by gain and the decision if the object is taken or not. More...
|
|
|
| simulated_annealing_gain_adaptor (Gain gain, GetTemperature getTemperature, random_generator rand=random_generator()) |
| constructor More...
|
|
template<typename... Args> |
auto | operator() (Args &&...args) -> is_chosen< typename std::result_of< Gain(Args...)>::type > |
| operator(), returns original gain with information indicating if the move is chosen More...
|
|
template<typename Gain, typename GetTemperature, typename random_generator = std::default_random_engine>
struct paal::local_search::simulated_annealing_gain_adaptor< Gain, GetTemperature, random_generator >
This adaptor takes Gain functor and adopts it to simulated annealing. For each move, if it has positive gain it is chosen otherwise the move is chosen wit probability e^(movesGain/Temperature). Temperature is given by getTemperature functor.
- Template Parameters
-
Gain | |
GetTemperature | |
random_generator | |
Definition at line 246 of file simulated_annealing.hpp.
template<typename Gain , typename GetTemperature , typename random_generator = std::default_random_engine>
template<typename Gain , typename GetTemperature , typename random_generator = std::default_random_engine>
template<typename... Args>
operator(), returns original gain with information indicating if the move is chosen
- Template Parameters
-
- Parameters
-
- Returns
Definition at line 354 of file simulated_annealing.hpp.
The documentation for this struct was generated from the following file: