Generated on Wed Nov 1 15:04:47 2006 for Gecode by doxygen 1.4.5

sequence.cc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *     Christian Schulte <schulte@gecode.org>
00005  *
00006  *  Copyright:
00007  *     Guido Tack, 2004
00008  *     Christian Schulte, 2004
00009  *
00010  *  Last modified:
00011  *     $Date: 2006-04-11 15:58:37 +0200 (Tue, 11 Apr 2006) $ by $Author: tack $
00012  *     $Revision: 3188 $
00013  *
00014  *  This file is part of Gecode, the generic constraint
00015  *  development environment:
00016  *     http://www.gecode.org
00017  *
00018  *  See the file "LICENSE" for information on usage and
00019  *  redistribution of this file, and for a
00020  *     DISCLAIMER OF ALL WARRANTIES.
00021  *
00022  */
00023 
00024 #include "gecode/set/sequence.hh"
00025 
00026 using namespace Gecode::Set;
00027 
00028 namespace Gecode {
00029 
00030   void
00031   sequence(Space* home, const SetVarArgs& xa) {
00032     if (home->failed()) return;
00033     if (xa.size()==0)
00034       throw ArgumentEmpty("Set::seq");
00035     ViewArray<SetView> x(home,xa);
00036     GECODE_ES_FAIL(home,Sequence::Seq::post(home, x));
00037   }
00038 
00039   void
00040   sequentialUnion(Space* home, const SetVarArgs& xa, SetVar y) {
00041     if (home->failed()) return;
00042     ViewArray<SetView> x(home,xa);
00043     GECODE_ES_FAIL(home,Sequence::SeqU::post(home, x,y));
00044   }
00045 
00046 }
00047 
00048 // STATISTICS: set-post