Generated on Sat Feb 7 2015 02:01:30 for Gecode by doxygen 1.8.9.1
rel-op-ternary.cpp
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Guido Tack <tack@gecode.org>
5  *
6  * Contributing authors:
7  * Gabor Szokoli <szokoli@gecode.org>
8  *
9  * Copyright:
10  * Guido Tack, 2004, 2005
11  *
12  * Last modified:
13  * $Date: 2009-11-03 15:25:25 +0100 (Tue, 03 Nov 2009) $ by $Author: schulte $
14  * $Revision: 10030 $
15  *
16  * This file is part of Gecode, the generic constraint
17  * development environment:
18  * http://www.gecode.org
19  *
20  * Permission is hereby granted, free of charge, to any person obtaining
21  * a copy of this software and associated documentation files (the
22  * "Software"), to deal in the Software without restriction, including
23  * without limitation the rights to use, copy, modify, merge, publish,
24  * distribute, sublicense, and/or sell copies of the Software, and to
25  * permit persons to whom the Software is furnished to do so, subject to
26  * the following conditions:
27  *
28  * The above copyright notice and this permission notice shall be
29  * included in all copies or substantial portions of the Software.
30  *
31  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
35  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
36  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
37  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38  *
39  */
40 
41 #include <gecode/set/rel-op.hh>
42 
43 namespace Gecode {
44  using namespace Gecode::Set;
45  using namespace Gecode::Set::Rel;
46  using namespace Gecode::Set::RelOp;
47 
48  void
50  if (home.failed()) return;
51  if (r == SRT_CMPL) {
52  post_compl(home, x, op, y, z);
53  } else {
54  post_nocompl(home, x, op, y, r, z);
55  }
56  }
57 
58 }
59 
60 // STATISTICS: set-post
bool failed(void) const
Check whether corresponding space is failed.
Definition: core.hpp:3446
SetRelType
Common relation types for sets.
Definition: set.hh:644
void post_nocompl(Home home, ConstSetView x, SetOpType op, SetView y, SetRelType r, ConstSetView z)
SetOpType
Common operations for sets.
Definition: set.hh:661
Complement.
Definition: set.hh:650
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
Standard set operation propagators.
Definition: common.hpp:81
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
Set variables
Definition: set.hh:129
Standard set relation propagators.
Definition: common.hpp:57
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Definition: rel.cpp:47
Finite integer sets.
Definition: var-imp.hpp:115
Gecode toplevel namespace
void post_compl(Home home, ConstSetView x, SetOpType op, SetView y, ConstSetView z)
Home class for posting propagators
Definition: core.hpp:717