00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef __GECODE_FLOAT_BRANCH_HH__
00041 #define __GECODE_FLOAT_BRANCH_HH__
00042
00043 #include <gecode/float.hh>
00044
00050 namespace Gecode { namespace Float { namespace Branch {
00051
00070 class MeritMin : public MeritBase<FloatView,double> {
00071 public:
00073 MeritMin(Space& home, const VarBranch<Var>& vb);
00075 MeritMin(Space& home, bool shared, MeritMin& m);
00077 double operator ()(const Space& home, FloatView x, int i);
00078 };
00079
00086 class MeritMax : public MeritBase<FloatView,double> {
00087 public:
00089 MeritMax(Space& home, const VarBranch<Var>& vb);
00091 MeritMax(Space& home, bool shared, MeritMax& m);
00093 double operator ()(const Space& home, FloatView x, int i);
00094 };
00095
00102 class MeritSize : public MeritBase<FloatView,double> {
00103 public:
00105 MeritSize(Space& home, const VarBranch<Var>& vb);
00107 MeritSize(Space& home, bool shared, MeritSize& m);
00109 double operator ()(const Space& home, FloatView x, int i);
00110 };
00111
00118 class MeritDegreeSize : public MeritBase<FloatView,double> {
00119 public:
00121 MeritDegreeSize(Space& home, const VarBranch<Var>& vb);
00123 MeritDegreeSize(Space& home, bool shared, MeritDegreeSize& m);
00125 double operator ()(const Space& home, FloatView x, int i);
00126 };
00127
00134 class MeritAFCSize : public MeritBase<FloatView,double> {
00135 protected:
00137 AFC afc;
00138 public:
00140 MeritAFCSize(Space& home, const VarBranch<Var>& vb);
00142 MeritAFCSize(Space& home, bool shared, MeritAFCSize& m);
00144 double operator ()(const Space& home, FloatView x, int i);
00146 bool notice(void) const;
00148 void dispose(Space& home);
00149 };
00150
00157 class MeritActionSize : public MeritBase<FloatView,double> {
00158 protected:
00160 Action action;
00161 public:
00163 MeritActionSize(Space& home, const VarBranch<Var>& vb);
00165 MeritActionSize(Space& home, bool shared, MeritActionSize& m);
00167 double operator ()(const Space& home, FloatView x, int i);
00169 bool notice(void) const;
00171 void dispose(Space& home);
00172 };
00173
00180 class MeritCHBSize : public MeritBase<FloatView,double> {
00181 protected:
00183 CHB chb;
00184 public:
00186 MeritCHBSize(Space& home, const VarBranch<Var>& vb);
00188 MeritCHBSize(Space& home, bool shared, MeritCHBSize& m);
00190 double operator ()(const Space& home, FloatView x, int i);
00192 bool notice(void) const;
00194 void dispose(Space& home);
00195 };
00196
00197 }}}
00198
00199 #include <gecode/float/branch/merit.hpp>
00200
00201 namespace Gecode { namespace Float { namespace Branch {
00202
00204 GECODE_FLOAT_EXPORT
00205 ViewSel<FloatView>* viewsel(Space& home, const FloatVarBranch& fvb);
00206
00207 }}}
00208
00209 namespace Gecode { namespace Float { namespace Branch {
00210
00229 class ValSelLq : public ValSel<FloatView,FloatNumBranch> {
00230 public:
00232 ValSelLq(Space& home, const ValBranch<Var>& vb);
00234 ValSelLq(Space& home, bool shared, ValSelLq& vs);
00236 FloatNumBranch val(const Space& home, FloatView x, int i);
00237 };
00238
00245 class ValSelGq : public ValSel<FloatView,FloatNumBranch> {
00246 public:
00248 ValSelGq(Space& home, const ValBranch<Var>& vb);
00250 ValSelGq(Space& home, bool shared, ValSelGq& vs);
00252 FloatNumBranch val(const Space& home, FloatView x, int i);
00253 };
00254
00261 class ValSelRnd : public ValSel<FloatView,FloatNumBranch> {
00262 protected:
00264 Rnd r;
00265 public:
00267 ValSelRnd(Space& home, const ValBranch<Var>& vb);
00269 ValSelRnd(Space& home, bool shared, ValSelRnd& vs);
00271 FloatNumBranch val(const Space& home, FloatView x, int i);
00273 bool notice(void) const;
00275 void dispose(Space& home);
00276 };
00277
00278 }}}
00279
00280 #include <gecode/float/branch/val-sel.hpp>
00281
00282 namespace Gecode { namespace Float { namespace Branch {
00283
00302 class ValCommitLqGq : public ValCommit<FloatView,FloatVal> {
00303 public:
00305 ValCommitLqGq(Space& home, const ValBranch<Var>& vb);
00307 ValCommitLqGq(Space& home, bool shared, ValCommitLqGq& vc);
00309 ModEvent commit(Space& home, unsigned int a, FloatView x, int i,
00310 FloatNumBranch n);
00312 NGL* ngl(Space& home, unsigned int a, FloatView x, FloatNumBranch n) const;
00314 void print(const Space& home, unsigned int a, FloatView x, int i,
00315 FloatNumBranch n,
00316 std::ostream& o) const;
00317 };
00318
00319 }}}
00320
00321 #include <gecode/float/branch/val-commit.hpp>
00322
00323 namespace Gecode { namespace Float { namespace Branch {
00324
00326 GECODE_FLOAT_EXPORT
00327 ValSelCommitBase<FloatView,FloatNumBranch>*
00328 valselcommit(Space& home, const FloatValBranch& svb);
00329
00331 GECODE_FLOAT_EXPORT
00332 ValSelCommitBase<FloatView,FloatNumBranch>*
00333 valselcommit(Space& home, const FloatAssign& ia);
00334
00335 }}}
00336
00337 #endif
00338
00339