rel-op-const-cvv.cpp
Go to the documentation of this file.00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 00002 /* 00003 * Main authors: 00004 * Guido Tack <tack@gecode.org> 00005 * 00006 * Contributing authors: 00007 * Gabor Szokoli <szokoli@gecode.org> 00008 * 00009 * Copyright: 00010 * Guido Tack, 2004, 2005 00011 * 00012 * This file is part of Gecode, the generic constraint 00013 * development environment: 00014 * http://www.gecode.org 00015 * 00016 * Permission is hereby granted, free of charge, to any person obtaining 00017 * a copy of this software and associated documentation files (the 00018 * "Software"), to deal in the Software without restriction, including 00019 * without limitation the rights to use, copy, modify, merge, publish, 00020 * distribute, sublicense, and/or sell copies of the Software, and to 00021 * permit persons to whom the Software is furnished to do so, subject to 00022 * the following conditions: 00023 * 00024 * The above copyright notice and this permission notice shall be 00025 * included in all copies or substantial portions of the Software. 00026 * 00027 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00028 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00029 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00030 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 00031 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 00032 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00033 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00034 * 00035 */ 00036 00037 #include <gecode/set.hh> 00038 #include <gecode/set/rel.hh> 00039 #include <gecode/set/rel-op.hh> 00040 00041 namespace Gecode { 00042 using namespace Gecode::Set; 00043 using namespace Gecode::Set::Rel; 00044 using namespace Gecode::Set::RelOp; 00045 00046 void 00047 rel(Home home, const IntSet& x, SetOpType op, SetVar y, SetRelType r, 00048 SetVar z) { 00049 Set::Limits::check(x, "Set::rel"); 00050 ConstSetView xv(home, x); 00051 GECODE_POST; 00052 if (r == SRT_CMPL) { 00053 post_compl(home, xv, op, y, z); 00054 } else { 00055 post_nocompl(home, xv, op, y, r, z); 00056 } 00057 } 00058 00059 } 00060 00061 // STATISTICS: set-post