ldsb.hh
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 #ifndef __GECODE_SET_LDSB_HH__
00039 #define __GECODE_SET_LDSB_HH__
00040
00041 #include <gecode/set.hh>
00042 #include <gecode/int/ldsb.hh>
00043
00048 namespace Gecode { namespace Set { namespace LDSB {
00049
00050 using namespace Int::LDSB;
00051
00060 template<class View, int n, class Val, unsigned int a>
00061 class LDSBSetBrancher : public LDSBBrancher<View,n,Val,a> {
00062 public:
00064 typedef void (*VarValPrint)(const Space& home, const BrancherHandle& bh,
00065 unsigned int b,
00066 typename View::VarType x, int i,
00067 const Val& m,
00068 std::ostream& o);
00070 int _prevPos;
00072 int _nNonValueSymmetries;
00074 int _nValueSymmetries;
00077 ValueSymmetryImp<View>** _copiedSyms;
00079 int _nCopiedSyms;
00081 IntSet _leftBranchValues;
00090 bool _stable;
00091
00093 LDSBSetBrancher(Space& home, bool share, LDSBSetBrancher& b);
00095 LDSBSetBrancher(Home home,
00096 ViewArray<View>& x,
00097 ViewSel<View>* vs[n],
00098 ValSelCommitBase<View,Val>* vsc,
00099 SymmetryImp<View>** syms, int nsyms,
00100 SetBranchFilter bf,
00101 VarValPrint vvp);
00103 virtual const Choice* choice(Space& home);
00105 virtual ExecStatus commit(Space& home, const Choice& c, unsigned int b);
00107 virtual Actor* copy(Space& home, bool share);
00109 static BrancherHandle post(Home home,
00110 ViewArray<View>& x,
00111 ViewSel<View>* vs[n],
00112 ValSelCommitBase<View,Val>* vsc,
00113 SymmetryImp<View>** _syms,
00114 int _nsyms,
00115 SetBranchFilter bf,
00116 VarValPrint vvp);
00117
00126 void updatePart1(Space& home, int choicePos);
00127 };
00128
00129 }}}
00130
00131 namespace Gecode { namespace Int { namespace LDSB {
00132 template <>
00133 ArgArray<Literal>
00134 VariableSequenceSymmetryImp<Set::SetView>
00135 ::symmetric(Literal l, const ViewArray<Set::SetView>& x) const;
00136 }}}
00137
00138 #include <gecode/set/ldsb/brancher.hpp>
00139
00140 #endif
00141
00142