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 #ifndef __GECODE_FLOAT_BRANCH_HH__
00037 #define __GECODE_FLOAT_BRANCH_HH__
00038
00039 #include <gecode/float.hh>
00040
00046 namespace Gecode { namespace Float { namespace Branch {
00047
00066 class MeritMin : public MeritBase<FloatView,double> {
00067 public:
00069 MeritMin(Space& home, const VarBranch<Var>& vb);
00071 MeritMin(Space& home, MeritMin& m);
00073 double operator ()(const Space& home, FloatView x, int i);
00074 };
00075
00082 class MeritMax : public MeritBase<FloatView,double> {
00083 public:
00085 MeritMax(Space& home, const VarBranch<Var>& vb);
00087 MeritMax(Space& home, MeritMax& m);
00089 double operator ()(const Space& home, FloatView x, int i);
00090 };
00091
00098 class MeritSize : public MeritBase<FloatView,double> {
00099 public:
00101 MeritSize(Space& home, const VarBranch<Var>& vb);
00103 MeritSize(Space& home, MeritSize& m);
00105 double operator ()(const Space& home, FloatView x, int i);
00106 };
00107
00114 class MeritDegreeSize : public MeritBase<FloatView,double> {
00115 public:
00117 MeritDegreeSize(Space& home, const VarBranch<Var>& vb);
00119 MeritDegreeSize(Space& home, MeritDegreeSize& m);
00121 double operator ()(const Space& home, FloatView x, int i);
00122 };
00123
00130 class MeritAFCSize : public MeritBase<FloatView,double> {
00131 protected:
00133 AFC afc;
00134 public:
00136 MeritAFCSize(Space& home, const VarBranch<Var>& vb);
00138 MeritAFCSize(Space& home, MeritAFCSize& m);
00140 double operator ()(const Space& home, FloatView x, int i);
00142 bool notice(void) const;
00144 void dispose(Space& home);
00145 };
00146
00153 class MeritActionSize : public MeritBase<FloatView,double> {
00154 protected:
00156 Action action;
00157 public:
00159 MeritActionSize(Space& home, const VarBranch<Var>& vb);
00161 MeritActionSize(Space& home, MeritActionSize& m);
00163 double operator ()(const Space& home, FloatView x, int i);
00165 bool notice(void) const;
00167 void dispose(Space& home);
00168 };
00169
00176 class MeritCHBSize : public MeritBase<FloatView,double> {
00177 protected:
00179 CHB chb;
00180 public:
00182 MeritCHBSize(Space& home, const VarBranch<Var>& vb);
00184 MeritCHBSize(Space& home, MeritCHBSize& m);
00186 double operator ()(const Space& home, FloatView x, int i);
00188 bool notice(void) const;
00190 void dispose(Space& home);
00191 };
00192
00193 }}}
00194
00195 #include <gecode/float/branch/merit.hpp>
00196
00197 namespace Gecode { namespace Float { namespace Branch {
00198
00200 GECODE_FLOAT_EXPORT
00201 ViewSel<FloatView>* viewsel(Space& home, const FloatVarBranch& fvb);
00202
00203 }}}
00204
00205 namespace Gecode { namespace Float { namespace Branch {
00206
00225 class ValSelLq : public ValSel<FloatView,FloatNumBranch> {
00226 public:
00228 ValSelLq(Space& home, const ValBranch<Var>& vb);
00230 ValSelLq(Space& home, ValSelLq& vs);
00232 FloatNumBranch val(const Space& home, FloatView x, int i);
00233 };
00234
00241 class ValSelGq : public ValSel<FloatView,FloatNumBranch> {
00242 public:
00244 ValSelGq(Space& home, const ValBranch<Var>& vb);
00246 ValSelGq(Space& home, ValSelGq& vs);
00248 FloatNumBranch val(const Space& home, FloatView x, int i);
00249 };
00250
00257 class ValSelRnd : public ValSel<FloatView,FloatNumBranch> {
00258 protected:
00260 Rnd r;
00261 public:
00263 ValSelRnd(Space& home, const ValBranch<Var>& vb);
00265 ValSelRnd(Space& home, ValSelRnd& vs);
00267 FloatNumBranch val(const Space& home, FloatView x, int i);
00269 bool notice(void) const;
00271 void dispose(Space& home);
00272 };
00273
00274 }}}
00275
00276 #include <gecode/float/branch/val-sel.hpp>
00277
00278 namespace Gecode { namespace Float { namespace Branch {
00279
00298 class ValCommitLqGq : public ValCommit<FloatView,FloatVal> {
00299 public:
00301 ValCommitLqGq(Space& home, const ValBranch<Var>& vb);
00303 ValCommitLqGq(Space& home, ValCommitLqGq& vc);
00305 ModEvent commit(Space& home, unsigned int a, FloatView x, int i,
00306 FloatNumBranch n);
00308 NGL* ngl(Space& home, unsigned int a, FloatView x, FloatNumBranch n) const;
00310 void print(const Space& home, unsigned int a, FloatView x, int i,
00311 FloatNumBranch n,
00312 std::ostream& o) const;
00313 };
00314
00315 }}}
00316
00317 #include <gecode/float/branch/val-commit.hpp>
00318
00319 namespace Gecode { namespace Float { namespace Branch {
00320
00322 GECODE_FLOAT_EXPORT
00323 ValSelCommitBase<FloatView,FloatNumBranch>*
00324 valselcommit(Space& home, const FloatValBranch& svb);
00325
00327 GECODE_FLOAT_EXPORT
00328 ValSelCommitBase<FloatView,FloatNumBranch>*
00329 valselcommit(Space& home, const FloatAssign& ia);
00330
00331 }}}
00332
00333 #endif
00334
00335