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

This wrapper counts sum of the improvements. It makes sense to use it only when ChooseFirstBetter strategy is applied. More...

#include <custom_components.hpp>

Public Member Functions

 compute_gain_wrapper (compute_gain_wrapper gain, ValueType &val)
 Constructor. More...
 
template<typename... Args>
ValueType operator() (Args &&...args)
 forwards args to original gain. Sum up the improvements. More...
 
ValueType get_val () const
 Returns sum of the improvements. More...
 

Detailed Description

template<typename Gain, typename ValueType>
struct paal::local_search::compute_gain_wrapper< Gain, ValueType >

This wrapper counts sum of the improvements. It makes sense to use it only when ChooseFirstBetter strategy is applied.

Template Parameters
Gain
ValueType

Definition at line 219 of file custom_components.hpp.

Constructor & Destructor Documentation

template<typename Gain , typename ValueType >
paal::local_search::compute_gain_wrapper< Gain, ValueType >::compute_gain_wrapper ( compute_gain_wrapper< Gain, ValueType >  gain,
ValueType &  val 
)
inline

Constructor.

Parameters
gain
val

Definition at line 226 of file custom_components.hpp.

Member Function Documentation

template<typename Gain , typename ValueType >
ValueType paal::local_search::compute_gain_wrapper< Gain, ValueType >::get_val ( ) const
inline

Returns sum of the improvements.

Returns

Definition at line 248 of file custom_components.hpp.

template<typename Gain , typename ValueType >
template<typename... Args>
ValueType paal::local_search::compute_gain_wrapper< Gain, ValueType >::operator() ( Args &&...  args)
inline

forwards args to original gain. Sum up the improvements.

Template Parameters
Args
Parameters
args
Returns

Definition at line 237 of file custom_components.hpp.


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