Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::SupportsBestFirst Concept Reference

Concept that checks whether a search engine supports the Best_First exploration strategy at compile time. More...

#include <state_search_common.H>

Concept definition

template<typename Engine>
concept Aleph::SupportsBestFirst = Engine::supports_best_first
Concept that checks whether a search engine supports the Best_First exploration strategy at compile t...

Detailed Description

Concept that checks whether a search engine supports the Best_First exploration strategy at compile time.

Only Aleph::Branch_And_Bound satisfies this concept. Aleph::Depth_First_Backtracking, Aleph::IDA_Star_State_Search, Aleph::Negamax and Aleph::Alpha_Beta do not — using Best_First with those engines raises std::invalid_argument at runtime. Combining this concept with a static_assert converts that error into a compile-time diagnostic:

// Compile-time check before setting the policy:
"MyEngine does not support Best_First strategy");
Template Parameters
EngineSearch engine type.

Definition at line 243 of file state_search_common.H.