node.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-02 10:59:58 +0200 (Tue, 02 Aug 2005) $ by $Author: schulte $ 00010 * $Revision: 2112 $ 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_NODE_HH__ 00023 #define __GECODE_SEARCH_NODE_HH__ 00024 00025 #include "search.hh" 00026 00027 /* 00028 * Node information 00029 * 00030 */ 00031 00032 namespace Gecode { namespace Search { 00033 00038 class CopyNode { 00039 protected: 00040 Space* _space; 00041 unsigned int _alt; 00042 unsigned int _last; 00043 public: 00044 CopyNode(Space*, unsigned int); 00045 CopyNode(Space*, Space*, unsigned int); 00046 00047 Space* space(void) const; void space(Space*); 00048 unsigned int alt(void) const; void alt(unsigned int); 00049 00050 bool rightmost(void) const; 00051 void next(void); 00052 00053 void dispose(void); 00054 00055 unsigned int share(void); 00056 }; 00057 00058 00063 class ReCoNode : public CopyNode { 00064 protected: 00065 BranchingDesc* _desc; 00066 public: 00067 ReCoNode(Space*, Space*, unsigned int); 00068 00069 BranchingDesc* desc(void) const; void desc(BranchingDesc*); 00070 00071 void dispose(void); 00072 }; 00073 00074 }} 00075 00076 #include "search/node.icc" 00077 00078 #endif 00079 00080 // STATISTICS: search-any