16 #ifndef PAAL_LOCAL_SEARCH_CONCEPTS_HPP
17 #define PAAL_LOCAL_SEARCH_CONCEPTS_HPP
22 #include <boost/concept_check.hpp>
24 #include <type_traits>
30 template <
typename Functor,
typename Solution,
typename SearchComponents>
34 typedef typename move_type<SearchComponents, Solution>::value_type Move;
38 template <
typename X,
typename Solution,
typename SearchComponents>
41 auto i = this->functor(this->s);
42 auto b = std::begin(i);
44 for (
auto x = b; x != e; ++x) {
46 boost::ignore_unused_variable_warning(uu);
51 template <
typename X,
typename Solution,
typename SearchComponents>
53 BOOST_CONCEPT_USAGE(
gain) {
54 boost::ignore_unused_variable_warning(this->functor(this->s, this->u) > this->functor(this->s, this->u));
58 template <
typename X,
typename Solution,
typename SearchComponents>
60 BOOST_CONCEPT_USAGE(
commit) {
61 bool b = this->functor(this->s, this->u);
62 boost::ignore_unused_variable_warning(b);
68 typedef typename Traits::GetMovesT NG;
69 typedef typename Traits::GainT IC;
70 typedef typename Traits::CommitT SU;
82 #endif // PAAL_LOCAL_SEARCH_CONCEPTS_HPP
Traits class for search_components.
bool local_search(Solution &solution, SearchStrategy searchStrategy, ContinueOnSuccess succ, ContinueOnFail fail, components...comps)
detail