3
* Christian Schulte <schulte@gecode.org>
6
* Christian Schulte, 2002
9
* $Date: 2005-10-11 17:57:38 +0200 (Tue, 11 Oct 2005) $ by $Author: tack $
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.
26
IntVar::IntVar(Space* home, int min, int max)
27
: var(new (home) Int::IntVarImp(home,min,max)) {
28
if ((min < Limits::Int::int_min) || (max > Limits::Int::int_max))
29
throw Int::VariableOutOfRangeDomain("IntVar");
31
throw Int::VariableEmptyDomain("IntVar");
34
IntVar::IntVar(Space* home, const IntSet& ds)
35
: var(new (home) Int::IntVarImp(home,ds)) {
36
if ((ds.min() < Limits::Int::int_min) || (ds.max() > Limits::Int::int_max))
37
throw Int::VariableOutOfRangeDomain("IntVar");
39
throw Int::VariableEmptyDomain("IntVar");
44
// STATISTICS: int-var