Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
ipl.hpp
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main author:
4 * Christian Schulte <schulte@gecode.org>
5 *
6 * Copyright:
7 * Christian Schulte, 2018
8 *
9 * This file is part of Gecode, the generic constraint
10 * development environment:
11 * http://www.gecode.org
12 *
13 * Permission is hereby granted, free of charge, to any person obtaining
14 * a copy of this software and associated documentation files (the
15 * "Software"), to deal in the Software without restriction, including
16 * without limitation the rights to use, copy, modify, merge, publish,
17 * distribute, sublicense, and/or sell copies of the Software, and to
18 * permit persons to whom the Software is furnished to do so, subject to
19 * the following conditions:
20 *
21 * The above copyright notice and this permission notice shall be
22 * included in all copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 *
32 */
33
34namespace Gecode {
35
36 inline
38 : _linear2(ipl), _linear(ipl),
39 _abs(ipl),
40 _max2(ipl), _max(ipl), _min2(ipl), _min(ipl),
41 _mult(ipl), _div(ipl), _mod(ipl),
42 _sqr(ipl), _sqrt(ipl), _pow(ipl), _nroot(ipl),
43 _element(ipl),
44 _ite(ipl) {}
45
46 inline IntPropLevel
48 return _linear2;
49 }
50 inline IntPropLevels&
52 _linear2=ipl; return *this;
53 }
54 inline IntPropLevel
56 return _linear;
57 }
58 inline IntPropLevels&
60 _linear=ipl; return *this;
61 }
62
63 inline IntPropLevel
64 IntPropLevels::abs(void) const {
65 return _abs;
66 }
67 inline IntPropLevels&
69 _abs=ipl; return *this;
70 }
71
72 inline IntPropLevel
73 IntPropLevels::max2(void) const {
74 return _max2;
75 }
76 inline IntPropLevels&
78 _max2=ipl; return *this;
79 }
80 inline IntPropLevel
81 IntPropLevels::max(void) const {
82 return _max;
83 }
84 inline IntPropLevels&
86 _max=ipl; return *this;
87 }
88 inline IntPropLevel
89 IntPropLevels::min2(void) const {
90 return _min2;
91 }
92 inline IntPropLevels&
94 _min2=ipl; return *this;
95 }
96 inline IntPropLevel
97 IntPropLevels::min(void) const {
98 return _min;
99 }
100 inline IntPropLevels&
102 _min=ipl; return *this;
103 }
104
105 inline IntPropLevel
107 return _mult;
108 }
109 inline IntPropLevels&
111 _mult=ipl; return *this;
112 }
113 inline IntPropLevel
114 IntPropLevels::div(void) const {
115 return _div;
116 }
117 inline IntPropLevels&
119 _div=ipl; return *this;
120 }
121 inline IntPropLevel
122 IntPropLevels::mod(void) const {
123 return _mod;
124 }
125 inline IntPropLevels&
127 _mod=ipl; return *this;
128 }
129
130 inline IntPropLevel
131 IntPropLevels::sqr(void) const {
132 return _sqr;
133 }
134 inline IntPropLevels&
136 _sqr=ipl; return *this;
137 }
138 inline IntPropLevel
140 return _sqrt;
141 }
142 inline IntPropLevels&
144 _sqrt=ipl; return *this;
145 }
146 inline IntPropLevel
147 IntPropLevels::pow(void) const {
148 return _pow;
149 }
150 inline IntPropLevels&
152 _pow=ipl; return *this;
153 }
154 inline IntPropLevel
156 return _nroot;
157 }
158 inline IntPropLevels&
160 _nroot=ipl; return *this;
161 }
162
163 inline IntPropLevel
165 return _element;
166 }
167 inline IntPropLevels&
169 _element=ipl; return *this;
170 }
171
172 inline IntPropLevel
173 IntPropLevels::ite(void) const {
174 return _ite;
175 }
176 inline IntPropLevels&
178 _ite=ipl; return *this;
179 }
180
181}
182
183// STATISTICS: minimodel-any
184
Class for specifying integer propagation levels used by minimodel.
Definition minimodel.hh:101
IntPropLevel _linear
For n-ary linear.
Definition minimodel.hh:104
IntPropLevel div(void) const
Return integer propagation level for division constraints.
Definition ipl.hpp:114
IntPropLevel element(void) const
Return integer propagation level for element constraints.
Definition ipl.hpp:164
IntPropLevel _sqr
For square.
Definition minimodel.hh:113
IntPropLevel mod(void) const
Return integer propagation level for modulo constraints.
Definition ipl.hpp:122
IntPropLevel linear(void) const
Return integer propagation level for non-binary linear constraints.
Definition ipl.hpp:55
IntPropLevel max2(void) const
Return integer propagation level for binary maximum constraints.
Definition ipl.hpp:73
IntPropLevel _mult
For multiplication.
Definition minimodel.hh:110
IntPropLevel _mod
For modulo.
Definition minimodel.hh:112
IntPropLevel ite(void) const
Return integer propagation level for if-then-else constraints.
Definition ipl.hpp:173
IntPropLevel mult(void) const
Return integer propagation level for multiplication constraints.
Definition ipl.hpp:106
IntPropLevel min(void) const
Return integer propagation level for non-binary minimum constraints.
Definition ipl.hpp:97
IntPropLevel _sqrt
For square root.
Definition minimodel.hh:114
IntPropLevel _ite
For if-then-else.
Definition minimodel.hh:118
IntPropLevel nroot(void) const
Return integer propagation level for root constraints.
Definition ipl.hpp:155
IntPropLevel abs(void) const
Return integer propagation level for absolute value constraints.
Definition ipl.hpp:64
IntPropLevel _max
For n-ary maximum.
Definition minimodel.hh:107
IntPropLevel _nroot
For root.
Definition minimodel.hh:116
IntPropLevel _pow
For power.
Definition minimodel.hh:115
IntPropLevel _element
For element.
Definition minimodel.hh:117
IntPropLevel _div
For division.
Definition minimodel.hh:111
IntPropLevel _abs
For absolute value.
Definition minimodel.hh:105
IntPropLevel sqrt(void) const
Return integer propagation level for square root constraints.
Definition ipl.hpp:139
IntPropLevels(IntPropLevel ipl=IPL_DEF)
Initialize with default propagation level.
Definition ipl.hpp:37
IntPropLevel linear2(void) const
Return integer propagation level for binary linear constraints.
Definition ipl.hpp:47
IntPropLevel min2(void) const
Return integer propagation level for binary minimum constraints.
Definition ipl.hpp:89
IntPropLevel _min2
For binary minimum.
Definition minimodel.hh:108
IntPropLevel pow(void) const
Return integer propagation level for power constraints.
Definition ipl.hpp:147
IntPropLevel _min
For minimum.
Definition minimodel.hh:109
IntPropLevel _linear2
For binary linear.
Definition minimodel.hh:103
IntPropLevel _max2
For binary maximum.
Definition minimodel.hh:106
IntPropLevel max(void) const
Return integer propagation level for non-binary maximum constraints.
Definition ipl.hpp:81
IntPropLevel sqr(void) const
Return integer propagation level for square constraints.
Definition ipl.hpp:131
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:989
Gecode toplevel namespace