disjoint.icc
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 namespace Gecode { namespace Set { namespace Select {
00025
00026 forceinline
00027 SelectDisjoint::SelectDisjoint(Space* home,
00028 IdxViewArray<SetView>& iv0,
00029 SetView y1)
00030 : Propagator(home), iv(iv0), x1(y1) {
00031
00032 x1.subscribe(home,this, PC_SET_ANY);
00033 iv.subscribe(home,this, PC_SET_ANY);
00034 }
00035
00036 forceinline
00037 SelectDisjoint::SelectDisjoint(Space* home, bool share, SelectDisjoint& p)
00038 : Propagator(home,share,p) {
00039 x1.update(home,share,p.x1);
00040 iv.update(home,share,p.iv);
00041 }
00042
00043 forceinline ExecStatus
00044 SelectDisjoint::post(Space* home, IdxViewArray<SetView>& xs,
00045 SetView x1) {
00046 int n = xs.size();
00047
00048
00049 Iter::Ranges::Singleton s(0, n-1);
00050 GECODE_ME_CHECK(x1.intersectI(home,s));
00051 (void) new (home)
00052 SelectDisjoint(home,xs,x1);
00053 return ES_OK;
00054 }
00055
00056
00057 }}}
00058
00059