Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
nogoods.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 *
6 * Copyright:
7 * Christian Schulte, 2013
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
34#ifndef __GECODE_SEARCH_NOGOODS_HH__
35#define __GECODE_SEARCH_NOGOODS_HH__
36
37#include <gecode/search.hh>
38
39namespace Gecode { namespace Search {
40
43 public:
45 NoNGL(void);
47 NoNGL(Space& home);
49 NoNGL(Space& home, NoNGL& ngl);
51 virtual void subscribe(Space& home, Propagator& p);
53 virtual void reschedule(Space& home, Propagator& p);
55 virtual void cancel(Space& home, Propagator& p);
57 virtual NGL::Status status(const Space& home) const;
59 virtual ExecStatus prune(Space& home);
61 virtual NGL* copy(Space& home);
62 };
63
66 protected:
70 unsigned int n;
72 NoGoodsProp(Space& home, NGL* root);
75 public:
77 virtual Actor* copy(Space& home);
79 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
81 virtual void reschedule(Space& home);
83 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
85 template<class Path>
86 static ExecStatus post(Space& home, const Path& p);
88 virtual size_t dispose(Space& home);
89 };
90
91}}
92
94
95#endif
96
97// STATISTICS: search-other
int p
Number of positive literals for node type.
Base-class for both propagators and branchers.
Definition core.hpp:628
No-good literal recorded during search.
Definition core.hpp:1340
Status
The status of a no-good literal.
Definition core.hpp:1346
Propagation cost.
Definition core.hpp:486
Base-class for propagators.
Definition core.hpp:1064
No-good propagator.
Definition nogoods.hh:65
unsigned int n
Number of no-good literals with subscriptions.
Definition nogoods.hh:70
NGL * root
Root of no-good literal tree.
Definition nogoods.hh:68
Class for a sentinel no-good literal.
Definition nogoods.hh:42
Computation spaces.
Definition core.hpp:1742
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
Gecode toplevel namespace
ExecStatus
Definition core.hpp:472
#define GECODE_SEARCH_EXPORT
Definition search.hh:67
#define GECODE_VTABLE_EXPORT
Definition support.hh:72