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

card.icc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *     Christian Schulte <schulte@gecode.org>
00005  *     Gabor Szokoli <szokoli@gecode.org>
00006  *
00007  *  Copyright:
00008  *     Guido Tack, 2004
00009  *     Christian Schulte, 2004
00010  *     Gabor Szokoli, 2004
00011  *
00012  *  Last modified:
00013  *     $Date: 2006-04-11 15:58:37 +0200 (Tue, 11 Apr 2006) $ by $Author: tack $
00014  *     $Revision: 3188 $
00015  *
00016  *  This file is part of Gecode, the generic constraint
00017  *  development environment:
00018  *     http://www.gecode.org
00019  *
00020  *  See the file "LICENSE" for information on usage and
00021  *  redistribution of this file, and for a
00022  *     DISCLAIMER OF ALL WARRANTIES.
00023  *
00024  */
00025 
00026 
00027 
00028 #include "gecode/set.hh"
00029 #include "gecode/int.hh"
00030 
00031 namespace Gecode { namespace Set { namespace Int {
00032 
00033   forceinline
00034   Card::Card(Space* home, SetView y0, Gecode::Int::IntView y1)
00035     : IntSetPropagator<SetView,PC_SET_CARD,
00036                        Gecode::Int::PC_INT_BND> (home, y0, y1) {}
00037 
00038   forceinline ExecStatus
00039   Card::post(Space* home, SetView x0, Gecode::Int::IntView x1) {
00040     GECODE_ME_CHECK(x1.gq(home,0));
00041     GECODE_ME_CHECK(x0.cardMax(home, INT_MAX));
00042     (void) new (home) Card(home,x0,x1);
00043     return ES_OK;
00044   }
00045 
00046   forceinline
00047   Card::Card(Space* home, bool share, Card& p)
00048     : IntSetPropagator<SetView,PC_SET_CARD,
00049                        Gecode::Int::PC_INT_BND> (home, share, p) {}
00050 
00051 
00052 }}}
00053 
00054 // STATISTICS: set-prop