Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0

Depth-first branch-and-bound search engine. More...

#include <search.hh>

Public Member Functions

 BAB (T *s, const Search::Options &o=Search::Options::def)
 Initialize engine for space s and options o.
Public Member Functions inherited from Gecode::Search::Base< T >
virtual T * next (void)
 Return next solution (NULL, if none exists or search has been stopped)
virtual Statistics statistics (void) const
 Return statistics.
virtual bool stopped (void) const
 Check whether engine has been stopped.
virtual ~Base (void)
 Destructor.

Static Public Attributes

static const bool best = true
 Whether engine does best solution search.

Additional Inherited Members

Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management.
static void operator delete (void *p)
 Free memory allocated from heap.
Protected Member Functions inherited from Gecode::Search::Base< T >
 Base (Engine *e=NULL)
 Constructor.
Protected Attributes inherited from Gecode::Search::Base< T >
Enginee
 The actual search engine.

Detailed Description

template<class T>
class Gecode::BAB< T >

Depth-first branch-and-bound search engine.

Additionally, s must implement a member function

virtual void constrain(const T& t)

Whenever exploration requires to add a constraint to the space c currently being explored, the engine executes c.constrain(t) where t is the so-far best solution.

Definition at line 1070 of file search.hh.

Constructor & Destructor Documentation

◆ BAB()

template<class T>
Gecode::BAB< T >::BAB ( T * s,
const Search::Options & o = Search::Options::def )
inline

Initialize engine for space s and options o.

Definition at line 72 of file bab.hpp.

Member Data Documentation

◆ best

template<class T>
const bool Gecode::BAB< T >::best = true
static

Whether engine does best solution search.

Definition at line 1075 of file search.hh.


The documentation for this class was generated from the following files: