3
* Christian Schulte <schulte@gecode.org>
6
* Christian Schulte, 2004
9
* $Date: 2005-08-09 21:44:53 +0200 (Tue, 09 Aug 2005) $ by $Author: schulte $
12
* This file is part of Gecode, the generic constraint
13
* development environment:
14
* http://www.gecode.org
16
* See the file "LICENSE" for information on usage and
17
* redistribution of this file, and for a
18
* DISCLAIMER OF ALL WARRANTIES.
24
#include "search/dfs-copy.hh"
26
namespace Gecode { namespace Search {
28
DfsCopyEngine::~DfsCopyEngine(void) {
34
DfsCopyEngine::reset(Space* s) {
38
FullStatistics::reset(s);
42
DfsCopyEngine::stacksize(void) const {
47
DfsCopyEngine::explore(void) {
52
unsigned int alt = ds.top().alt();
53
if (ds.top().rightmost()) {
54
cur = ds.pop().space();
55
FullStatistics::pop(cur);
58
cur = ds.top().space()->clone(true,propagate);
62
cur->commit(alt,NULL,propagate);
63
FullStatistics::current(cur);
66
switch (cur->status(alt,propagate)) {
71
FullStatistics::current(NULL);
77
FullStatistics::current(NULL);
83
FullStatistics::push(ds.top().space());
87
cur->commit(0,NULL,propagate);
96
// STATISTICS: search-any