Go to the documentation of this file.
38 #ifndef __GECODE_SEARCH_SEQUENTIAL_DFS_HH__
39 #define __GECODE_SEARCH_SEQUENTIAL_DFS_HH__
46 namespace Gecode {
namespace Search {
namespace Sequential {
125 while (cur == NULL) {
134 switch (cur->
status(*
this)) {
153 if ((d == 0) || (d >= opt.
c_d)) {
Space * next(void)
Search for next solution
void reset(void)
Reset stack.
@ SS_SOLVED
Space is solved (no brancher left)
Space * clone(bool share_data=true, bool share_info=true, CloneStatistics &stat=unused_clone) const
Clone space.
const Choice * choice(void)
Create new choice for current brancher.
bool stop(const Options &o)
Check whether engine must be stopped.
unsigned long int fail
Number of failed nodes in search tree.
void next(void)
Generate path for next node.
const Choice * push(Worker &stat, Space *s, Space *c)
Push space c (a clone of s or NULL)
@ SS_BRANCH
Space must be branched (at least one brancher left)
void commit(const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
Commit choice c for alternative a.
Statistics statistics(void) const
Return statistics.
Space * recompute(unsigned int &d, unsigned int a_d, Worker &s)
Recompute space according to path.
Gecode toplevel namespace
unsigned long int node
Number of nodes expanded.
No-goods recorded from restarts.
unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance)
DFS(Space *s, const Options &o)
Initialize for space s with options o.
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
const unsigned int nogoods_limit
Depth limit for no-good generation during search.
NoGoods & nogoods(void)
Return no-goods.
Space * snapshot(Space *s, const Options &o, bool share=true)
Clone space s dependening on options o.
Depth-first search engine implementation.
unsigned int c_d
Create a clone after every c_d commits (commit distance)
bool empty(void) const
Test whether path is empty.
#define GECODE_NEVER
Assert that this command is never executed.
void constrain(const Space &b)
Constrain future solutions to be better than b (should never be called)
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
Depth-first path (stack of edges) supporting recomputation.
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl)
Post propagator such that x forms a Hamiltonian path.
void start(void)
Reset stop information.
Gecode::FloatVal c(-8, 8)
Choice for performing commit
bool clone
Whether engines create a clone when being initialized.
@ SS_FAILED
Space is failed