All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Classes | Public Member Functions | List of all members
paal::local_search::simulated_annealing_gain_adaptor< Gain, GetTemperature, random_generator > Struct Template Reference

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>

Classes

struct  is_chosen
 This object represents Delta computed by gain and the decision if the object is taken or not. More...
 

Public Member Functions

 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

template<typename Gain , typename GetTemperature , typename random_generator = std::default_random_engine>
paal::local_search::simulated_annealing_gain_adaptor< Gain, GetTemperature, random_generator >::simulated_annealing_gain_adaptor ( Gain  gain,
GetTemperature  getTemperature,
random_generator  rand = random_generator() 
)
inline

constructor

Parameters
gain
getTemperature
rand

Definition at line 256 of file simulated_annealing.hpp.

Member Function Documentation

template<typename Gain , typename GetTemperature , typename random_generator = std::default_random_engine>
template<typename... Args>
auto paal::local_search::simulated_annealing_gain_adaptor< Gain, GetTemperature, random_generator >::operator() ( Args &&...  args) -> is_chosen<typename std::result_of<Gain(Args...)>::type>
inline

operator(), returns original gain with information indicating if the move is chosen

Template Parameters
Args
Parameters
args
Returns

Definition at line 354 of file simulated_annealing.hpp.


The documentation for this struct was generated from the following file: