Generated on for Gecode by doxygen 1.18.0
inter-distance.hh
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Claude-Guy Quimper <claude-guy.quimper@ift.ulaval.ca>
5 * Mikael Zayenz Lagerkvist <lagerkvist@gecode.dev>
6 *
7 * Copyright:
8 * Claude-Guy Quimper, 2006
9 * Mikael Zayenz Lagerkvist, 2026
10 *
11 * This file is part of Gecode, the generic constraint
12 * development environment:
13 * http://www.gecode.dev
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_INTER_DISTANCE_HH
37#define GECODE_INT_INTER_DISTANCE_HH
38
39#include <gecode/int.hh>
40
55namespace Gecode { namespace Int { namespace InterDistance {
56
70 template<class PView>
72 : public MixNaryOnePropagator<IntView,PC_INT_BND,PView,PC_INT_BND> {
73 protected:
79 Bnd(Home home, ViewArray<IntView>& x, PView p, bool advanced);
81 Bnd(Space& home, Bnd& b);
82 public:
84 virtual Propagator* copy(Space& home);
86 virtual PropCost cost(const Space&, const ModEventDelta&) const;
88 virtual ExecStatus propagate(Space& home, const ModEventDelta&);
90 virtual size_t dispose(Space& home);
92 static ExecStatus post(Home home, ViewArray<IntView>& x, PView p,
93 bool advanced);
94 };
95
96}}}
97
98#endif
99
100// STATISTICS: int-prop
Home class for posting propagators
Definition core.hpp:863
Integer view for integer variables.
Definition view.hpp:129
virtual size_t dispose(Space &home)
Cancel subscriptions and dispose.
virtual PropCost cost(const Space &, const ModEventDelta &) const
Cost of the current stage.
virtual Propagator * copy(Space &home)
Copy during cloning.
Bnd(Space &home, Bnd &b)
Constructor for cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &)
Perform propagation.
static ExecStatus post(Home home, ViewArray< IntView > &x, PView p, bool advanced)
Post propagator.
bool advanced
Whether to run quadratic filtering after the basic stage.
Bnd(Home home, ViewArray< IntView > &x, PView p, bool advanced)
Constructor for posting.
Propagation cost.
Definition core.hpp:493
friend class Space
Definition core.hpp:1075
Propagator(Home home)
Constructor for posting.
Definition core.hpp:3707
View arrays.
Definition array.hpp:255
#define GECODE_INT_EXPORT
Definition int.hh:86
int ModEventDelta
Modification event deltas.
Definition core.hpp:94
Inter-distance propagator.
Finite domain integers.
Definition lastval.hh:52
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:99
Gecode toplevel namespace
ExecStatus
Definition core.hpp:479