view.hpp
Go to the documentation of this file.
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Contributing authors:
* Samuel Gagnon <samuel.gagnon92@gmail.com>
*
* Copyright:
* Christian Schulte, 2005
* Samuel Gagnon, 2018
*
* 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 <iostream>
namespace Gecode { namespace Int {
template<class View>
class ViewRanges {
public:
ViewRanges(void);
ViewRanges(const View& x);
void init(const View& x);
bool operator ()(void) const;
void operator ++(void);
int min(void) const;
int max(void) const;
unsigned int width(void) const;
};
template<class View>
class ViewValues : public Iter::Ranges::ToValues<ViewRanges<View> > {
public:
ViewValues(void);
ViewValues(const View& x);
void init(const View& x);
};
}}
#include <gecode/int/view/iter.hpp>
namespace Gecode { namespace Int {
class IntView : public VarImpView<IntVar> {
protected:
using VarImpView<IntVar>::x;
public:
IntView(void);
IntView(const IntVar& y);
IntView(IntVarImp* y);
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
#ifdef GECODE_HAS_CBS
int baseval(int val) const;
#endif
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
static ModEventDelta med(ModEvent me);
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const IntView& x);
class MinusView : public DerivedView<IntView> {
protected:
using DerivedView<IntView>::x;
public:
MinusView(void);
explicit MinusView(const IntView& y);
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
#ifdef GECODE_HAS_CBS
int baseval(int val) const;
#endif
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
static ModEventDelta med(ModEvent me);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const MinusView& x);
bool operator ==(const MinusView& x, const MinusView& y);
bool operator !=(const MinusView& x, const MinusView& y);
class OffsetView : public DerivedView<IntView> {
protected:
int c;
using DerivedView<IntView>::x;
public:
OffsetView(void);
OffsetView(const IntView& y, int c);
int offset(void) const;
void offset(int n);
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
#ifdef GECODE_HAS_CBS
int baseval(int val) const;
#endif
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
static ModEventDelta med(ModEvent me);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
void update(Space& home, OffsetView& y);
bool operator <(const OffsetView& y) const;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const OffsetView& x);
bool operator ==(const OffsetView& x, const OffsetView& y);
bool operator !=(const OffsetView& x, const OffsetView& y);
template<class View>
class NoOffset {
public:
typedef View ViewType;
View& operator ()(View& x);
void update(const NoOffset&);
int offset(void) const;
};
template<class View>
forceinline View&
NoOffset<View>::operator ()(View& x) {
return x;
}
template<class View>
forceinline void
NoOffset<View>::update(const NoOffset&) {}
template<class View>
forceinline int
NoOffset<View>::offset(void) const {
return 0;
}
class Offset {
public:
typedef OffsetView ViewType;
int c;
Offset(int off = 0);
OffsetView operator()(IntView& x);
void update(const Offset& o);
int offset(void) const;
};
forceinline
Offset::Offset(int off) : c(off) {}
forceinline void
Offset::update(const Offset& o) { c = o.c; }
forceinline int
Offset::offset(void) const { return c; }
forceinline OffsetView
Offset::operator ()(IntView& x) {
return OffsetView(x,c);
}
template<class Val, class UnsVal>
class ScaleView : public DerivedView<IntView> {
protected:
using DerivedView<IntView>::x;
int a;
public:
ScaleView(void);
ScaleView(int b, const IntView& y);
int scale(void) const;
Val min(void) const;
Val max(void) const;
Val med(void) const;
Val val(void) const;
#ifdef GECODE_HAS_CBS
Val baseval(Val val) const;
#endif
UnsVal size(void) const;
UnsVal width(void) const;
UnsVal regret_min(void) const;
UnsVal regret_max(void) const;
bool range(void) const;
bool in(Val n) const;
ModEvent lq(Space& home, Val n);
ModEvent le(Space& home, Val n);
ModEvent gq(Space& home, Val n);
ModEvent gr(Space& home, Val n);
ModEvent nq(Space& home, Val n);
ModEvent eq(Space& home, Val n);
static ModEventDelta med(ModEvent me);
Val min(const Delta& d) const;
Val max(const Delta& d) const;
UnsVal width(const Delta& d) const;
bool any(const Delta& d) const;
void update(Space& home, ScaleView<Val,UnsVal>& y);
bool operator <(const ScaleView<Val,UnsVal>& y) const;
};
typedef ScaleView<int,unsigned int> IntScaleView;
typedef ScaleView<long long int,unsigned long long int> LLongScaleView;
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const IntScaleView& x);
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const LLongScaleView& x);
template<class Val, class UnsVal>
bool operator ==(const ScaleView<Val,UnsVal>& x,
const ScaleView<Val,UnsVal>& y);
template<class Val, class UnsVal>
bool operator !=(const ScaleView<Val,UnsVal>& x,
const ScaleView<Val,UnsVal>& y);
class ConstIntView : public ConstView<IntView> {
protected:
int x;
public:
ConstIntView(void);
ConstIntView(int n);
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
void update(Space& home, ConstIntView& y);
bool operator <(const ConstIntView& y) const;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const ConstIntView& x);
bool operator ==(const ConstIntView& x, const ConstIntView& y);
bool operator !=(const ConstIntView& x, const ConstIntView& y);
class ZeroIntView : public ConstView<IntView> {
public:
ZeroIntView(void);
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const ZeroIntView& x);
bool operator ==(const ZeroIntView& x, const ZeroIntView& y);
bool operator !=(const ZeroIntView& x, const ZeroIntView& y);
template<class View> class ViewDiffRanges;
template<class View>
class CachedView : public DerivedView<View> {
friend class ViewDiffRanges<View>;
protected:
using DerivedView<View>::x;
RangeList* _firstRange;
RangeList* _lastRange;
unsigned int _size;
public:
CachedView(void);
explicit CachedView(const View& y);
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
#ifdef GECODE_HAS_CBS
int baseval(int val) const;
#endif
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
static ModEventDelta med(ModEvent me);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
void initCache(Space& home, const IntSet& s);
void cache(Space& home);
bool modified(void) const;
void update(Space& home, CachedView<View>& y);
};
template<class Char, class Traits, class View>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const CachedView<View>& x);
template<class View>
bool operator ==(const CachedView<View>& x, const CachedView<View>& y);
template<class View>
bool operator !=(const CachedView<View>& x, const CachedView<View>& y);
template<class View>
class ViewDiffRanges
: public Iter::Ranges::Diff<Iter::Ranges::RangeList,ViewRanges<View> > {
typedef Iter::Ranges::Diff<Iter::Ranges::RangeList,ViewRanges<View> >
Super;
protected:
Iter::Ranges::RangeList cr;
ViewRanges<View> dr;
public:
ViewDiffRanges(void);
ViewDiffRanges(const CachedView<View>& x);
void init(const CachedView<View>& x);
};
class BoolView : public VarImpView<BoolVar> {
protected:
using VarImpView<BoolVar>::x;
public:
BoolView(void);
BoolView(const BoolVar& y);
BoolView(BoolVarImp* y);
static const int BITS = BoolVarImp::BITS;
static const BoolStatus ZERO = BoolVarImp::ZERO;
static const BoolStatus ONE = BoolVarImp::ONE;
static const BoolStatus NONE = BoolVarImp::NONE;
BoolStatus status(void) const;
int min(void) const;
int max(void) const;
int med(void) const;
int val(void) const;
#ifdef GECODE_HAS_CBS
int baseval(int val) const;
#endif
unsigned int size(void) const;
unsigned int width(void) const;
unsigned int regret_min(void) const;
unsigned int regret_max(void) const;
bool range(void) const;
bool in(int n) const;
bool in(long long int n) const;
bool zero(void) const;
bool one(void) const;
bool none(void) const;
ModEvent one(Space& home);
ModEvent zero(Space& home);
ModEvent one_none(Space& home);
ModEvent zero_none(Space& home);
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
template<class I>
ModEvent narrow_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_r(Space& home, I& i, bool depends=true);
template<class I>
ModEvent narrow_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent inter_v(Space& home, I& i, bool depends=true);
template<class I>
ModEvent minus_v(Space& home, I& i, bool depends=true);
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
static bool zero(const Delta& d);
static bool one(const Delta& d);
static ModEventDelta med(ModEvent me);
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const BoolView& x);
class NegBoolView : public DerivedView<BoolView> {
protected:
using DerivedView<BoolView>::x;
public:
NegBoolView(void);
explicit NegBoolView(const BoolView& y);
static const int BITS = BoolView::BITS;
static const BoolStatus ZERO = BoolView::ONE;
static const BoolStatus ONE = BoolView::ZERO;
static const BoolStatus NONE = BoolView::NONE;
BoolStatus status(void) const;
bool zero(void) const;
bool one(void) const;
bool none(void) const;
ModEvent one(Space& home);
ModEvent zero(Space& home);
ModEvent one_none(Space& home);
ModEvent zero_none(Space& home);
ModEvent lq(Space& home, int n);
ModEvent lq(Space& home, long long int n);
ModEvent le(Space& home, int n);
ModEvent le(Space& home, long long int n);
ModEvent gq(Space& home, int n);
ModEvent gq(Space& home, long long int n);
ModEvent gr(Space& home, int n);
ModEvent gr(Space& home, long long int n);
ModEvent nq(Space& home, int n);
ModEvent nq(Space& home, long long int n);
ModEvent eq(Space& home, int n);
ModEvent eq(Space& home, long long int n);
int min(void) const;
int max(void) const;
int val(void) const;
#ifdef GECODE_HAS_CBS
int baseval(int val) const;
#endif
int min(const Delta& d) const;
int max(const Delta& d) const;
unsigned int width(const Delta& d) const;
bool any(const Delta& d) const;
static bool zero(const Delta& d);
static bool one(const Delta& d);
};
bool operator ==(const NegBoolView& x, const NegBoolView& y);
bool operator !=(const NegBoolView& x, const NegBoolView& y);
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const NegBoolView& x);
}}
#include <gecode/int/var/int.hpp>
#include <gecode/int/var/bool.hpp>
#include <gecode/int/view/int.hpp>
#include <gecode/int/view/constint.hpp>
#include <gecode/int/view/zero.hpp>
#include <gecode/int/view/minus.hpp>
#include <gecode/int/view/offset.hpp>
#include <gecode/int/view/scale.hpp>
#include <gecode/int/view/cached.hpp>
#include <gecode/int/view/bool.hpp>
#include <gecode/int/view/neg-bool.hpp>
#include <gecode/int/view/print.hpp>
#include <gecode/int/var/print.hpp>
namespace Gecode { namespace Int {
enum RelTest {
RT_FALSE = 0,
RT_MAYBE = 1,
RT_TRUE = 2
};
template<class VX, class VY> RelTest rtest_eq_bnd(VX x, VY y);
template<class VX, class VY> RelTest rtest_eq_dom(VX x, VY y);
template<class VX> RelTest rtest_eq_bnd(VX x, int n);
template<class VX> RelTest rtest_eq_dom(VX x, int n);
template<class VX, class VY> RelTest rtest_nq_bnd(VX x, VY y);
template<class VX, class VY> RelTest rtest_nq_dom(VX x, VY y);
template<class VX> RelTest rtest_nq_bnd(VX x, int n);
template<class VX> RelTest rtest_nq_dom(VX x, int n);
template<class VX, class VY> RelTest rtest_lq(VX x, VY y);
template<class VX> RelTest rtest_lq(VX x, int n);
template<class VX, class VY> RelTest rtest_le(VX x, VY y);
template<class VX> RelTest rtest_le(VX x, int n);
template<class VX, class VY> RelTest rtest_gq(VX x, VY y);
template<class VX> RelTest rtest_gq(VX x, int n);
template<class VX, class VY> RelTest rtest_gr(VX x, VY y);
template<class VX> RelTest rtest_gr(VX x, int n);
enum BoolTest {
BT_NONE,
BT_SAME,
BT_COMP
};
BoolTest bool_test(const BoolView& b0, const BoolView& b1);
BoolTest bool_test(const BoolView& b0, const NegBoolView& b1);
BoolTest bool_test(const NegBoolView& b0, const BoolView& b1);
BoolTest bool_test(const NegBoolView& b0, const NegBoolView& b1);
}}
#include <gecode/int/view/rel-test.hpp>
#include <gecode/int/view/bool-test.hpp>
// STATISTICS: int-var
bool-test.hpp
Gecode::BoolVar
Boolean integer variables.
Definition int.hh:512
Gecode::ConstView
Base-class for constant views.
Definition view.hpp:45
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::DerivedView< IntView >::x
IntView x
Definition view.hpp:238
Gecode::DerivedView< IntView >::DerivedView
DerivedView(void)
Definition view.hpp:584
Gecode::DerivedView< IntView >::me
static ModEvent me(const ModEventDelta &med)
Definition view.hpp:639
Gecode::IntSet
Integer sets.
Definition int.hh:174
Gecode::IntVar
Integer variables.
Definition int.hh:371
Gecode::Int::BoolVarImp
Boolean variable implementation.
Definition var-imp.hpp:491
Gecode::Int::BoolVarImp::BITS
static const int BITS
How many bits does the status have.
Definition var-imp.hpp:519
Gecode::Int::BoolVarImp::NONE
static const BoolStatus NONE
Status of domain not yet assigned.
Definition var-imp.hpp:525
Gecode::Int::BoolVarImp::ZERO
static const BoolStatus ZERO
Status of domain assigned to zero.
Definition var-imp.hpp:521
Gecode::Int::BoolVarImp::ONE
static const BoolStatus ONE
Status of domain assigned to one.
Definition var-imp.hpp:523
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::Int::BoolView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition bool.hpp:125
Gecode::Int::BoolView::in
bool in(int n) const
Test whether n is contained in domain.
Definition bool.hpp:111
Gecode::Int::BoolView::BoolView
BoolView(void)
Default constructor.
Definition bool.hpp:45
Gecode::Int::BoolView::max
int max(void) const
Return maximum of domain.
Definition bool.hpp:66
Gecode::Int::BoolView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition bool.hpp:273
Gecode::Int::BoolView::NONE
static const BoolStatus NONE
Status of domain not yet assigned.
Definition view.hpp:1403
Gecode::Int::BoolView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition bool.hpp:97
Gecode::Int::BoolView::ONE
static const BoolStatus ONE
Status of domain assigned to one.
Definition view.hpp:1401
Gecode::Int::BoolView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition bool.hpp:185
Gecode::Int::BoolView::min
int min(void) const
Return minimum of domain.
Definition bool.hpp:62
Gecode::Int::BoolView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition bool.hpp:190
Gecode::Int::BoolView::range
bool range(void) const
Test whether domain is a range.
Definition bool.hpp:107
Gecode::Int::BoolView::zero_none
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
Definition bool.hpp:238
Gecode::Int::BoolView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition bool.hpp:85
Gecode::Int::BoolView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition bool.hpp:200
Gecode::Int::BoolView::none
bool none(void) const
Test whether view is not yet assigned.
Definition bool.hpp:228
Gecode::Int::BoolView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition bool.hpp:205
Gecode::Int::BoolView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition bool.hpp:161
Gecode::Int::BoolView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition bool.hpp:143
Gecode::Int::BoolView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition bool.hpp:134
Gecode::Int::BoolView::status
BoolStatus status(void) const
Return current domain status.
Definition bool.hpp:58
Gecode::Int::BoolView::zero
bool zero(void) const
Test whether view is assigned to be zero.
Definition bool.hpp:220
Gecode::Int::BoolView::one_none
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
Definition bool.hpp:242
Gecode::Int::BoolView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition bool.hpp:152
Gecode::Int::BoolView::BITS
static const int BITS
How many bits does the status have.
Definition view.hpp:1397
Gecode::Int::BoolView::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition bool.hpp:70
Gecode::Int::BoolView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition bool.hpp:170
Gecode::Int::BoolView::one
bool one(void) const
Test whether view is assigned to be one.
Definition bool.hpp:224
Gecode::Int::BoolView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition bool.hpp:195
Gecode::Int::BoolView::val
int val(void) const
Return assigned value (only if assigned).
Definition bool.hpp:74
Gecode::Int::BoolView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition bool.hpp:93
Gecode::Int::BoolView::ZERO
static const BoolStatus ZERO
Status of domain assigned to zero.
Definition view.hpp:1399
Gecode::Int::BoolView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition bool.hpp:210
Gecode::Int::BoolView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition bool.hpp:89
Gecode::Int::CachedView
Cached integer view.
Definition view.hpp:1166
Gecode::Int::CachedView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition cached.hpp:154
Gecode::Int::CachedView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition cached.hpp:93
Gecode::Int::CachedView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition cached.hpp:269
Gecode::Int::CachedView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition cached.hpp:144
Gecode::Int::CachedView::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition cached.hpp:70
Gecode::Int::CachedView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition cached.hpp:88
Gecode::Int::CachedView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition cached.hpp:225
Gecode::Int::CachedView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition cached.hpp:201
Gecode::Int::CachedView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition cached.hpp:231
Gecode::Int::CachedView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition cached.hpp:184
Gecode::Int::CachedView::_firstRange
RangeList * _firstRange
First cached range.
Definition view.hpp:1171
Gecode::Int::CachedView::_lastRange
RangeList * _lastRange
Last cached range.
Definition view.hpp:1173
Gecode::Int::CachedView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition cached.hpp:213
Gecode::Int::CachedView::in
bool in(int n) const
Test whether n is contained in domain.
Definition cached.hpp:118
Gecode::Int::CachedView::initCache
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
Definition cached.hpp:307
Gecode::Int::CachedView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition cached.hpp:103
Gecode::Int::CachedView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition cached.hpp:219
Gecode::Int::CachedView::_size
unsigned int _size
Size of cached domain.
Definition view.hpp:1175
Gecode::Int::CachedView::range
bool range(void) const
Test whether domain is a range.
Definition cached.hpp:113
Gecode::Int::CachedView::val
int val(void) const
Return assigned value (only if assigned).
Definition cached.hpp:75
Gecode::Int::CachedView::cache
void cache(Space &home)
Update cache to current domain.
Definition cached.hpp:319
Gecode::Int::CachedView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition cached.hpp:134
Gecode::Int::CachedView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition cached.hpp:207
Gecode::Int::CachedView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition cached.hpp:164
Gecode::Int::CachedView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition cached.hpp:98
Gecode::Int::CachedView::min
int min(void) const
Return minimum of domain.
Definition cached.hpp:60
Gecode::Int::CachedView::modified
bool modified(void) const
Check whether cache differs from current domain.
Definition cached.hpp:336
Gecode::Int::CachedView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition cached.hpp:174
Gecode::Int::CachedView::update
void update(Space &home, CachedView< View > &y)
Update this view to be a clone of view y.
Definition cached.hpp:281
Gecode::Int::CachedView::max
int max(void) const
Return maximum of domain.
Definition cached.hpp:65
Gecode::Int::CachedView::CachedView
CachedView(void)
Default constructor.
Definition cached.hpp:46
Gecode::Int::ConstIntView
Constant integer view.
Definition view.hpp:851
Gecode::Int::ConstIntView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition constint.hpp:168
Gecode::Int::ConstIntView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition constint.hpp:192
Gecode::Int::ConstIntView::range
bool range(void) const
Test whether domain is a range.
Definition constint.hpp:89
Gecode::Int::ConstIntView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition constint.hpp:152
Gecode::Int::ConstIntView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition constint.hpp:134
Gecode::Int::ConstIntView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition constint.hpp:173
Gecode::Int::ConstIntView::operator<
bool operator<(const ConstIntView &y) const
Whether this view comes before view y (arbitray order).
Definition constint.hpp:245
Gecode::Int::ConstIntView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition constint.hpp:180
Gecode::Int::ConstIntView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition constint.hpp:75
Gecode::Int::ConstIntView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition constint.hpp:79
Gecode::Int::ConstIntView::in
bool in(int n) const
Test whether n is contained in domain.
Definition constint.hpp:93
Gecode::Int::ConstIntView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition constint.hpp:67
Gecode::Int::ConstIntView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition constint.hpp:107
Gecode::Int::ConstIntView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition constint.hpp:143
Gecode::Int::ConstIntView::min
int min(void) const
Return minimum of domain.
Definition constint.hpp:50
Gecode::Int::ConstIntView::max
int max(void) const
Return maximum of domain.
Definition constint.hpp:54
Gecode::Int::ConstIntView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition constint.hpp:71
Gecode::Int::ConstIntView::update
void update(Space &home, ConstIntView &y)
Update this view to be a clone of view y.
Definition constint.hpp:234
Gecode::Int::ConstIntView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition constint.hpp:116
Gecode::Int::ConstIntView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition constint.hpp:125
Gecode::Int::ConstIntView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition constint.hpp:187
Gecode::Int::ConstIntView::x
int x
Definition view.hpp:853
Gecode::Int::ConstIntView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition constint.hpp:199
Gecode::Int::ConstIntView::ConstIntView
ConstIntView(void)
Default constructor.
Definition constint.hpp:41
Gecode::Int::ConstIntView::val
int val(void) const
Return assigned value (only if assigned).
Definition constint.hpp:62
Gecode::Int::ConstIntView::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition constint.hpp:58
Gecode::Int::ConstIntView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition constint.hpp:223
Gecode::Int::IntVarImp
Integer variable implementation.
Definition var-imp.hpp:89
Gecode::Int::IntView
Integer view for integer variables.
Definition view.hpp:129
Gecode::Int::IntView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition int.hpp:81
Gecode::Int::IntView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition int.hpp:186
Gecode::Int::IntView::min
int min(void) const
Return minimum of domain.
Definition int.hpp:58
Gecode::Int::IntView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition int.hpp:85
Gecode::Int::IntView::range
bool range(void) const
Test whether domain is a range.
Definition int.hpp:103
Gecode::Int::IntView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition int.hpp:148
Gecode::Int::IntView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition int.hpp:196
Gecode::Int::IntView::in
bool in(int n) const
Test whether n is contained in domain.
Definition int.hpp:107
Gecode::Int::IntView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition int.hpp:121
Gecode::Int::IntView::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition int.hpp:66
Gecode::Int::IntView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition int.hpp:130
Gecode::Int::IntView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition int.hpp:201
Gecode::Int::IntView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition int.hpp:139
Gecode::Int::IntView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition int.hpp:206
Gecode::Int::IntView::IntView
IntView(void)
Default constructor.
Definition int.hpp:45
Gecode::Int::IntView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition int.hpp:89
Gecode::Int::IntView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition int.hpp:191
Gecode::Int::IntView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition int.hpp:93
Gecode::Int::IntView::val
int val(void) const
Return assigned value (only if assigned).
Definition int.hpp:70
Gecode::Int::IntView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition int.hpp:230
Gecode::Int::IntView::max
int max(void) const
Return maximum of domain.
Definition int.hpp:62
Gecode::Int::IntView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition int.hpp:181
Gecode::Int::IntView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition int.hpp:157
Gecode::Int::IntView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition int.hpp:166
Gecode::Int::MinusView
Minus integer view.
Definition view.hpp:282
Gecode::Int::MinusView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition minus.hpp:196
Gecode::Int::MinusView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition minus.hpp:160
Gecode::Int::MinusView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition minus.hpp:151
Gecode::Int::MinusView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition minus.hpp:87
Gecode::Int::MinusView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition minus.hpp:124
Gecode::Int::MinusView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition minus.hpp:75
Gecode::Int::MinusView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition minus.hpp:142
Gecode::Int::MinusView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition minus.hpp:115
Gecode::Int::MinusView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition minus.hpp:83
Gecode::Int::MinusView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition minus.hpp:189
Gecode::Int::MinusView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition minus.hpp:133
Gecode::Int::MinusView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition minus.hpp:203
Gecode::Int::MinusView::max
int max(void) const
Return maximum of domain.
Definition minus.hpp:60
Gecode::Int::MinusView::min
int min(void) const
Return minimum of domain.
Definition minus.hpp:56
Gecode::Int::MinusView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition minus.hpp:182
Gecode::Int::MinusView::in
bool in(int n) const
Test whether n is contained in domain.
Definition minus.hpp:101
Gecode::Int::MinusView::range
bool range(void) const
Test whether domain is a range.
Definition minus.hpp:97
Gecode::Int::MinusView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition minus.hpp:79
Gecode::Int::MinusView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition minus.hpp:175
Gecode::Int::MinusView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition minus.hpp:244
Gecode::Int::MinusView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition minus.hpp:210
Gecode::Int::MinusView::MinusView
MinusView(void)
Default constructor.
Definition minus.hpp:45
Gecode::Int::MinusView::med
int med(void) const
Return median of domain.
Definition minus.hpp:297
Gecode::Int::MinusView::val
int val(void) const
Return assigned value (only if assigned).
Definition minus.hpp:64
Gecode::Int::NegBoolView
Negated Boolean view.
Definition view.hpp:1574
Gecode::Int::NegBoolView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition neg-bool.hpp:129
Gecode::Int::NegBoolView::status
BoolStatus status(void) const
Return current domain status.
Definition neg-bool.hpp:61
Gecode::Int::NegBoolView::zero
bool zero(void) const
Test whether view is assigned to be zero.
Definition neg-bool.hpp:65
Gecode::Int::NegBoolView::one
bool one(void) const
Test whether view is assigned to be one.
Definition neg-bool.hpp:69
Gecode::Int::NegBoolView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition neg-bool.hpp:121
Gecode::Int::NegBoolView::none
bool none(void) const
Test whether view is not yet assigned.
Definition neg-bool.hpp:73
Gecode::Int::NegBoolView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition neg-bool.hpp:113
Gecode::Int::NegBoolView::width
unsigned int width(const Delta &d) const
Return width of values just pruned.
Definition neg-bool.hpp:190
Gecode::Int::NegBoolView::one_none
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
Definition neg-bool.hpp:87
Gecode::Int::NegBoolView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition neg-bool.hpp:194
Gecode::Int::NegBoolView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition neg-bool.hpp:105
Gecode::Int::NegBoolView::ONE
static const BoolStatus ONE
Status of domain assigned to one.
Definition view.hpp:1593
Gecode::Int::NegBoolView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition neg-bool.hpp:137
Gecode::Int::NegBoolView::max
int max(void) const
Return maximum of domain.
Definition neg-bool.hpp:162
Gecode::Int::NegBoolView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition neg-bool.hpp:145
Gecode::Int::NegBoolView::min
int min(void) const
Return minimum of domain.
Definition neg-bool.hpp:158
Gecode::Int::NegBoolView::NONE
static const BoolStatus NONE
Status of domain not yet assigned.
Definition view.hpp:1595
Gecode::Int::NegBoolView::zero_none
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
Definition neg-bool.hpp:83
Gecode::Int::NegBoolView::NegBoolView
NegBoolView(void)
Default constructor.
Definition neg-bool.hpp:50
Gecode::Int::NegBoolView::val
int val(void) const
Return assigned value (only if assigned).
Definition neg-bool.hpp:166
Gecode::Int::NegBoolView::BITS
static const int BITS
How many bits does the status have.
Definition view.hpp:1589
Gecode::Int::NegBoolView::ZERO
static const BoolStatus ZERO
Status of domain assigned to zero.
Definition view.hpp:1591
Gecode::Int::NoOffset
Converter without offsets.
Definition view.hpp:618
Gecode::Int::NoOffset::ViewType
View ViewType
The view type.
Definition view.hpp:621
Gecode::Int::NoOffset::update
void update(const NoOffset &)
Update during cloning.
Gecode::Int::NoOffset::offset
int offset(void) const
Access offset.
Gecode::Int::NoOffset::operator()
View & operator()(View &x)
Pass through x.
Gecode::Int::OffsetView
Offset integer view.
Definition view.hpp:443
Gecode::Int::OffsetView::min
int min(void) const
Return minimum of domain.
Definition offset.hpp:64
Gecode::Int::OffsetView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition offset.hpp:154
Gecode::Int::OffsetView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition offset.hpp:127
Gecode::Int::OffsetView::val
int val(void) const
Return assigned value (only if assigned).
Definition offset.hpp:76
Gecode::Int::OffsetView::update
void update(Space &home, OffsetView &y)
Update this view to be a clone of view y.
Definition offset.hpp:262
Gecode::Int::OffsetView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition offset.hpp:193
Gecode::Int::OffsetView::c
int c
Offset.
Definition view.hpp:446
Gecode::Int::OffsetView::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition offset.hpp:72
Gecode::Int::OffsetView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition offset.hpp:95
Gecode::Int::OffsetView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition offset.hpp:205
Gecode::Int::OffsetView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition offset.hpp:91
Gecode::Int::OffsetView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition offset.hpp:99
Gecode::Int::OffsetView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition offset.hpp:217
Gecode::Int::OffsetView::offset
int offset(void) const
Return offset.
Definition offset.hpp:56
Gecode::Int::OffsetView::max
int max(void) const
Return maximum of domain.
Definition offset.hpp:68
Gecode::Int::OffsetView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition offset.hpp:87
Gecode::Int::OffsetView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition offset.hpp:251
Gecode::Int::OffsetView::OffsetView
OffsetView(void)
Default constructor.
Definition offset.hpp:45
Gecode::Int::OffsetView::in
bool in(int n) const
Test whether n is contained in domain.
Definition offset.hpp:112
Gecode::Int::OffsetView::operator<
bool operator<(const OffsetView &y) const
Whether this view comes before view y (arbitray order).
Definition offset.hpp:273
Gecode::Int::OffsetView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition offset.hpp:199
Gecode::Int::OffsetView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition offset.hpp:145
Gecode::Int::OffsetView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition offset.hpp:136
Gecode::Int::OffsetView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition offset.hpp:211
Gecode::Int::OffsetView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition offset.hpp:163
Gecode::Int::OffsetView::range
bool range(void) const
Test whether domain is a range.
Definition offset.hpp:108
Gecode::Int::OffsetView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition offset.hpp:172
Gecode::Int::OffsetView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition offset.hpp:187
Gecode::Int::Offset::c
int c
The offset.
Definition view.hpp:655
Gecode::Int::Offset::Offset
Offset(int off=0)
Constructor with offset off.
Gecode::Int::Offset::ViewType
OffsetView ViewType
The view type.
Definition view.hpp:653
Gecode::Int::Offset::update
void update(const Offset &o)
Update during cloning.
Gecode::Int::Offset::operator()
OffsetView operator()(IntView &x)
Return OffsetRefView for x.
Gecode::Int::Offset::offset
int offset(void) const
Access offset.
Gecode::Int::ScaleView
Scale integer view (template).
Definition view.hpp:704
Gecode::Int::ScaleView::val
Val val(void) const
Return assigned value (only if assigned).
Definition scale.hpp:85
Gecode::Int::ScaleView::gq
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
Definition scale.hpp:159
Gecode::Int::ScaleView::min
Val min(const Delta &d) const
Return minimum value just pruned.
Definition scale.hpp:201
Gecode::Int::ScaleView::scale
int scale(void) const
Return scale factor of scale view.
Definition scale.hpp:62
Gecode::Int::ScaleView::in
bool in(Val n) const
Test whether n is contained in domain.
Definition scale.hpp:132
Gecode::Int::ScaleView::range
bool range(void) const
Test whether domain is a range.
Definition scale.hpp:127
Gecode::Int::ScaleView::update
void update(Space &home, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
Definition scale.hpp:228
Gecode::Int::ScaleView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition scale.hpp:216
Gecode::Int::ScaleView::le
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
Definition scale.hpp:152
Gecode::Int::ScaleView::width
UnsVal width(const Delta &d) const
Return width of values just pruned.
Definition scale.hpp:211
Gecode::Int::ScaleView::med
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
Definition scale.hpp:189
Gecode::Int::ScaleView::regret_max
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition scale.hpp:116
Gecode::Int::ScaleView::width
UnsVal width(void) const
Return width of domain (distance between maximum and minimum).
Definition scale.hpp:104
Gecode::Int::ScaleView::max
Val max(void) const
Return maximum of domain.
Definition scale.hpp:73
Gecode::Int::ScaleView< int, unsigned int >::a
int a
Definition view.hpp:708
Gecode::Int::ScaleView::med
Val med(void) const
Return median of domain (greatest element not greater than the median).
Definition scale.hpp:79
Gecode::Int::ScaleView::gr
ModEvent gr(Space &home, Val n)
Restrict domain values to be greater than n.
Definition scale.hpp:165
Gecode::Int::ScaleView::operator<
bool operator<(const ScaleView< Val, UnsVal > &y) const
Whether this view comes before view y (arbitray order).
Definition scale.hpp:240
Gecode::Int::ScaleView::min
Val min(void) const
Return minimum of domain.
Definition scale.hpp:67
Gecode::Int::ScaleView::eq
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
Definition scale.hpp:178
Gecode::Int::ScaleView::ScaleView
ScaleView(int b, const IntView &y)
Initialize as .
Definition scale.hpp:52
Gecode::Int::ScaleView::nq
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
Definition scale.hpp:172
Gecode::Int::ScaleView::regret_min
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition scale.hpp:110
Gecode::Int::ScaleView::lq
ModEvent lq(Space &home, Val n)
Restrict domain values to be less or equal than n.
Definition scale.hpp:145
Gecode::Int::ScaleView::size
UnsVal size(void) const
Return size (cardinality) of domain.
Definition scale.hpp:98
Gecode::Int::ScaleView::max
Val max(const Delta &d) const
Return maximum value just pruned.
Definition scale.hpp:206
Gecode::Int::ScaleView::ScaleView
ScaleView(void)
Default constructor.
Definition scale.hpp:48
Gecode::Int::ViewDiffRanges
Range iterator for cached integer views
Definition view.hpp:1354
Gecode::Int::ViewDiffRanges::init
void init(const CachedView< View > &x)
Initialize with ranges for view x.
Definition cached.hpp:389
Gecode::Int::ViewDiffRanges::dr
ViewRanges< View > dr
Current domain iterator.
Definition view.hpp:1361
Gecode::Int::ViewDiffRanges::cr
Iter::Ranges::RangeList cr
Cached domain iterator.
Definition view.hpp:1359
Gecode::Int::ViewDiffRanges::ViewDiffRanges
ViewDiffRanges(void)
Default constructor.
Definition cached.hpp:378
Gecode::Int::ViewRanges
Range iterator for integer views.
Definition view.hpp:54
Gecode::Int::ViewRanges::ViewRanges
ViewRanges(const View &x)
Initialize with ranges for view x.
Gecode::Int::ViewRanges::max
int max(void) const
Return largest value of range.
Gecode::Int::ViewRanges::operator()
bool operator()(void) const
Test whether iterator is still at a range or done.
Gecode::Int::ViewRanges::min
int min(void) const
Return smallest value of range.
Gecode::Int::ViewRanges::init
void init(const View &x)
Initialize with ranges for view x.
Gecode::Int::ViewRanges::width
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Gecode::Int::ViewRanges::operator++
void operator++(void)
Move iterator to next range (if possible).
Gecode::Int::ViewRanges::ViewRanges
ViewRanges(void)
Default constructor.
Gecode::Int::ViewValues::init
void init(const View &x)
Initialize with values x.
Definition iter.hpp:53
Gecode::Int::ViewValues::ViewValues
ViewValues(void)
Default constructor.
Definition iter.hpp:42
Gecode::Int::ZeroIntView
Zero integer view.
Definition view.hpp:1014
Gecode::Int::ZeroIntView::gq
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Definition zero.hpp:123
Gecode::Int::ZeroIntView::ZeroIntView
ZeroIntView(void)
Default constructor.
Definition zero.hpp:41
Gecode::Int::ZeroIntView::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition zero.hpp:56
Gecode::Int::ZeroIntView::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition zero.hpp:73
Gecode::Int::ZeroIntView::minus_r
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Definition zero.hpp:178
Gecode::Int::ZeroIntView::inter_v
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Definition zero.hpp:190
Gecode::Int::ZeroIntView::max
int max(void) const
Return maximum of domain.
Definition zero.hpp:52
Gecode::Int::ZeroIntView::narrow_r
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Definition zero.hpp:166
Gecode::Int::ZeroIntView::minus_v
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Definition zero.hpp:197
Gecode::Int::ZeroIntView::any
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Definition zero.hpp:220
Gecode::Int::ZeroIntView::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition zero.hpp:77
Gecode::Int::ZeroIntView::range
bool range(void) const
Test whether domain is a range.
Definition zero.hpp:87
Gecode::Int::ZeroIntView::lq
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Definition zero.hpp:105
Gecode::Int::ZeroIntView::inter_r
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Definition zero.hpp:171
Gecode::Int::ZeroIntView::narrow_v
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Definition zero.hpp:185
Gecode::Int::ZeroIntView::gr
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
Definition zero.hpp:132
Gecode::Int::ZeroIntView::le
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Definition zero.hpp:114
Gecode::Int::ZeroIntView::val
int val(void) const
Return assigned value (only if assigned).
Definition zero.hpp:60
Gecode::Int::ZeroIntView::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition zero.hpp:65
Gecode::Int::ZeroIntView::eq
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
Definition zero.hpp:150
Gecode::Int::ZeroIntView::nq
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Definition zero.hpp:141
Gecode::Int::ZeroIntView::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition zero.hpp:69
Gecode::Int::ZeroIntView::in
bool in(int n) const
Test whether n is contained in domain.
Definition zero.hpp:91
Gecode::Int::ZeroIntView::min
int min(void) const
Return minimum of domain.
Definition zero.hpp:48
Gecode::Iter::Ranges::Diff
Range iterator for computing set difference.
Definition ranges-diff.hpp:43
Gecode::Iter::Ranges::RangeList
Range iterator for range lists
Definition ranges-rangelist.hpp:44
Gecode::Iter::Ranges::ToValues
Value iterator from range iterator.
Definition ranges-values.hpp:42
Gecode::RangeList
Lists of ranges (intervals).
Definition range-list.hpp:49
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::Val
Gecode::View
Gecode::VarImpView< IntVar >::me
static ModEvent me(const ModEventDelta &med)
Definition view.hpp:552
Gecode::VarImpView< IntVar >::VarImpView
VarImpView(void)
Definition view.hpp:476
Gecode::VarImpView< IntVar >::x
VarImpType * x
Definition view.hpp:141
constint.hpp
int.hpp
int.hpp
Gecode::Int::OffsetView::LLongScaleView
ScaleView< long long int, unsigned long long int > LLongScaleView
Long long-precision integer scale view.
Definition view.hpp:810
Gecode::Int::OffsetView::IntScaleView
ScaleView< int, unsigned int > IntScaleView
Integer-precision integer scale view.
Definition view.hpp:804
Gecode::Int::OffsetView::Offset
Offset(int off)
Integer-precision integer scale view.
Definition view.hpp:667
Gecode::ModEventDelta
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
bool.hpp
print.hpp
bool.hpp
cached.hpp
iter.hpp
minus.hpp
offset.hpp
print.hpp
rel-test.hpp
scale.hpp
Gecode::Int
Finite domain integers.
Gecode::Int::rtest_eq_dom
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information).
Definition rel-test.hpp:65
Gecode::Int::rtest_nq_dom
RelTest rtest_nq_dom(VX x, VY y)
Test whether views x and y are different (use full domain information).
Definition rel-test.hpp:126
Gecode::Int::rtest_eq_bnd
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information).
Definition rel-test.hpp:43
Gecode::Int::rtest_lq
RelTest rtest_lq(VX x, VY y)
Test whether view x is less or equal than view y.
Definition rel-test.hpp:164
Gecode::Int::rtest_le
RelTest rtest_le(VX x, VY y)
Test whether view x is less than view y.
Definition rel-test.hpp:180
Gecode::Int::operator<<
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
Definition idx-view.hpp:167
Gecode::Int::operator==
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
Definition cached.hpp:401
Gecode::Int::bool_test
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
Definition bool-test.hpp:41
Gecode::Int::BoolStatus
unsigned int BoolStatus
Type for status of a Boolean variable.
Definition var-imp.hpp:484
Gecode::Int::operator!=
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
Definition cached.hpp:406
Gecode::Int::RelTest
RelTest
Result of testing relation.
Definition view.hpp:1734
Gecode::Int::RT_TRUE
@ RT_TRUE
Relation does hold.
Definition view.hpp:1737
Gecode::Int::RT_MAYBE
@ RT_MAYBE
Relation may hold or not.
Definition view.hpp:1736
Gecode::Int::RT_FALSE
@ RT_FALSE
Relation does not hold.
Definition view.hpp:1735
Gecode::Int::rtest_nq_bnd
RelTest rtest_nq_bnd(VX x, VY y)
Test whether views x and y are different (use bounds information).
Definition rel-test.hpp:104
Gecode::Int::BoolTest
BoolTest
Boolean tests.
Definition view.hpp:1784
Gecode::Int::BT_NONE
@ BT_NONE
No sharing.
Definition view.hpp:1785
Gecode::Int::BT_COMP
@ BT_COMP
Same variable but complement.
Definition view.hpp:1787
Gecode::Int::BT_SAME
@ BT_SAME
Same variable.
Definition view.hpp:1786
Gecode::Int::rtest_gr
RelTest rtest_gr(VX x, VY y)
Test whether view x is greater than view y.
Definition rel-test.hpp:212
Gecode::Int::rtest_gq
RelTest rtest_gq(VX x, VY y)
Test whether view x is greater or equal than view y.
Definition rel-test.hpp:196
Gecode
Gecode toplevel namespace
Gecode::ModEvent
int ModEvent
Type for modification events.
Definition core.hpp:62
neg-bool.hpp
forceinline
#define forceinline
Definition config.hpp:187
zero.hpp