All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Public Member Functions | List of all members
paal::local_search::record_solution_commit_adapter< Commit, Solution, Comparator > Struct Template Reference

This is adaptor on Commit which allows to record solution basing on condition It is particularly useful in tabu search and simulated annealing in which we'd like to store the best found solution. More...

#include <custom_components.hpp>

Public Member Functions

 record_solution_commit_adapter (Solution &solution, Commit commit=Commit{}, Comparator comparator=Comparator{})
 constructor More...
 
template<typename Move >
bool operator() (Solution &sol, const Move &move)
 operator More...
 
const Solution & get_solution () const
 Access to the stored solution (const version) More...
 
Solution & get_solution ()
 Access to the stored solution (non-const version) More...
 

Detailed Description

template<typename Commit, typename Solution, typename Comparator = utils::less>
struct paal::local_search::record_solution_commit_adapter< Commit, Solution, Comparator >

This is adaptor on Commit which allows to record solution basing on condition It is particularly useful in tabu search and simulated annealing in which we'd like to store the best found solution.

Template Parameters
Commit
Solution
Comparator

Definition at line 339 of file custom_components.hpp.

Constructor & Destructor Documentation

template<typename Commit, typename Solution, typename Comparator = utils::less>
paal::local_search::record_solution_commit_adapter< Commit, Solution, Comparator >::record_solution_commit_adapter ( Solution &  solution,
Commit  commit = Commit{},
Comparator  comparator = Comparator{} 
)
inline

constructor

Parameters
solution
commit
comparator

Definition at line 348 of file custom_components.hpp.

Member Function Documentation

template<typename Commit, typename Solution, typename Comparator = utils::less>
const Solution& paal::local_search::record_solution_commit_adapter< Commit, Solution, Comparator >::get_solution ( ) const
inline

Access to the stored solution (const version)

Returns

Definition at line 373 of file custom_components.hpp.

template<typename Commit, typename Solution, typename Comparator = utils::less>
Solution& paal::local_search::record_solution_commit_adapter< Commit, Solution, Comparator >::get_solution ( )
inline

Access to the stored solution (non-const version)

Returns

Definition at line 380 of file custom_components.hpp.

template<typename Commit, typename Solution, typename Comparator = utils::less>
template<typename Move >
bool paal::local_search::record_solution_commit_adapter< Commit, Solution, Comparator >::operator() ( Solution &  sol,
const Move move 
)
inline

operator

Template Parameters
Move
Parameters
sol
move

Definition at line 360 of file custom_components.hpp.


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