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

Concept for lazy successor generation. More...

#include <state_search_common.H>

Concept definition

template<typename Domain>
concept Aleph::SuccessorGenerator = requires(Domain &d, const typename Domain::State &state) {
typename Domain::State;
typename Domain::Move;
{
d.for_each_successor(state,
[](const typename Domain::Move &) -> bool
{
return true;
})
} -> std::convertible_to<bool>;
}
Minimal requirement for search moves.
Minimal requirement for mutable search states.
Concept for lazy successor generation.
@ Domain
Preserve the order emitted by for_each_successor().

Detailed Description

Concept for lazy successor generation.

A generator exposes nested State and Move types plus for_each_successor(state, visitor). The visitor receives each move and returns true to continue or false to stop early. The generator should propagate that early stop and return a boolean indicating whether traversal completed (true) or was interrupted by the visitor (false).

Definition at line 561 of file state_search_common.H.