# VynceCook/quacode

Update to match last gecode trunk version

Vincent Barichard committed Oct 17, 2016
1 parent eda5af2 commit 5365557509afdf71a9eed1242bba408d31797bde
 @@ -123,12 +123,7 @@ class ConnectFourOptions : public Options { /// Succeed the space static void gf_success(Space& home) { Space::Branchers b(home); while (b()) { BrancherHandle bh(b.brancher()); ++b; bh.kill(home); } Home(home).branchergroup().kill(home); } /// Dummy function
 @@ -100,12 +100,7 @@ class NimFiboOptions : public Options { /// Succeed the space static void gf_success(Space& home) { Space::Branchers b(home); while (b()) { BrancherHandle bh(b.brancher()); ++b; bh.kill(home); } Home(home).branchergroup().kill(home); } /// Dummy function @@ -156,14 +151,14 @@ class QCSPNimFibo : public Script, public QSpaceInfo { // Adding Cut if (opt.cut()) cut(*this, cutExpr1 && cutExpr2 && !(o1 && o2)); // Universal player can't play cutExpr1 = cutExpr1 && o1; branch(*this, X[i], INT_VAR_NONE(), INT_VAL_MIN()); } else { // Existantial Player rel(*this, o_im1 == (o1 && o2 && oi)); branch(*this, X[i], INT_VAR_NONE(), INT_VAL_MIN()); } cutExpr1 = cutExpr1 && o1; cutExpr2 = o2; cutExpr2 = o1; o_im1 = oi; } }
 @@ -409,6 +409,8 @@ namespace Gecode { namespace Int { namespace Bool { virtual Actor* copy(Space& home, bool share); /// Give advice to propagator virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d); /// Schedule function virtual void reschedule(Space& home); /// Cost function (defined as low unary) virtual PropCost cost(const Space& home, const ModEventDelta& med) const; /// Perform propagation
 @@ -414,6 +414,24 @@ namespace Gecode { namespace Int { namespace Bool { return ES_NOFIX; } template void QClause::reschedule(Space& home) { z.reschedule(home,*this,PC_BOOL_VAL); if (n_zero == x.size() + y.size()) VX::schedule(home,*this,ME_BOOL_VAL); for (int i=x.size(); i--; ) if (x[i].one()) { VX::schedule(home,*this,ME_BOOL_VAL); return; } for (int i=y.size(); i--; ) if (y[i].one()) { VX::schedule(home,*this,ME_BOOL_VAL); return; } } template ExecStatus QClause::propagate(Space& home, const ModEventDelta&) {
 @@ -662,25 +662,24 @@ namespace Gecode { } template forceinline void QSpaceInfo::doubleChoice (const Space &home, const BrancherHandle& bh, unsigned int, void QSpaceInfo::doubleChoice (const Space &home, const Brancher& bh, unsigned int, VarType x, int pos, const int&, std::ostream& ) { const QSpaceInfo& qsi = dynamic_cast(home); if (qsi.bRecordStrategy) const_cast(qsi).sharedInfo.scenarioChoice(bh.id(),pos,x.min(),x.max()); if (qsi.bRecordStrategy) const_cast(qsi).sharedInfo.scenarioChoice(bh.id(),pos,x.min(),x.max()); } template<> forceinline void QSpaceInfo::runCustomChoice (const Space &home, const BrancherHandle& bh, void QSpaceInfo::runCustomChoice (const Space &home, const Brancher& bh, unsigned int alt, BoolVar x, int pos, const int& val, std::ostream& os) { assert(QSpaceInfo::customBoolVVP); (*QSpaceInfo::customBoolVVP)(home,bh,alt,x,pos,val,os); } template<> forceinline void QSpaceInfo::runCustomChoice (const Space &home, const BrancherHandle& bh, template<> forceinline void QSpaceInfo::runCustomChoice (const Space &home, const Brancher& bh, unsigned int alt, IntVar x, int pos, const int& val, std::ostream& os) { @@ -689,7 +688,7 @@ namespace Gecode { } template forceinline void QSpaceInfo::tripleChoice (const Space &home, const BrancherHandle& bh, void QSpaceInfo::tripleChoice (const Space &home, const Brancher& bh, unsigned int alt, VarType x, int pos, const int& val, std::ostream& os) {