post-val-int.hpp
Go to the documentation of this file.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 namespace Gecode { namespace Int { namespace Branch {
00039
00041 template <class SelView>
00042 void
00043 post(Space& home, ViewArray<IntView>& x, SelView& v,
00044 IntValBranch vals, const ValBranchOptions& o_vals) {
00045 switch (vals) {
00046 case INT_VAL_MIN:
00047 {
00048 ValMin<IntView> a(home,o_vals);
00049 (void) new (home) ViewValBranching<SelView,ValMin<IntView> >
00050 (home,x,v,a);
00051 }
00052 break;
00053 case INT_VAL_MED:
00054 {
00055 ValMed<IntView> a(home,o_vals);
00056 (void) new (home) ViewValBranching<SelView,ValMed<IntView> >
00057 (home,x,v,a);
00058 }
00059 break;
00060 case INT_VAL_MAX:
00061 {
00062 ValMin<MinusView> a(home,o_vals);
00063 (void) new (home) ViewValBranching<SelView,ValMin<MinusView> >
00064 (home,x,v,a);
00065 }
00066 break;
00067 case INT_VAL_RND:
00068 {
00069 ValRnd<IntView> a(home,o_vals);
00070 (void) new (home) ViewValBranching<SelView,ValRnd<IntView> >
00071 (home,x,v,a);
00072 }
00073 break;
00074 case INT_VAL_SPLIT_MIN:
00075 {
00076 ValSplitMin<IntView> a(home,o_vals);
00077 (void) new (home) ViewValBranching<SelView,ValSplitMin<IntView> >
00078 (home,x,v,a);
00079 }
00080 break;
00081 case INT_VAL_SPLIT_MAX:
00082 {
00083 ValSplitMin<MinusView> a(home,o_vals);
00084 (void) new (home) ViewValBranching<SelView,ValSplitMin<MinusView> >
00085 (home,x,v,a);
00086 }
00087 break;
00088 case INT_VALUES_MIN:
00089 (void) new (home) ViewValuesBranching<SelView,IntView>
00090 (home,x,v);
00091 break;
00092 case INT_VALUES_MAX:
00093 (void) new (home) ViewValuesBranching<SelView,MinusView>
00094 (home,x,v);
00095 break;
00096 default:
00097 throw UnknownBranching("Int::branch");
00098 }
00099 }
00100
00101 }}}
00102
00103