main page
modules
namespaces
classes
files
Gecode home
Generated on Mon Feb 8 2021 00:00:00 for Gecode by
doxygen
1.8.20
gecode
int
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
47
namespace
Gecode
{
namespace
Int {
namespace
Dom {
48
55
template
<
class
View, ReifyMode rm>
56
class
ReRange
:
public
ReUnaryPropagator
<View,PC_INT_DOM,BoolView> {
57
protected
:
58
using
ReUnaryPropagator<View,PC_INT_DOM,BoolView>::x0
;
59
using
ReUnaryPropagator<View,PC_INT_DOM,BoolView>::b
;
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
:
86
using
ReUnaryPropagator<View,PC_INT_DOM,BoolView>::x0
;
87
using
ReUnaryPropagator<View,PC_INT_DOM,BoolView>::b
;
88
90
IntSet
is
;
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
108
#include <
gecode/int/dom/range.hpp
>
109
#include <
gecode/int/dom/set.hpp
>
110
111
#endif
112
113
// STATISTICS: int-prop
114
Gecode::x
Post propagator for SetVar x
Definition:
set.hh:767
Gecode::Int::Dom::ReRange
Reified range dom-propagator.
Definition:
dom.hh:56
Gecode::Int::Dom::ReRange::min
int min
Minimum of range.
Definition:
dom.hh:61
Gecode::Int::Dom::ReRange::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition:
range.hpp:82
int.hh
Gecode::Int::Dom::ReIntSet
Reified domain dom-propagator.
Definition:
dom.hh:84
Gecode::Space
Computation spaces.
Definition:
core.hpp:1742
Gecode::Int::Dom::ReIntSet::is
IntSet is
Domain
Definition:
dom.hh:90
Gecode::Actor
Base-class for both propagators and branchers.
Definition:
core.hpp:628
Gecode::Int::ReUnaryPropagator
Reified unary propagator.
Definition:
propagator.hpp:54
Gecode::Int::Dom::ReRange::post
static ExecStatus post(Home home, View x, int min, int max, BoolView b)
Post propagator for .
Definition:
range.hpp:46
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition:
view.hpp:1380
Gecode
Gecode toplevel namespace
Gecode::IntSet
Integer sets.
Definition:
int.hh:174
Gecode::Int::Dom::ReIntSet::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition:
set.hpp:93
Gecode::Home
Home class for posting propagators
Definition:
core.hpp:856
range.hpp
Gecode::Propagator::med
ModEventDelta med
A set of modification events (used during propagation)
Definition:
core.hpp:1075
Gecode::Int::Dom::ReIntSet::ReIntSet
ReIntSet(Space &home, ReIntSet &p)
Constructor for cloning p.
Definition:
set.hpp:81
Gecode::Int::Dom::ReRange::max
int max
Maximum of range.
Definition:
dom.hh:63
Gecode::Int::Dom::ReIntSet::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition:
set.hpp:46
Gecode::Int::Dom::ReIntSet::post
static ExecStatus post(Home home, View x, const IntSet &s, BoolView b)
Post propagator for .
Definition:
set.hpp:55
rel.hh
Gecode::Int::Dom::ReRange::ReRange
ReRange(Space &home, ReRange &p)
Constructor for cloning p.
Definition:
range.hpp:76
Gecode::Int::ReUnaryPropagator< View, PC_INT_DOM, BoolView >::b
BoolView b
Boolean control view.
Definition:
propagator.hpp:59
Gecode::Int::Dom::ReRange::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition:
range.hpp:88
Gecode::Int::Dom::ReIntSet::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition:
set.hpp:87
set.hpp
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition:
core.hpp:89
p
int p
Number of positive literals for node type.
Definition:
bool-expr.cpp:232
Gecode::ExecStatus
ExecStatus
Definition:
core.hpp:472