Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
var-imp.hpp
Go to the documentation of this file.
1/*
2 * CAUTION:
3 * This file has been automatically generated. Do not edit,
4 * edit the following files instead:
5 * - ./gecode/int/var-imp/int.vis
6 * - ./gecode/int/var-imp/bool.vis
7 * - ./gecode/set/var-imp/set.vis
8 * - ./gecode/float/var-imp/float.vis
9 *
10 * This file contains generated code fragments which are
11 * copyrighted as follows:
12 *
13 * Main author:
14 * Christian Schulte <schulte@gecode.org>
15 *
16 * Copyright:
17 * Christian Schulte, 2007
18 *
19 * The generated code fragments are part of Gecode, the generic
20 * constraint development environment:
21 * http://www.gecode.org
22 *
23 * Permission is hereby granted, free of charge, to any person obtaining
24 * a copy of this software and associated documentation files (the
25 * "Software"), to deal in the Software without restriction, including
26 * without limitation the rights to use, copy, modify, merge, publish,
27 * distribute, sublicense, and/or sell copies of the Software, and to
28 * permit persons to whom the Software is furnished to do so, subject to
29 * the following conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41 *
42 */
43
44#ifdef GECODE_HAS_INT_VARS
45namespace Gecode { namespace Int {
47 class IntVarImpBase : public Gecode::VarImp<Gecode::Int::IntVarImpConf> {
48 protected:
51 public:
53 IntVarImpBase(void);
57
58
70 void subscribe(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned, bool schedule);
72 void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed);
85 void reschedule(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned);
87 };
88}}
89#endif
90#ifdef GECODE_HAS_INT_VARS
91namespace Gecode { namespace Int {
93 class BoolVarImpBase : public Gecode::VarImp<Gecode::Int::BoolVarImpConf> {
94 protected:
97 public:
99 BoolVarImpBase(void);
103
104
116 void subscribe(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned, bool schedule);
118 void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed);
131 void reschedule(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned);
133 };
134}}
135#endif
136#ifdef GECODE_HAS_SET_VARS
137namespace Gecode { namespace Set {
139 class SetVarImpBase : public Gecode::VarImp<Gecode::Set::SetVarImpConf> {
140 protected:
143 public:
145 SetVarImpBase(void);
149
150
162 void subscribe(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned, bool schedule);
164 void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed);
177 void reschedule(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned);
179 };
180}}
181#endif
182#ifdef GECODE_HAS_FLOAT_VARS
183namespace Gecode { namespace Float {
185 class FloatVarImpBase : public Gecode::VarImp<Gecode::Float::FloatVarImpConf> {
186 protected:
189 public:
191 FloatVarImpBase(void);
195
196
208 void subscribe(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned, bool schedule);
210 void subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed);
223 void reschedule(Gecode::Space& home, Gecode::Propagator& p, Gecode::PropCond pc, bool assigned);
225 };
226}}
227#endif
228#ifdef GECODE_HAS_INT_VARS
229namespace Gecode { namespace Int {
230
233
237
241
242 forceinline void
246 forceinline void
247 IntVarImpBase::subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed) {
249 }
250
251 forceinline void
255 forceinline void
259
286
287}}
288#endif
289#ifdef GECODE_HAS_INT_VARS
290namespace Gecode { namespace Int {
291
294
298
302
303 forceinline void
307 forceinline void
308 BoolVarImpBase::subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed) {
310 }
311
312 forceinline void
316 forceinline void
320
329
330}}
331#endif
332#ifdef GECODE_HAS_SET_VARS
333namespace Gecode { namespace Set {
334
337
341
345
346 forceinline void
350 forceinline void
351 SetVarImpBase::subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed) {
353 }
354
355 forceinline void
359 forceinline void
363
366 switch (me) {
367 case ME_SET_VAL:
368 // Conditions: VAL, CARD, CLUB, CGLB, ANY
371 return ME_SET_FAILED;
372 cancel(home);
373 break;
374 case ME_SET_CARD:
375 // Conditions: CARD, CLUB, CGLB, ANY
378 return ME_SET_FAILED;
379 break;
380 case ME_SET_LUB:
381 // Conditions: CLUB, ANY
385 return ME_SET_FAILED;
386 break;
387 case ME_SET_GLB:
388 // Conditions: CGLB, ANY
391 return ME_SET_FAILED;
392 break;
393 case ME_SET_BB:
394 // Conditions: CLUB, CGLB, ANY
397 return ME_SET_FAILED;
398 break;
399 case ME_SET_CLUB:
400 // Conditions: CARD, CLUB, CGLB, ANY
403 return ME_SET_FAILED;
404 break;
405 case ME_SET_CGLB:
406 // Conditions: CARD, CLUB, CGLB, ANY
409 return ME_SET_FAILED;
410 break;
411 case ME_SET_CBB:
412 // Conditions: CARD, CLUB, CGLB, ANY
415 return ME_SET_FAILED;
416 break;
417 default: GECODE_NEVER;
418 }
419 return me;
420 }
421
422}}
423#endif
424#ifdef GECODE_HAS_FLOAT_VARS
425namespace Gecode { namespace Float {
426
429
433
437
438 forceinline void
442 forceinline void
443 FloatVarImpBase::subscribe(Gecode::Space& home, Gecode::Advisor& a, bool assigned, bool failed) {
445 }
446
447 forceinline void
451 forceinline void
455
476
477}}
478#endif
479namespace Gecode {
480
481 forceinline void
482 Space::update(ActorLink** sub) {
483#ifdef GECODE_HAS_INT_VARS
485#endif
486#ifdef GECODE_HAS_INT_VARS
488#endif
489#ifdef GECODE_HAS_SET_VARS
491#endif
492#ifdef GECODE_HAS_FLOAT_VARS
494#endif
495 }
496}
497// STATISTICS: kernel-var
int p
Number of positive literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Base-class for advisors.
Definition core.hpp:1292
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Base-class for Float-variable implementations.
Definition var-imp.hpp:185
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
Definition var-imp.hpp:439
FloatVarImpBase(void)
Constructor for creating static instance of variable.
Definition var-imp.hpp:428
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
Definition var-imp.hpp:448
Gecode::ModEvent notify(Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
Notify that variable implementation has been modified with modification event me and delta informatio...
Definition var-imp.hpp:457
void reschedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
Re-schedule propagator p.
Definition var-imp.hpp:452
Configuration for Float-variable implementations.
Definition var-type.hpp:416
Base-class for Bool-variable implementations.
Definition var-imp.hpp:93
BoolVarImpBase(void)
Constructor for creating static instance of variable.
Definition var-imp.hpp:293
Gecode::ModEvent notify(Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
Notify that variable implementation has been modified with modification event me and delta informatio...
Definition var-imp.hpp:322
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
Definition var-imp.hpp:304
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
Definition var-imp.hpp:313
void reschedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
Re-schedule propagator p.
Definition var-imp.hpp:317
Configuration for Bool-variable implementations.
Definition var-type.hpp:338
Base-class for Int-variable implementations.
Definition var-imp.hpp:47
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
Definition var-imp.hpp:243
IntVarImpBase(void)
Constructor for creating static instance of variable.
Definition var-imp.hpp:232
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
Definition var-imp.hpp:252
void reschedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
Re-schedule propagator p.
Definition var-imp.hpp:256
Gecode::ModEvent notify(Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
Notify that variable implementation has been modified with modification event me and delta informatio...
Definition var-imp.hpp:261
Configuration for Int-variable implementations.
Definition var-type.hpp:299
Base-class for propagators.
Definition core.hpp:1064
Base-class for Set-variable implementations.
Definition var-imp.hpp:139
void reschedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
Re-schedule propagator p.
Definition var-imp.hpp:360
Gecode::ModEvent notify(Gecode::Space &home, Gecode::ModEvent me, Gecode::Delta &d)
Notify that variable implementation has been modified with modification event me and delta informatio...
Definition var-imp.hpp:365
SetVarImpBase(void)
Constructor for creating static instance of variable.
Definition var-imp.hpp:336
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
Definition var-imp.hpp:347
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
Definition var-imp.hpp:356
Configuration for Set-variable implementations.
Definition var-type.hpp:377
Computation spaces.
Definition core.hpp:1742
Base-class for variable implementations.
Definition core.hpp:219
void subscribe(Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me, bool schedule)
Subscribe propagator p with propagation condition pc.
Definition core.hpp:4382
static void reschedule(Space &home, Propagator &p, PropCond pc, bool assigned, ModEvent me)
Schedule propagator p.
Definition core.hpp:4407
static void schedule(Space &home, Propagator &p, ModEvent me, bool force=false)
Schedule propagator p with modification event me.
Definition core.hpp:4288
static ModEvent me(const ModEventDelta &med)
Definition core.hpp:4270
const Gecode::ModEvent ME_FLOAT_VAL
Domain operation has resulted in a value (assigned variable)
Definition var-type.hpp:264
const Gecode::PropCond PC_FLOAT_VAL
Propagate when a view becomes assigned (single value)
Definition var-type.hpp:283
const Gecode::ModEvent ME_FLOAT_BND
Domain operation has changed the minimum or maximum of the domain.
Definition var-type.hpp:273
const Gecode::ModEvent ME_FLOAT_FAILED
Domain operation has resulted in failure.
Definition var-type.hpp:260
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:292
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
Definition var-type.hpp:65
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)
Definition var-type.hpp:82
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:91
const Gecode::ModEvent ME_BOOL_FAILED
Domain operation has resulted in failure.
Definition var-type.hpp:112
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
Definition var-type.hpp:52
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)
Definition var-type.hpp:116
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
Definition var-type.hpp:126
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
Definition var-type.hpp:56
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
Definition var-type.hpp:72
const Gecode::ModEvent ME_SET_CLUB
Domain operation has changed the least upper bound and the cardinality.
Definition var-type.hpp:179
const Gecode::ModEvent ME_SET_VAL
Domain operation has resulted in a value (assigned variable)
Definition var-type.hpp:142
const Gecode::ModEvent ME_SET_GLB
Domain operation has changed the greatest lower bound.
Definition var-type.hpp:164
const Gecode::ModEvent ME_SET_CGLB
Domain operation has changed the greatest lower bound and the cardinality.
Definition var-type.hpp:186
const Gecode::PropCond PC_SET_CARD
Propagate when the cardinality of a view changes.
Definition var-type.hpp:216
const Gecode::PropCond PC_SET_CLUB
Propagate when the cardinality or the least upper bound of a view changes.
Definition var-type.hpp:227
const Gecode::ModEvent ME_SET_CARD
Domain operation has changed the variable cardinality.
Definition var-type.hpp:148
const Gecode::PropCond PC_SET_VAL
Propagate when a view becomes assigned (single value)
Definition var-type.hpp:207
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Definition var-type.hpp:248
const Gecode::ModEvent ME_SET_LUB
Domain operation has changed the least upper bound.
Definition var-type.hpp:156
const Gecode::ModEvent ME_SET_BB
Domain operation has changed both greatest lower and least upper bound.
Definition var-type.hpp:172
const Gecode::ModEvent ME_SET_FAILED
Domain operation has resulted in failure.
Definition var-type.hpp:138
const Gecode::ModEvent ME_SET_CBB
Domain operation has changed both the greatest lower bound and the least upper bound,...
Definition var-type.hpp:197
const Gecode::PropCond PC_SET_CGLB
Propagate when the cardinality or the greatest lower bound of a view changes.
Definition var-type.hpp:238
Gecode toplevel namespace
int PropCond
Type for propagation conditions.
Definition core.hpp:72
Post propagator for SetVar x
Definition set.hh:767
int ModEvent
Type for modification events.
Definition core.hpp:62
#define forceinline
Definition config.hpp:187
#define GECODE_NEVER
Assert that this command is never executed.
Definition macros.hpp:56