distinct.cpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
* Mikael Lagerkvist <lagerkvist@gecode.org>
*
* Copyright:
* Christian Schulte, 2005
* Mikael Lagerkvist, 2006
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include "test/int.hh"
#include <gecode/minimodel.hh>
namespace Test { namespace Int {
namespace Distinct {
template<bool useCount>
class Distinct : public Test {
public:
Distinct(const Gecode::IntSet& d0, Gecode::IntPropLevel ipl,
int n=6)
: Test(std::string(useCount ? "Count::Distinct::" : "Distinct::")+
str(ipl)+"::Sparse::"+str(n),n,d0,false,ipl) {}
Distinct(int min, int max, Gecode::IntPropLevel ipl)
: Test(std::string(useCount ? "Count::Distinct::" : "Distinct::")+
str(ipl)+"::Dense",6,min,max,false,ipl) {}
virtual bool solution(const Assignment& x) const {
for (int i=0; i<x.size(); i++)
for (int j=i+1; j<x.size(); j++)
if (x[i]==x[j])
return false;
return true;
}
virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
if (!useCount) {
Gecode::distinct(home, x, ipl);
} else {
Gecode::IntSetRanges dr(dom);
int i = 0;
Gecode::IntArgs ia(Gecode::Iter::Ranges::size(dr));
for (Gecode::IntSetValues dr2(dom); dr2(); ++dr2)
ia[i++] = dr2.val();
Gecode::count(home, x, Gecode::IntSet(0,1), ia, ipl);
}
}
};
class Offset : public Test {
public:
Offset(const Gecode::IntSet& d, Gecode::IntPropLevel ipl)
: Test("Distinct::Offset::Sparse::"+str(ipl),6,d,false,ipl) {}
Offset(int min, int max, Gecode::IntPropLevel ipl)
: Test("Distinct::Offset::Dense::"+str(ipl),6,min,max,false,ipl) {}
virtual bool solution(const Assignment& x) const {
for (int i=0; i<x.size(); i++)
for (int j=i+1; j<x.size(); j++)
if (x[i]+i==x[j]+j)
return false;
return true;
}
virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
Gecode::IntArgs c(x.size());
for (int i=0; i<x.size(); i++)
c[i]=i;
Gecode::distinct(home, c, x, ipl);
}
};
class Optional : public Test {
public:
Optional(const Gecode::IntArgs& d, Gecode::IntPropLevel ipl)
: Test("Distinct::Optional::"+str(ipl)+"::"+str(d),
6,Gecode::IntSet(d),false,ipl) {}
virtual bool solution(const Assignment& x) const {
int n = x.size() / 2;
for (int i=0; i<n; i++)
if ((x[i] < 0) || (x[i] > 1))
return false;
for (int i=0; i<n; i++)
for (int j=i+1; j<n; j++)
if ((x[i] == 1) && (x[j] == 1) && (x[n+i] == x[n+j]))
return false;
return true;
}
virtual void post(Gecode::Space& home, Gecode::IntVarArray& bx) {
int n = bx.size() / 2;
Gecode::BoolVarArgs b(n);
Gecode::IntVarArgs x(n);
for (int i=0; i<n; i++) {
b[i] = Gecode::channel(home, bx[i]);
x[i] = bx[n+i];
}
Gecode::distinct(home, b, x, ipl);
}
};
class Except : public Test {
public:
Except(const Gecode::IntArgs& d, Gecode::IntPropLevel ipl)
: Test("Distinct::Except::"+str(ipl)+"::"+str(d),
3,Gecode::IntSet(d),false,ipl) {
contest = CTL_NONE;
}
virtual bool solution(const Assignment& x) const {
for (int i=0; i<x.size(); i++)
for (int j=i+1; j<x.size(); j++)
if ((x[i] != 0) && (x[j] != 0) && (x[i] == x[j]))
return false;
return true;
}
virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
Gecode::distinct(home, x, 0, ipl);
}
};
class Random : public Test {
public:
Random(int n, int min, int max, Gecode::IntPropLevel ipl)
: Test("Distinct::Random::"+str(ipl),n,min,max,false,ipl) {
testsearch = false;
}
virtual Assignment* assignment(void) const {
return new RandomAssignment(arity,dom,100);
}
virtual bool solution(const Assignment& x) const {
for (int i=0; i<x.size(); i++)
for (int j=i+1; j<x.size(); j++)
if (x[i]==x[j])
return false;
return true;
}
virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
Gecode::distinct(home, x, ipl);
}
};
class Pathological : public Base {
protected:
int n;
Gecode::IntPropLevel ipl;
class TestSpace : public Gecode::Space {
public:
TestSpace(void) {}
TestSpace(TestSpace& s)
: Gecode::Space(s) {}
virtual Gecode::Space* copy(void) {
return new TestSpace(*this);
}
};
public:
Pathological(int n0, Gecode::IntPropLevel ipl0)
: Base("Int::Distinct::Pathological::"+
Test::str(n0)+"::"+Test::str(ipl0)), n(n0), ipl(ipl0) {}
virtual bool run(void) {
using namespace Gecode;
{
TestSpace* s = new TestSpace;
IntVarArgs x(n);
for (int i=0; i<n; i++)
x[i] = IntVar(*s,0,i);
distinct(*s,x,ipl);
if (s->status() == SS_FAILED) {
delete s; return false;
}
for (int i=0; i<n; i++)
if (!x[i].assigned() || (x[i].val() != i)) {
delete s; return false;
}
delete s;
}
{
TestSpace* s = new TestSpace;
IntVarArgs x(2*n);
for (int i=0; i<n; i++) {
int v[] = {0,i};
IntSet d(v,2);
x[i] = IntVar(*s,d);
}
for (int i=n; i<2*n; i++)
x[i] = IntVar(*s,n-1,i);
distinct(*s,x,ipl);
if (s->status() == SS_FAILED) {
delete s; return false;
}
for (int i=0; i<n; i++)
if (!x[i].assigned() || (x[i].val() != i)) {
delete s; return false;
}
delete s;
}
return true;
}
};
const int v[7] = {-1001,-1000,-10,0,10,1000,1001};
Gecode::IntSet d(v,7);
const int vl[6] = {Gecode::Int::Limits::min+0,
Gecode::Int::Limits::min+1,
Gecode::Int::Limits::min+2,
Gecode::Int::Limits::max-2,
Gecode::Int::Limits::max-1,
Gecode::Int::Limits::max-0};
Gecode::IntSet dl(vl,6);
Distinct<false> dom_d(-3,3,Gecode::IPL_DOM);
Distinct<false> bnd_d(-3,3,Gecode::IPL_BND);
Distinct<false> val_d(-3,3,Gecode::IPL_VAL);
Distinct<false> dom_s(d,Gecode::IPL_DOM);
Distinct<false> bnd_s(d,Gecode::IPL_BND);
Distinct<false> val_s(d,Gecode::IPL_VAL);
Distinct<false> dom_l(dl,Gecode::IPL_DOM,5);
Distinct<false> bnd_l(dl,Gecode::IPL_BND,5);
Distinct<false> val_l(dl,Gecode::IPL_VAL,5);
Distinct<true> count_dom_d(-3,3,Gecode::IPL_DOM);
Distinct<true> count_bnd_d(-3,3,Gecode::IPL_BND);
Distinct<true> count_val_d(-3,3,Gecode::IPL_VAL);
Distinct<true> count_dom_s(d,Gecode::IPL_DOM);
Distinct<true> count_bnd_s(d,Gecode::IPL_BND);
Distinct<true> count_val_s(d,Gecode::IPL_VAL);
Offset dom_od(-3,3,Gecode::IPL_DOM);
Offset bnd_od(-3,3,Gecode::IPL_BND);
Offset val_od(-3,3,Gecode::IPL_VAL);
Offset dom_os(d,Gecode::IPL_DOM);
Offset bnd_os(d,Gecode::IPL_BND);
Offset val_os(d,Gecode::IPL_VAL);
Gecode::IntArgs v1({Gecode::Int::Limits::min+4,
0,1,
Gecode::Int::Limits::max});
Gecode::IntArgs v2({Gecode::Int::Limits::min,
0,1,
Gecode::Int::Limits::max-4});
Gecode::IntArgs v3({0,1,2,3});
Gecode::IntArgs v4({0,1,2});
Gecode::IntArgs v5({0,1});
Optional od1(v1,Gecode::IPL_DOM);
Optional ob1(v1,Gecode::IPL_BND);
Optional ov1(v1,Gecode::IPL_VAL);
Optional od2(v2,Gecode::IPL_DOM);
Optional ob2(v2,Gecode::IPL_BND);
Optional ov2(v2,Gecode::IPL_VAL);
Optional od3(v3,Gecode::IPL_DOM);
Optional ob3(v3,Gecode::IPL_BND);
Optional ov3(v3,Gecode::IPL_VAL);
Optional od4(v4,Gecode::IPL_DOM);
Optional ob4(v4,Gecode::IPL_BND);
Optional ov4(v4,Gecode::IPL_VAL);
Optional od5(v5,Gecode::IPL_DOM);
Optional ob5(v5,Gecode::IPL_BND);
Optional ov5(v5,Gecode::IPL_VAL);
Except ed1(v1,Gecode::IPL_DOM);
Except eb1(v1,Gecode::IPL_BND);
Except ev1(v1,Gecode::IPL_VAL);
Except ed2(v2,Gecode::IPL_DOM);
Except eb2(v2,Gecode::IPL_BND);
Except ev2(v2,Gecode::IPL_VAL);
Except ed5(v5,Gecode::IPL_DOM);
Except eb5(v5,Gecode::IPL_BND);
Except ev5(v5,Gecode::IPL_VAL);
Random dom_r(20,-50,50,Gecode::IPL_DOM);
Random bnd_r(50,-500,500,Gecode::IPL_BND);
Random val_r(50,-500,500,Gecode::IPL_VAL);
Pathological p_16_v(16,Gecode::IPL_VAL);
Pathological p_16_b(16,Gecode::IPL_BND);
Pathological p_16_d(16,Gecode::IPL_DOM);
Pathological p_32_v(32,Gecode::IPL_VAL);
Pathological p_32_b(32,Gecode::IPL_BND);
Pathological p_32_d(32,Gecode::IPL_DOM);
}
}}
// STATISTICS: test-int
Gecode::BoolVarArgs
Passing Boolean variables.
Definition int.hh:712
Gecode::IntArgs
Passing integer arguments.
Definition int.hh:628
Gecode::IntSetRanges
Range iterator for integer sets.
Definition int.hh:292
Gecode::IntSetValues
Value iterator for integer sets.
Definition int.hh:333
Gecode::IntSet
Integer sets.
Definition int.hh:174
Gecode::IntVarArgs
Passing integer variables.
Definition int.hh:656
Gecode::IntVarArray
Integer variable array.
Definition int.hh:763
Gecode::IntVar
Integer variables.
Definition int.hh:371
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::VarArray::size
int size(void) const
Return size of array (number of elements).
Definition array.hpp:926
Test::Base::Base
Base(const std::string &s)
Create and register test with name s.
Definition test.cpp:59
Test::Int::Assignment
Base class for assignments
Definition int.hh:59
Test::Int::Assignment::size
int size(void) const
Return number of variables.
Definition int.hpp:46
Test::Int::Distinct::Distinct
Simple test for distinct constraint.
Definition distinct.cpp:51
Test::Int::Distinct::Distinct::Distinct
Distinct(int min, int max, Gecode::IntPropLevel ipl)
Create and register test.
Definition distinct.cpp:59
Test::Int::Distinct::Distinct::Distinct
Distinct(const Gecode::IntSet &d0, Gecode::IntPropLevel ipl, int n=6)
Create and register test.
Definition distinct.cpp:54
Test::Int::Distinct::Distinct::post
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Definition distinct.cpp:71
Test::Int::Distinct::Distinct::solution
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition distinct.cpp:63
Test::Int::Distinct::Except
Simple test for distinct except constant constraint.
Definition distinct.cpp:144
Test::Int::Distinct::Except::Except
Except(const Gecode::IntArgs &d, Gecode::IntPropLevel ipl)
Create and register test.
Definition distinct.cpp:147
Test::Int::Distinct::Except::solution
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition distinct.cpp:153
Test::Int::Distinct::Except::post
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on bx.
Definition distinct.cpp:161
Test::Int::Distinct::Offset
Simple test for distinct constraint with offsets.
Definition distinct.cpp:86
Test::Int::Distinct::Offset::Offset
Offset(const Gecode::IntSet &d, Gecode::IntPropLevel ipl)
Create and register test.
Definition distinct.cpp:89
Test::Int::Distinct::Offset::solution
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition distinct.cpp:95
Test::Int::Distinct::Offset::post
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Definition distinct.cpp:103
Test::Int::Distinct::Offset::Offset
Offset(int min, int max, Gecode::IntPropLevel ipl)
Create and register test.
Definition distinct.cpp:92
Test::Int::Distinct::Optional
Simple test for optional distinct constraint.
Definition distinct.cpp:112
Test::Int::Distinct::Optional::solution
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition distinct.cpp:119
Test::Int::Distinct::Optional::post
virtual void post(Gecode::Space &home, Gecode::IntVarArray &bx)
Post constraint on bx.
Definition distinct.cpp:131
Test::Int::Distinct::Optional::Optional
Optional(const Gecode::IntArgs &d, Gecode::IntPropLevel ipl)
Create and register test.
Definition distinct.cpp:115
Test::Int::Distinct::Pathological::TestSpace
Test space
Definition distinct.cpp:200
Test::Int::Distinct::Pathological::TestSpace::copy
virtual Gecode::Space * copy(void)
Copy space during cloning.
Definition distinct.cpp:208
Test::Int::Distinct::Pathological::TestSpace::TestSpace
TestSpace(TestSpace &s)
Constructor for cloning s.
Definition distinct.cpp:205
Test::Int::Distinct::Pathological::TestSpace::TestSpace
TestSpace(void)
Constructor.
Definition distinct.cpp:203
Test::Int::Distinct::Pathological
Testing pathological cases
Definition distinct.cpp:193
Test::Int::Distinct::Pathological::n
int n
Number of variables.
Definition distinct.cpp:196
Test::Int::Distinct::Pathological::run
virtual bool run(void)
Perform test.
Definition distinct.cpp:218
Test::Int::Distinct::Pathological::Pathological
Pathological(int n0, Gecode::IntPropLevel ipl0)
Create and register test.
Definition distinct.cpp:214
Test::Int::Distinct::Pathological::ipl
Gecode::IntPropLevel ipl
Consistency level.
Definition distinct.cpp:198
Test::Int::Distinct::Random
Randomized test for distinct constraint.
Definition distinct.cpp:167
Test::Int::Distinct::Random::assignment
virtual Assignment * assignment(void) const
Create and register initial assignment.
Definition distinct.cpp:175
Test::Int::Distinct::Random::post
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint on x.
Definition distinct.cpp:187
Test::Int::Distinct::Random::Random
Random(int n, int min, int max, Gecode::IntPropLevel ipl)
Create and register test.
Definition distinct.cpp:170
Test::Int::Distinct::Random::solution
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition distinct.cpp:179
Test::Int::RandomAssignment
Generate random selection of assignments.
Definition int.hh:96
Test::Int::Test::testsearch
bool testsearch
Whether to perform search test.
Definition int.hh:238
Test::Int::Test::ipl
Gecode::IntPropLevel ipl
Propagation level.
Definition int.hh:234
Test::Int::Test::arity
int arity
Number of variables.
Definition int.hh:226
Test::Int::Test::str
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
Definition int.hpp:209
Test::Int::Test::dom
Gecode::IntSet dom
Domain of variables.
Definition int.hh:228
Test::Int::Test::contest
ConTestLevel contest
Whether to test for certain consistency.
Definition int.hh:236
Gecode::IntPropLevel
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:974
Gecode::IPL_DOM
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
Definition int.hh:979
Gecode::IPL_VAL
@ IPL_VAL
Value propagation.
Definition int.hh:977
Gecode::IPL_BND
@ IPL_BND
Bounds propagation.
Definition int.hh:978
Gecode::Space::Space
Space(void)
Default constructor.
Definition core.cpp:115
Gecode::Space::status
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
Definition core.cpp:252
Gecode::SS_FAILED
@ SS_FAILED
Space is failed
Definition core.hpp:1682
minimodel.hh
Gecode::Int::Limits::min
const int min
Smallest allowed integer value.
Definition int.hh:118
Gecode::Int::Limits::max
const int max
Largest allowed integer value.
Definition int.hh:116
Gecode::Iter::Ranges::size
unsigned int size(I &i)
Size of all ranges of range iterator i.
Definition ranges-operations.hpp:74
Gecode
Gecode toplevel namespace
Gecode::count
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition count.cpp:40
Gecode::channel
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition channel.cpp:41
Gecode::distinct
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Post propagator for for all .
Definition distinct.cpp:46
Test::Int::Distinct::eb2
Except eb2(v2, Gecode::IPL_BND)
Test::Int::Distinct::p_16_b
Pathological p_16_b(16, Gecode::IPL_BND)
Test::Int::Distinct::p_16_v
Pathological p_16_v(16, Gecode::IPL_VAL)
Test::Int::Distinct::p_32_v
Pathological p_32_v(32, Gecode::IPL_VAL)
Test::Int::Distinct::val_s
Distinct< false > val_s(d, Gecode::IPL_VAL)
Test::Int::Distinct::od2
Optional od2(v2, Gecode::IPL_DOM)
Test::Int::Distinct::val_r
Random val_r(50,-500, 500, Gecode::IPL_VAL)
Test::Int::Distinct::ob2
Optional ob2(v2, Gecode::IPL_BND)
Test::Int::Distinct::v4
Gecode::IntArgs v4({0, 1, 2})
Test::Int::Distinct::count_val_s
Distinct< true > count_val_s(d, Gecode::IPL_VAL)
Test::Int::Distinct::ev1
Except ev1(v1, Gecode::IPL_VAL)
Test::Int::Distinct::dom_l
Distinct< false > dom_l(dl, Gecode::IPL_DOM, 5)
Test::Int::Distinct::ov4
Optional ov4(v4, Gecode::IPL_VAL)
Test::Int::Distinct::eb1
Except eb1(v1, Gecode::IPL_BND)
Test::Int::Distinct::dl
Gecode::IntSet dl(vl, 6)
Test::Int::Distinct::ev2
Except ev2(v2, Gecode::IPL_VAL)
Test::Int::Distinct::bnd_os
Offset bnd_os(d, Gecode::IPL_BND)
Test::Int::Distinct::dom_od
Offset dom_od(-3, 3, Gecode::IPL_DOM)
Test::Int::Distinct::val_od
Offset val_od(-3, 3, Gecode::IPL_VAL)
Test::Int::Distinct::eb5
Except eb5(v5, Gecode::IPL_BND)
Test::Int::Distinct::count_dom_d
Distinct< true > count_dom_d(-3, 3, Gecode::IPL_DOM)
Test::Int::Distinct::count_dom_s
Distinct< true > count_dom_s(d, Gecode::IPL_DOM)
Test::Int::Distinct::v3
Gecode::IntArgs v3({0, 1, 2, 3})
Test::Int::Distinct::ob1
Optional ob1(v1, Gecode::IPL_BND)
Test::Int::Distinct::ev5
Except ev5(v5, Gecode::IPL_VAL)
Test::Int::Distinct::bnd_s
Distinct< false > bnd_s(d, Gecode::IPL_BND)
Test::Int::Distinct::dom_r
Random dom_r(20,-50, 50, Gecode::IPL_DOM)
Test::Int::Distinct::ob5
Optional ob5(v5, Gecode::IPL_BND)
Test::Int::Distinct::d
Gecode::IntSet d(v, 7)
Test::Int::Distinct::val_l
Distinct< false > val_l(dl, Gecode::IPL_VAL, 5)
Test::Int::Distinct::ed1
Except ed1(v1, Gecode::IPL_DOM)
Test::Int::Distinct::bnd_l
Distinct< false > bnd_l(dl, Gecode::IPL_BND, 5)
Test::Int::Distinct::v5
Gecode::IntArgs v5({0, 1})
Test::Int::Distinct::ob4
Optional ob4(v4, Gecode::IPL_BND)
Test::Int::Distinct::v
const int v[7]
Definition distinct.cpp:259
Test::Int::Distinct::p_32_b
Pathological p_32_b(32, Gecode::IPL_BND)
Test::Int::Distinct::v2
Gecode::IntArgs v2({Gecode::Int::Limits::min, 0, 1, Gecode::Int::Limits::max-4})
Test::Int::Distinct::val_d
Distinct< false > val_d(-3, 3, Gecode::IPL_VAL)
Test::Int::Distinct::ov3
Optional ov3(v3, Gecode::IPL_VAL)
Test::Int::Distinct::dom_os
Offset dom_os(d, Gecode::IPL_DOM)
Test::Int::Distinct::p_32_d
Pathological p_32_d(32, Gecode::IPL_DOM)
Test::Int::Distinct::count_val_d
Distinct< true > count_val_d(-3, 3, Gecode::IPL_VAL)
Test::Int::Distinct::v1
Gecode::IntArgs v1({Gecode::Int::Limits::min+4, 0, 1, Gecode::Int::Limits::max})
Test::Int::Distinct::dom_d
Distinct< false > dom_d(-3, 3, Gecode::IPL_DOM)
Test::Int::Distinct::p_16_d
Pathological p_16_d(16, Gecode::IPL_DOM)
Test::Int::Distinct::ed5
Except ed5(v5, Gecode::IPL_DOM)
Test::Int::Distinct::od4
Optional od4(v4, Gecode::IPL_DOM)
Test::Int::Distinct::ov5
Optional ov5(v5, Gecode::IPL_VAL)
Test::Int::Distinct::dom_s
Distinct< false > dom_s(d, Gecode::IPL_DOM)
Test::Int::Distinct::val_os
Offset val_os(d, Gecode::IPL_VAL)
Test::Int::Distinct::ov1
Optional ov1(v1, Gecode::IPL_VAL)
Test::Int::Distinct::count_bnd_s
Distinct< true > count_bnd_s(d, Gecode::IPL_BND)
Test::Int::Distinct::od3
Optional od3(v3, Gecode::IPL_DOM)
Test::Int::Distinct::ob3
Optional ob3(v3, Gecode::IPL_BND)
Test::Int::Distinct::ed2
Except ed2(v2, Gecode::IPL_DOM)
Test::Int::Distinct::bnd_od
Offset bnd_od(-3, 3, Gecode::IPL_BND)
Test::Int::Distinct::bnd_r
Random bnd_r(50,-500, 500, Gecode::IPL_BND)
Test::Int::Distinct::count_bnd_d
Distinct< true > count_bnd_d(-3, 3, Gecode::IPL_BND)
Test::Int::Distinct::od5
Optional od5(v5, Gecode::IPL_DOM)
Test::Int::Distinct::ov2
Optional ov2(v2, Gecode::IPL_VAL)
Test::Int::Distinct::bnd_d
Distinct< false > bnd_d(-3, 3, Gecode::IPL_BND)
Test::Int::Distinct::od1
Optional od1(v1, Gecode::IPL_DOM)
Test::Int::Distinct::vl
const int vl[6]
Definition distinct.cpp:261
Test::Int
Testing finite domain integers.
Definition int.cpp:40
Test::Int::CTL_NONE
@ CTL_NONE
No consistency-test.
Definition int.hh:140
Test
General test support.
Definition afc.cpp:39
std
Definition flatzinc.cpp:52
int.hh