dfs.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2009
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef __GECODE_SEARCH_SEQ_DFS_HH__
#define __GECODE_SEARCH_SEQ_DFS_HH__
#include <gecode/search.hh>
#include <gecode/search/support.hh>
#include <gecode/search/worker.hh>
#include <gecode/search/seq/path.hh>
namespace Gecode { namespace Search { namespace Seq {
template<class Tracer>
class DFS : public Worker {
private:
Tracer tracer;
Options opt;
Path<Tracer> path;
Space* cur;
unsigned int d;
public:
DFS(Space* s, const Options& o);
Space* next(void);
Statistics statistics(void) const;
void constrain(const Space& b);
void reset(Space* s);
NoGoods& nogoods(void);
~DFS(void);
};
}}}
#include <gecode/search/seq/dfs.hpp>
#endif
// STATISTICS: search-seq
Gecode::NoGoods
No-goods recorded from restarts.
Definition core.hpp:1588
Gecode::Search::Options
Search engine options
Definition search.hh:746
Gecode::Search::Seq::DFS::next
Space * next(void)
Search for next solution
Definition dfs.hpp:78
Gecode::Search::Seq::DFS::statistics
Statistics statistics(void) const
Return statistics.
Definition dfs.hpp:164
Gecode::Search::Seq::DFS::~DFS
~DFS(void)
Destructor.
Definition dfs.hpp:177
Gecode::Search::Seq::DFS::nogoods
NoGoods & nogoods(void)
Return no-goods.
Definition dfs.hpp:72
Gecode::Search::Seq::DFS::constrain
void constrain(const Space &b)
Constrain future solutions to be better than b (should never be called).
Definition dfs.hpp:170
Gecode::Search::Seq::DFS::DFS
DFS(Space *s, const Options &o)
Initialize for space s with options o.
Definition dfs.hpp:38
Gecode::Search::Seq::Path
Depth-first path (stack of edges) supporting recomputation.
Definition path.hh:60
Gecode::Search::Statistics::reset
void reset(void)
Reset.
Definition statistics.hpp:39
Gecode::Search::Statistics::Statistics
Statistics(void)
Initialize.
Definition statistics.hpp:45
Gecode::Search::Worker::Worker
Worker(void)
Initialize.
Definition worker.hh:70
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::Tracer
Tracer.
Definition tracer.hpp:149
Gecode::Search::Seq
Definition pbs.cpp:36
Gecode::Search
Search engines
Gecode
Gecode toplevel namespace
support.hh
search.hh
dfs.hpp
path.hh
worker.hh