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

Minimal contract for branch-and-bound domains. More...

#include <Branch_And_Bound.H>

Concept definition

template<typename Domain>
and requires(Domain &domain, typename Domain::State &state, const typename Domain::Move &move) {
{ domain.apply(state, move) } -> std::same_as<void>;
{ domain.undo(state, move) } -> std::same_as<void>;
}
Minimal contract for branch-and-bound domains.
Concept for complete-solution predicates in optimization domains.
Concept for domains that provide an objective and an optimistic bound.
Minimal requirement for search moves.
Minimal requirement for mutable search states.
Concept for lazy successor generation.
and
Check uniqueness with explicit hash + equality functors.
@ Domain
Preserve the order emitted by for_each_successor().

Detailed Description

Minimal contract for branch-and-bound domains.

The engine assumes a mutable search state and reversible moves:

  • for_each_successor(state, visitor) lazily emits candidate moves,
  • apply(state, move) advances the state.
    Postcondition
    If apply() throws, the state must remain unchanged (strong exception safety).
  • undo(state, move) restores the previous state.
    Postcondition
    undo() should not throw exceptions; it is typically called during normal backtracking or exception stack unwinding.
  • is_complete(state) marks an accepted solution,
  • bound(state) returns an optimistic estimate of the final objective.

Definition at line 278 of file Branch_And_Bound.H.