convex.cpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Guido Tack, 2004
* Christian Schulte, 2004
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include <gecode/set/convex.hh>
namespace Gecode {
void
convex(Home home, SetVar x) {
using namespace Gecode::Set;
GECODE_POST;
GECODE_ES_FAIL(Convex::Convex::post(home, x));
}
void
convex(Home home, SetVar x, SetVar y) {
using namespace Gecode::Set;
GECODE_POST;
GECODE_ES_FAIL(Convex::ConvexHull::post(home, x,y));
}
}
// STATISTICS: set-post
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::SetVar
Set variables
Definition set.hh:127
Gecode::Set::Convex::ConvexHull::post
static ExecStatus post(Home home, SetView x, SetView y)
Post propagator that propagates that y is the convex hull of x.
Definition hull.hpp:56
Gecode::Set::Convex::Convex::post
static ExecStatus post(Home home, SetView x)
Post propagator that propagates that x is convex.
Definition conv.hpp:56
convex.hh
GECODE_POST
#define GECODE_POST
Check for failure in a constraint post function.
Definition macros.hpp:40
GECODE_ES_FAIL
#define GECODE_ES_FAIL(es)
Check whether execution status es is failed, and fail space home.
Definition macros.hpp:103
Gecode::Set
Finite integer sets.
Definition var-imp.hpp:137
Gecode
Gecode toplevel namespace
Gecode::convex
void convex(Home home, SetVar x)
Post propagator that propagates that x is convex.
Definition convex.cpp:41