stack.hh
Go to the documentation of this file.00001 /* 00002 * Main authors: 00003 * Christian Schulte <schulte@gecode.org> 00004 * 00005 * Copyright: 00006 * Christian Schulte, 2004 00007 * 00008 * Last modified: 00009 * $Date: 2005-08-09 21:44:53 +0200 (Tue, 09 Aug 2005) $ by $Author: schulte $ 00010 * $Revision: 2192 $ 00011 * 00012 * This file is part of Gecode, the generic constraint 00013 * development environment: 00014 * http://www.gecode.org 00015 * 00016 * See the file "LICENSE" for information on usage and 00017 * redistribution of this file, and for a 00018 * DISCLAIMER OF ALL WARRANTIES. 00019 * 00020 */ 00021 00022 #ifndef __GECODE_SEARCH_RECO_STACK_HH__ 00023 #define __GECODE_SEARCH_RECO_STACK_HH__ 00024 00025 #include "search.hh" 00026 #include "search/node.hh" 00027 #include "support/dynamic-stack.hh" 00028 00029 namespace Gecode { namespace Search { 00030 00035 template <class Node> 00036 class BaseStack : public Support::DynamicStack<Node> { 00037 public: 00038 void reset(void); 00039 }; 00040 00048 class CopyStack : public BaseStack<CopyNode> { 00049 public: 00050 CopyStack(void); 00051 void push(Space*, unsigned int); 00052 }; 00053 00054 00068 class ReCoStack : public BaseStack<ReCoNode> { 00069 private: 00070 const unsigned int a_d; 00071 public: 00072 ReCoStack(unsigned int); 00073 00074 BranchingDesc* push(Space*, Space*, unsigned int); 00075 bool next(FullStatistics&); 00076 Space* recompute(unsigned int&,FullStatistics&); 00077 }; 00078 00079 }} 00080 00081 #include "search/stack.icc" 00082 00083 #endif 00084 00085 // STATISTICS: search-any