Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
dom.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 * Guido Tack <tack@gecode.org>
6 *
7 * Copyright:
8 * Christian Schulte, 2004
9 * Guido Tack, 2004
10 *
11 * This file is part of Gecode, the generic constraint
12 * development environment:
13 * http://www.gecode.org
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining
16 * a copy of this software and associated documentation files (the
17 * "Software"), to deal in the Software without restriction, including
18 * without limitation the rights to use, copy, modify, merge, publish,
19 * distribute, sublicense, and/or sell copies of the Software, and to
20 * permit persons to whom the Software is furnished to do so, subject to
21 * the following conditions:
22 *
23 * The above copyright notice and this permission notice shall be
24 * included in all copies or substantial portions of the Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 *
34 */
35
36#ifndef __GECODE_INT_DOM_HH__
37#define __GECODE_INT_DOM_HH__
38
39#include <gecode/int.hh>
40#include <gecode/int/rel.hh>
41
47namespace Gecode { namespace Int { namespace Dom {
48
55 template<class View, ReifyMode rm>
56 class ReRange : public ReUnaryPropagator<View,PC_INT_DOM,BoolView> {
57 protected:
61 int min;
63 int max;
65 ReRange(Space& home, ReRange& p);
67 ReRange(Home home, View x, int min, int max, BoolView b);
68 public:
70 virtual Actor* copy(Space& home);
72 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
74 static ExecStatus post(Home home, View x, int min, int max, BoolView b);
75 };
76
83 template<class View, ReifyMode rm>
84 class ReIntSet : public ReUnaryPropagator<View,PC_INT_DOM,BoolView> {
85 protected:
88
92 ReIntSet(Space& home, ReIntSet& p);
94 ReIntSet(Home home, View x, const IntSet& s, BoolView b);
95 public:
97 virtual Actor* copy(Space& home);
99 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
101 static ExecStatus post(Home home, View x, const IntSet& s, BoolView b);
103 virtual size_t dispose(Space& home);
104 };
105
106}}}
107
109#include <gecode/int/dom/set.hpp>
110
111#endif
112
113// STATISTICS: int-prop
114
int p
Number of positive literals for node type.
Base-class for both propagators and branchers.
Definition core.hpp:628
Home class for posting propagators
Definition core.hpp:856
Integer sets.
Definition int.hh:174
Boolean view for Boolean variables.
Definition view.hpp:1380
Reified domain dom-propagator.
Definition dom.hh:84
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition set.hpp:93
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition set.hpp:87
ReIntSet(Space &home, ReIntSet &p)
Constructor for cloning p.
Definition set.hpp:81
IntSet is
Domain
Definition dom.hh:90
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition set.hpp:46
static ExecStatus post(Home home, View x, const IntSet &s, BoolView b)
Post propagator for .
Definition set.hpp:55
Reified range dom-propagator.
Definition dom.hh:56
int min
Minimum of range.
Definition dom.hh:61
int max
Maximum of range.
Definition dom.hh:63
static ExecStatus post(Home home, View x, int min, int max, BoolView b)
Post propagator for .
Definition range.hpp:46
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition range.hpp:88
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition range.hpp:82
ReRange(Space &home, ReRange &p)
Constructor for cloning p.
Definition range.hpp:76
Reified unary propagator.
ModEventDelta med
A set of modification events (used during propagation)
Definition core.hpp:1075
Computation spaces.
Definition core.hpp:1742
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
Gecode toplevel namespace
ExecStatus
Definition core.hpp:472
Post propagator for SetVar x
Definition set.hh:767