3
* Christian Schulte <schulte@gecode.org>
6
* Christian Schulte, 2002
9
* $Date: 2005-10-27 17:04:11 +0200 (Thu, 27 Oct 2005) $ by $Author: schulte $
12
* This file is part of Gecode, the generic constraint
13
* development environment:
14
* http://www.gecode.org
16
* See the file "LICENSE" for information on usage and
17
* redistribution of this file, and for a
18
* DISCLAIMER OF ALL WARRANTIES.
25
BoolVar::BoolVar(void) {}
28
BoolVar::BoolVar(Space* home, int min, int max)
29
: IntVar(home,min,max) {
30
if ((min < 0) || (max > 1))
31
throw Int::VariableOutOfRangeDomain("BoolVar");
35
BoolVar::BoolVar(const Int::BoolView& b)
39
BoolVar::update(Space* home, bool share, BoolVar& x) {
40
var = x.var->copy(home,share);
44
BoolVar::BoolVar(const IntVar& x)
46
if ((x.min() < 0) || (x.max() > 1))
47
throw Int::VariableOutOfRangeDomain("BoolVar");
52
// STATISTICS: int-var