src/cpsp/gecode/GC_Search.hh
Go to the documentation of this file.00001 #ifndef GC_SEARCH_HH_ 00002 #define GC_SEARCH_HH_ 00003 00004 00005 namespace cpsp { 00006 namespace gecode { 00007 00009 class IdxIntView : public Gecode::Int::IntView { 00010 protected: 00011 int index; 00012 public: 00013 IdxIntView() : index(-1) {} 00014 IdxIntView(const IdxIntView& toCopy) : IntView(toCopy), index(toCopy.index) {} 00015 IdxIntView(const Gecode::IntVar& x, int idx): IntView(x), index(idx) {} 00016 void update(Gecode::Space* home, bool share, IdxIntView& x) { 00017 Gecode::Int::IntView::update(home, share, x); 00018 index = x.index; 00019 } 00020 int getIndex(void) const {return index;} 00021 }; 00022 00023 typedef IdxIntView MyViewType; 00024 00025 00026 } 00027 } 00028 00029 00030 #endif /*GC_SEARCH_HH_*/