bool.hh
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2016
*
* 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.
*
*/
#ifndef __GECODE_FLOAT_BOOL_HH__
#define __GECODE_FLOAT_BOOL_HH__
#include <gecode/float.hh>
namespace Gecode { namespace Float { namespace Bool {
template<class View>
class Ite : public Propagator {
protected:
Int::BoolView b;
View x0, x1, x2;
Ite(Space& home, Ite& p);
Ite(Home home, Int::BoolView b, View x0, View x1, View x2);
public:
virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
virtual void reschedule(Space& home);
virtual Actor* copy(Space& home);
virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
static ExecStatus post(Home home, Int::BoolView b,
View x0, View x1, View x2);
virtual size_t dispose(Space& home);
};
}}}
#include <gecode/float/bool/ite.hpp>
#endif
// STATISTICS: float-prop
Gecode::ActorLink::Actor
friend class Actor
Definition core.hpp:590
Gecode::Float::Bool::Ite::x2
View x2
Definition bool.hh:58
Gecode::Float::Bool::Ite::cost
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary).
Definition ite.hpp:60
Gecode::Float::Bool::Ite::reschedule
virtual void reschedule(Space &home)
Schedule function.
Definition ite.hpp:66
Gecode::Float::Bool::Ite::x0
View x0
Views.
Definition bool.hh:58
Gecode::Float::Bool::Ite::post
static ExecStatus post(Home home, Int::BoolView b, View x0, View x1, View x2)
Post if-then-else propagator.
Definition ite.hpp:94
Gecode::Float::Bool::Ite::b
Int::BoolView b
View for condition.
Definition bool.hh:56
Gecode::Float::Bool::Ite::copy
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition ite.hpp:88
Gecode::Float::Bool::Ite::dispose
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition ite.hpp:75
Gecode::Float::Bool::Ite::propagate
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition ite.hpp:107
Gecode::Float::Bool::Ite::Ite
Ite(Space &home, Ite &p)
Constructor for cloning p.
Gecode::Float::Bool::Ite::x1
View x1
Definition bool.hh:58
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::PropCost
Propagation cost.
Definition core.hpp:486
Gecode::Propagator::Space
friend class Space
Definition core.hpp:1066
Gecode::Propagator::med
ModEventDelta med
A set of modification events (used during propagation).
Definition core.hpp:1075
Gecode::Propagator::Propagator
Propagator(Home home)
Constructor for posting.
Definition core.hpp:3498
Gecode::View
ite.hpp
float.hh
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
Gecode::Float::Bool
Boolean propagators.
Gecode::Float
Floating point numbers.
Gecode
Gecode toplevel namespace
Gecode::ExecStatus
ExecStatus
Definition core.hpp:472