main page
modules
namespaces
classes
files
Gecode home
Generated on Sat May 25 2013 18:00:41 for Gecode by
doxygen
1.8.3.1
test
assign.hh
Go to the documentation of this file.
1
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
/*
3
* Main authors:
4
* Christian Schulte <schulte@gecode.org>
5
*
6
* Contributing authors:
7
* Vincent Barichard <Vincent.Barichard@univ-angers.fr>
8
*
9
* Copyright:
10
* Christian Schulte, 2008
11
* Vincent Barichard, 2012
12
*
13
* Last modified:
14
* $Date: 2012-04-05 12:00:11 +0200 (Thu, 05 Apr 2012) $ by $Author: vbarichard $
15
* $Revision: 12703 $
16
*
17
* This file is part of Gecode, the generic constraint
18
* development environment:
19
* http://www.gecode.org
20
*
21
* Permission is hereby granted, free of charge, to any person obtaining
22
* a copy of this software and associated documentation files (the
23
* "Software"), to deal in the Software without restriction, including
24
* without limitation the rights to use, copy, modify, merge, publish,
25
* distribute, sublicense, and/or sell copies of the Software, and to
26
* permit persons to whom the Software is furnished to do so, subject to
27
* the following conditions:
28
*
29
* The above copyright notice and this permission notice shall be
30
* included in all copies or substantial portions of the Software.
31
*
32
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
36
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
37
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
38
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39
*
40
*/
41
42
#ifndef __GECODE_TEST_ASSIGN_HH__
43
#define __GECODE_TEST_ASSIGN_HH__
44
45
#include <
gecode/kernel.hh
>
46
#include <
gecode/int.hh
>
47
#ifdef GECODE_HAS_SET_VARS
48
#include <
gecode/set.hh
>
49
#endif
50
#ifdef GECODE_HAS_FLOAT_VARS
51
#include <
gecode/float.hh
>
52
#endif
53
54
#include "
test/test.hh
"
55
56
namespace
Test {
57
59
namespace
Assign {
60
65
class
IntTest
:
public
Base
{
66
protected
:
68
int
arity
;
70
Gecode::IntSet
dom
;
71
public
:
73
IntTest
(
const
std::string& s,
int
a
,
const
Gecode::IntSet
&
d
);
75
virtual
bool
run
(
void
);
77
virtual
void
post
(
Gecode::Space
& home,
Gecode::IntVarArray
&
x
) = 0;
78
};
79
84
class
BoolTest
:
public
Base
{
85
protected
:
87
int
arity
;
88
public
:
90
BoolTest
(
const
std::string& s,
int
a
);
92
virtual
bool
run
(
void
);
94
virtual
void
post
(
Gecode::Space
& home,
Gecode::BoolVarArray
&
x
) = 0;
95
};
96
97
#ifdef GECODE_HAS_SET_VARS
98
103
class
SetTest
:
public
Base
{
104
protected
:
106
int
arity
;
108
Gecode::IntSet
dom
;
109
public
:
111
SetTest
(
const
std::string& s,
int
a
,
const
Gecode::IntSet
&
d
);
113
virtual
bool
run
(
void
);
115
virtual
void
post
(
Gecode::Space
& home,
Gecode::SetVarArray
&
x
) = 0;
116
};
117
118
#endif
119
120
#ifdef GECODE_HAS_FLOAT_VARS
121
126
class
FloatTest
:
public
Base
{
127
protected
:
129
int
arity
;
131
Gecode::FloatVal
dom
;
132
public
:
134
FloatTest
(
const
std::string& s,
int
a
,
const
Gecode::FloatVal
&
d
);
136
virtual
bool
run
(
void
);
138
virtual
void
post
(
Gecode::Space
& home,
Gecode::FloatVarArray
&
x
) = 0;
139
};
140
141
#endif
142
143
}
144
145
}
146
147
#endif
148
149
// STATISTICS: test-branch