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 "set.hh"
00029 #include "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 GECODE_ES_CHECK(propagateSeq(home, modified, x));
00047 bool assigned = true;
00048 for (int i=x.size(); i--;) {
00049 if (!x[i].assigned()) {
00050 assigned = false; break;
00051 }
00052 }
00053 return assigned ? ES_SUBSUMED : ES_FIX;
00054 }
00055
00056 }}}
00057
00058