00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GC_FIRSTSOLBRANCHING_HH_
00021 #define GC_FIRSTSOLBRANCHING_HH_
00022
00023 #include <gecode/kernel.hh>
00024
00025
00026 namespace cpsp
00027 {
00028 namespace gecode
00029 {
00030
00031 int solutionLvl;
00032
00037 template <class View, class Val, class ViewSel, class ValSel>
00038 class FirstSolBranching : public Gecode::ViewValBranching<View,Val,ViewSel,ValSel> {
00039 protected:
00041 mutable bool firstSolFound;
00042
00044
00046 mutable int myLvl;
00047
00048 using Gecode::ViewValBranching<View,Val,ViewSel,ValSel>::x;
00049
00050 FirstSolBranching(Gecode::Space* home, bool share, FirstSolBranching& b);
00051 public:
00053 FirstSolBranching(Gecode::Space* home, Gecode::ViewArray<View>& x);
00054
00056 virtual bool
00057 status(const Gecode::Space* home) const;
00058
00060 virtual Gecode::Actor*
00061 copy(Gecode::Space* home, bool share);
00062
00064 virtual Gecode::ExecStatus
00065 commit(Gecode::Space* home, const Gecode::BranchingDesc* d, unsigned int a);
00066 };
00067
00068 #include "cpsp/gecode/GC_FirstSolBranching.icc"
00069
00070 }
00071 }
00072
00073
00074 #endif