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& 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& 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& 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& 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& 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 MeritActivitySize : public MeritBase<FloatView,double> {
00158 protected:
00160 Activity activity;
00161 public:
00163 MeritActivitySize(Space& home, const VarBranch& vb);
00165 MeritActivitySize(Space& home, bool shared, MeritActivitySize& m);
00167 double operator ()(const Space& home, FloatView x, int i);
00169 bool notice(void) const;
00171 void dispose(Space& home);
00172 };
00173
00174 }}}
00175
00176 #include <gecode/float/branch/merit.hpp>
00177
00178 namespace Gecode { namespace Float { namespace Branch {
00179
00181 GECODE_FLOAT_EXPORT
00182 ViewSel<FloatView>* viewsel(Space& home, const FloatVarBranch& fvb);
00183
00184 }}}
00185
00186 namespace Gecode { namespace Float { namespace Branch {
00187
00206 class ValSelLq : public ValSel<FloatView,FloatNumBranch> {
00207 public:
00209 ValSelLq(Space& home, const ValBranch& vb);
00211 ValSelLq(Space& home, bool shared, ValSelLq& vs);
00213 FloatNumBranch val(const Space& home, FloatView x, int i);
00214 };
00215
00222 class ValSelGq : public ValSel<FloatView,FloatNumBranch> {
00223 public:
00225 ValSelGq(Space& home, const ValBranch& vb);
00227 ValSelGq(Space& home, bool shared, ValSelGq& vs);
00229 FloatNumBranch val(const Space& home, FloatView x, int i);
00230 };
00231
00238 class ValSelRnd : public ValSel<FloatView,FloatNumBranch> {
00239 protected:
00241 Rnd r;
00242 public:
00244 ValSelRnd(Space& home, const ValBranch& vb);
00246 ValSelRnd(Space& home, bool shared, ValSelRnd& vs);
00248 FloatNumBranch val(const Space& home, FloatView x, int i);
00250 bool notice(void) const;
00252 void dispose(Space& home);
00253 };
00254
00255 }}}
00256
00257 #include <gecode/float/branch/val-sel.hpp>
00258
00259 namespace Gecode { namespace Float { namespace Branch {
00260
00279 class ValCommitLqGq : public ValCommit<FloatView,FloatVal> {
00280 public:
00282 ValCommitLqGq(Space& home, const ValBranch& vb);
00284 ValCommitLqGq(Space& home, bool shared, ValCommitLqGq& vc);
00286 ModEvent commit(Space& home, unsigned int a, FloatView x, int i,
00287 FloatNumBranch n);
00289 NGL* ngl(Space& home, unsigned int a, FloatView x, FloatNumBranch n) const;
00291 void print(const Space& home, unsigned int a, FloatView x, int i,
00292 FloatNumBranch n,
00293 std::ostream& o) const;
00294 };
00295
00296 }}}
00297
00298 #include <gecode/float/branch/val-commit.hpp>
00299
00300 namespace Gecode { namespace Float { namespace Branch {
00301
00303 GECODE_FLOAT_EXPORT
00304 ValSelCommitBase<FloatView,FloatNumBranch>*
00305 valselcommit(Space& home, const FloatValBranch& svb);
00306
00308 GECODE_FLOAT_EXPORT
00309 ValSelCommitBase<FloatView,FloatNumBranch>*
00310 valselcommit(Space& home, const FloatAssign& ia);
00311
00312 }}}
00313
00314 #endif
00315
00316