seq.cc
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 #include "gecode/set.hh"
00029 #include "gecode/set/sequence.hh"
00030
00031 namespace Gecode { namespace Set { namespace Sequence {
00032
00033
00034
00035
00036
00037
00038 Actor*
00039 Seq::copy(Space* home, bool share) {
00040 return new (home) Seq(home,share,*this);
00041 }
00042
00043 ExecStatus
00044 Seq::propagate(Space* home) {
00045 bool modified = false;
00046 bool assigned;
00047 do {
00048 assigned = false;
00049 GECODE_ES_CHECK(propagateSeq(home, modified, assigned, x));
00050 } while (assigned);
00051
00052 for (int i=x.size(); i--;) {
00053 if (!x[i].assigned())
00054 return ES_FIX;
00055 }
00056 return ES_SUBSUMED;
00057 }
00058
00059 }}}
00060
00061