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

bool.icc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Christian Schulte <schulte@gecode.org>
00004  *
00005  *  Copyright:
00006  *     Christian Schulte, 2002
00007  *
00008  *  Last modified:
00009  *     $Date: 2005-10-27 17:04:11 +0200 (Thu, 27 Oct 2005) $ by $Author: schulte $
00010  *     $Revision: 2418 $
00011  *
00012  *  This file is part of Gecode, the generic constraint
00013  *  development environment:
00014  *     http://www.gecode.org
00015  *
00016  *  See the file "LICENSE" for information on usage and
00017  *  redistribution of this file, and for a
00018  *     DISCLAIMER OF ALL WARRANTIES.
00019  *
00020  */
00021 
00022 namespace Gecode {
00023 
00024   forceinline
00025   BoolVar::BoolVar(void) {}
00026 
00027   forceinline
00028   BoolVar::BoolVar(Space* home, int min, int max)
00029     : IntVar(home,min,max) {
00030     if ((min < 0) || (max > 1))
00031       throw Int::VariableOutOfRangeDomain("BoolVar");
00032   }
00033 
00034   forceinline
00035   BoolVar::BoolVar(const Int::BoolView& b)
00036     : IntVar(b) {}
00037 
00038   forceinline void
00039   BoolVar::update(Space* home, bool share, BoolVar& x) {
00040     var = x.var->copy(home,share);
00041   }
00042 
00043   forceinline
00044   BoolVar::BoolVar(const IntVar& x)
00045     : IntVar(x) {
00046     if ((x.min() < 0) || (x.max() > 1))
00047       throw Int::VariableOutOfRangeDomain("BoolVar");
00048   }
00049 
00050 }
00051 
00052 // STATISTICS: int-var