int.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>
* Guido Tack <tack@gecode.org>
*
* Contributing authors:
* Stefano Gualandi <stefano.gualandi@gmail.com>
* Mikael Lagerkvist <lagerkvist@gecode.org>
* David Rijsman <David.Rijsman@quintiq.com>
* Samuel Gagnon <samuel.gagnon92@gmail.com>
*
* Copyright:
* Stefano Gualandi, 2013
* Mikael Lagerkvist, 2006
* David Rijsman, 2009
* Christian Schulte, 2002
* Guido Tack, 2004
* 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.
*
*/
#ifndef __GECODE_INT_HH__
#define __GECODE_INT_HH__
#include <climits>
#include <cfloat>
#include <iostream>
#include <vector>
#include <unordered_map>
#include <functional>
#include <utility>
#include <initializer_list>
#include <gecode/kernel.hh>
#include <gecode/search.hh>
#include <gecode/iter.hh>
/*
* Configure linking
*
*/
#if !defined(GECODE_STATIC_LIBS) && \
(defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
#ifdef GECODE_BUILD_INT
#define GECODE_INT_EXPORT __declspec( dllexport )
#else
#define GECODE_INT_EXPORT __declspec( dllimport )
#endif
#else
#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
#define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
#else
#define GECODE_INT_EXPORT
#endif
#endif
// Configure auto-linking
#ifndef GECODE_BUILD_INT
#define GECODE_LIBRARY_NAME "Int"
#include <gecode/support/auto-link.hpp>
#endif
#include <gecode/int/exception.hpp>
namespace Gecode { namespace Int {
namespace Limits {
const int max = INT_MAX - 1;
const int min = -max;
const int infinity = max + 1;
const long long int llmax = LLONG_MAX - 1;
const long long int llmin = -llmax;
const long long int llinfinity = llmax + 1;
bool valid(int n);
bool valid(long long int n);
void check(int n, const char* l);
void check(long long int n, const char* l);
void positive(int n, const char* l);
void positive(long long int n, const char* l);
void nonnegative(int n, const char* l);
void nonnegative(long long int n, const char* l);
bool overflow_add(int n, int m);
bool overflow_add(long long int n, long long int m);
bool overflow_sub(int n, int m);
bool overflow_sub(long long int n, long long int m);
bool overflow_mul(int n, int m);
bool overflow_mul(long long int n, long long int m);
}
}}
#include <gecode/int/limits.hpp>
namespace Gecode {
class IntSetRanges;
template<class I> class IntSetInit;
class IntSet : public SharedHandle {
friend class IntSetRanges;
template<class I> friend class IntSetInit;
private:
class Range {
public:
int min, max;
};
class IntSetObject : public SharedHandle::Object {
public:
unsigned int size;
int n;
Range* r;
GECODE_INT_EXPORT static IntSetObject* allocate(int m);
GECODE_INT_EXPORT bool in(int n) const;
GECODE_INT_EXPORT bool equal(const IntSetObject& so) const;
GECODE_INT_EXPORT virtual ~IntSetObject(void);
};
class MinInc;
GECODE_INT_EXPORT void normalize(Range* r, int n);
GECODE_INT_EXPORT void init(int n, int m);
GECODE_INT_EXPORT void init(const int r[], int n);
GECODE_INT_EXPORT void init(const int r[][2], int n);
public:
IntSet(void);
explicit IntSet(int n, int m);
explicit IntSet(const int r[], int n);
explicit IntSet(const int r[][2], int n);
template<class I>
explicit IntSet(I& i);
template<class I>
explicit IntSet(const I& i);
GECODE_INT_EXPORT
explicit IntSet(std::initializer_list<int> r);
GECODE_INT_EXPORT
explicit IntSet(std::initializer_list<std::pair<int,int>> r);
int ranges(void) const;
int min(int i) const;
int max(int i) const;
unsigned int width(int i) const;
bool in(int n) const;
unsigned int size(void) const;
unsigned int width(void) const;
int min(void) const;
int max(void) const;
bool operator ==(const IntSet& s) const;
bool operator !=(const IntSet& s) const;
GECODE_INT_EXPORT static const IntSet empty;
};
class IntSetRanges {
private:
const IntSet::Range* i;
const IntSet::Range* e;
public:
IntSetRanges(void);
IntSetRanges(const IntSet& s);
void init(const IntSet& s);
bool operator ()(void) const;
void operator ++(void);
int min(void) const;
int max(void) const;
unsigned int width(void) const;
};
class IntSetValues : public Iter::Ranges::ToValues<IntSetRanges> {
public:
IntSetValues(void);
IntSetValues(const IntSet& s);
void init(const IntSet& s);
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const IntSet& s);
}
#include <gecode/int/int-set-1.hpp>
#include <gecode/int/var-imp.hpp>
namespace Gecode {
namespace Int {
class IntView;
}
class IntVar : public VarImpVar<Int::IntVarImp> {
friend class IntVarArray;
friend class IntVarArgs;
private:
using VarImpVar<Int::IntVarImp>::x;
void _init(Space& home, int min, int max);
void _init(Space& home, const IntSet& d);
public:
IntVar(void);
IntVar(const IntVar& y);
IntVar(const Int::IntView& y);
GECODE_INT_EXPORT IntVar(Space& home, int min, int max);
GECODE_INT_EXPORT IntVar(Space& home, const IntSet& d);
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;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const IntVar& x);
class IntVarRanges : public Int::IntVarImpFwd {
public:
IntVarRanges(void);
IntVarRanges(const IntVar& x);
void init(const IntVar& x);
};
class IntVarValues : public Iter::Ranges::ToValues<IntVarRanges> {
public:
IntVarValues(void);
IntVarValues(const IntVar& x);
void init(const IntVar& x);
};
namespace Int {
class BoolView;
}
class BoolVar : public VarImpVar<Int::BoolVarImp> {
friend class BoolVarArray;
friend class BoolVarArgs;
private:
using VarImpVar<Int::BoolVarImp>::x;
void _init(Space& home, int min, int max);
public:
BoolVar(void);
BoolVar(const BoolVar& y);
BoolVar(const Int::BoolView& y);
GECODE_INT_EXPORT BoolVar(Space& home, int min, int max);
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 zero(void) const;
bool one(void) const;
bool none(void) const;
};
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const BoolVar& x);
}
#include <gecode/int/view.hpp>
#include <gecode/int/propagator.hpp>
namespace Gecode {
typedef ArgArray<IntSet> IntSetArgs;
}
#include <gecode/int/array-traits.hpp>
namespace Gecode {
class IntArgs : public ArgArray<int> {
public:
IntArgs(void);
explicit IntArgs(int n);
IntArgs(const SharedArray<int>& x);
IntArgs(const std::vector<int>& x);
IntArgs(std::initializer_list<int> x);
template<class InputIterator>
IntArgs(InputIterator first, InputIterator last);
IntArgs(int n, const int* e);
IntArgs(const ArgArray<int>& a);
static IntArgs create(int n, int start, int inc=1);
};
class IntVarArgs : public VarArgArray<IntVar> {
public:
IntVarArgs(void);
explicit IntVarArgs(int n);
IntVarArgs(const IntVarArgs& a);
IntVarArgs(const VarArray<IntVar>& a);
IntVarArgs(const std::vector<IntVar>& a);
IntVarArgs(std::initializer_list<IntVar> a);
template<class InputIterator>
IntVarArgs(InputIterator first, InputIterator last);
GECODE_INT_EXPORT
IntVarArgs(Space& home, int n, int min, int max);
GECODE_INT_EXPORT
IntVarArgs(Space& home, int n, const IntSet& s);
};
class BoolVarArgs : public VarArgArray<BoolVar> {
public:
BoolVarArgs(void);
explicit BoolVarArgs(int n);
BoolVarArgs(const BoolVarArgs& a);
BoolVarArgs(const VarArray<BoolVar>& a);
BoolVarArgs(const std::vector<BoolVar>& a);
BoolVarArgs(std::initializer_list<BoolVar> a);
template<class InputIterator>
BoolVarArgs(InputIterator first, InputIterator last);
GECODE_INT_EXPORT
BoolVarArgs(Space& home, int n, int min, int max);
};
class IntVarArray : public VarArray<IntVar> {
public:
IntVarArray(void);
IntVarArray(Space& home, int n);
IntVarArray(const IntVarArray& a);
IntVarArray(Space& home, const IntVarArgs& a);
GECODE_INT_EXPORT
IntVarArray(Space& home, int n, int min, int max);
GECODE_INT_EXPORT
IntVarArray(Space& home, int n, const IntSet& s);
};
class BoolVarArray : public VarArray<BoolVar> {
public:
BoolVarArray(void);
BoolVarArray(Space& home, int n);
BoolVarArray(const BoolVarArray& a);
BoolVarArray(Space& home, const BoolVarArgs& a);
GECODE_INT_EXPORT
BoolVarArray(Space& home, int n, int min, int max);
};
}
#include <gecode/int/int-set-2.hpp>
#include <gecode/int/array.hpp>
namespace Gecode {
enum ReifyMode {
RM_EQV,
RM_IMP,
RM_PMI
};
class Reify {
protected:
BoolVar x;
ReifyMode rm;
public:
Reify(void);
Reify(BoolVar x, ReifyMode rm=RM_EQV);
BoolVar var(void) const;
ReifyMode mode(void) const;
void var(BoolVar x);
void mode(ReifyMode rm);
};
Reify eqv(BoolVar x);
Reify imp(BoolVar x);
Reify pmi(BoolVar x);
}
#include <gecode/int/reify.hpp>
namespace Gecode {
enum IntRelType {
IRT_EQ,
IRT_NQ,
IRT_LQ,
IRT_LE,
IRT_GQ,
IRT_GR
};
IntRelType swap(IntRelType irt);
IntRelType neg(IntRelType irt);
}
#include <gecode/int/irt.hpp>
namespace Gecode {
enum BoolOpType {
BOT_AND,
BOT_OR,
BOT_IMP,
BOT_EQV,
BOT_XOR
};
enum IntPropLevel {
IPL_DEF = 0,
IPL_VAL = 1,
IPL_BND = 2,
IPL_DOM = 3,
IPL_BASIC = 4,
IPL_ADVANCED = 8,
IPL_BASIC_ADVANCED = IPL_BASIC | IPL_ADVANCED,
_IPL_BITS = 4
};
IntPropLevel vbd(IntPropLevel ipl);
IntPropLevel ba(IntPropLevel ipl);
}
#include <gecode/int/ipl.hpp>
namespace Gecode {
enum TaskType {
TT_FIXP, //< Task with fixed processing time
TT_FIXS, //< Task with fixed start time
TT_FIXE //< Task with fixed end time
};
typedef ArgArray<TaskType> TaskTypeArgs;
template<>
class ArrayTraits<ArgArray<TaskType> > {
public:
typedef TaskTypeArgs StorageType;
typedef TaskType ValueType;
typedef TaskTypeArgs ArgsType;
};
GECODE_INT_EXPORT void
dom(Home home, IntVar x, int n,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, const IntVarArgs& x, int n,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, IntVar x, int l, int m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, const IntVarArgs& x, int l, int m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, IntVar x, const IntSet& s,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, const IntVarArgs& x, const IntSet& s,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, IntVar x, int n, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, IntVar x, int l, int m, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, IntVar x, const IntSet& s, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, IntVar x, IntVar d,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, BoolVar x, BoolVar d,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, const IntVarArgs& x, const IntVarArgs& d,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
dom(Home home, const BoolVarArgs& x, const BoolVarArgs& d,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, IntVar x0, IntRelType irt, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, IntVar x, IntRelType irt, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntVarArgs& x, IntRelType irt, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, IntVar x0, IntRelType irt, IntVar x1, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, IntVar x, IntRelType irt, int c, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntVarArgs& x, IntRelType irt,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntVarArgs& x, IntRelType irt, const IntVarArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntVarArgs& x, IntRelType irt, const IntArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntArgs& x, IntRelType irt, const IntVarArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const BoolVarArgs& x, IntRelType irt, BoolVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolVar x, IntRelType irt, int n,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolVar x, IntRelType irt, int n, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const BoolVarArgs& x, IntRelType irt, int n,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const BoolVarArgs& x, IntRelType irt, const BoolVarArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const BoolVarArgs& x, IntRelType irt, const IntArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const IntArgs& x, IntRelType irt, const BoolVarArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, const BoolVarArgs& x, IntRelType irt,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, BoolVar x2,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, int n,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolOpType o, const BoolVarArgs& x, BoolVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
rel(Home home, BoolOpType o, const BoolVarArgs& x, int n,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
BoolVar z, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
int n, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
ite(Home home, BoolVar b, BoolVar x, BoolVar y, BoolVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
precede(Home home, const IntVarArgs& x, int s, int t,
IntPropLevel=IPL_DEF);
GECODE_INT_EXPORT void
precede(Home home, const IntVarArgs& x, const IntArgs& c,
IntPropLevel=IPL_DEF);
GECODE_INT_EXPORT void
member(Home home, const IntVarArgs& x, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
member(Home home, const BoolVarArgs& x, BoolVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
member(Home home, const IntVarArgs& x, IntVar y, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
member(Home home, const BoolVarArgs& x, BoolVar y, Reify r,
IntPropLevel ipl=IPL_DEF);
typedef SharedArray<int> IntSharedArray;
GECODE_INT_EXPORT void
element(Home home, IntSharedArray n, IntVar x0, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, IntSharedArray n, IntVar x0, BoolVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, IntSharedArray n, IntVar x0, int x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, const IntVarArgs& x, IntVar y0, IntVar y1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, const IntVarArgs& x, IntVar y0, int y1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, const BoolVarArgs& x, IntVar y0, BoolVar y1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, const BoolVarArgs& x, IntVar y0, int y1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, IntSharedArray a,
IntVar x, int w, IntVar y, int h, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, IntSharedArray a,
IntVar x, int w, IntVar y, int h, BoolVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, const IntVarArgs& a,
IntVar x, int w, IntVar y, int h, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
element(Home home, const BoolVarArgs& a,
IntVar x, int w, IntVar y, int h, BoolVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
distinct(Home home, const IntVarArgs& x,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
distinct(Home home, const IntArgs& n, const IntVarArgs& x,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
distinct(Home home, const BoolVarArgs& b, const IntVarArgs& x,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
distinct(Home home, const IntVarArgs& x, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
channel(Home home, const IntVarArgs& x, const IntVarArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
channel(Home home, const IntVarArgs& x, int xoff,
const IntVarArgs& y, int yoff,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
channel(Home home, BoolVar x0, IntVar x1,
IntPropLevel ipl=IPL_DEF);
void
channel(Home home, IntVar x0, BoolVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
channel(Home home, const BoolVarArgs& x, IntVar y, int o=0,
IntPropLevel ipl=IPL_DEF);
}
#include <gecode/int/channel.hpp>
namespace Gecode {
GECODE_INT_EXPORT void
sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
const IntVarArgs& z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, int n, IntRelType irt, int m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType irt, int m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, IntVar y, IntRelType irt, int m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType irt, int m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, int n, IntRelType irt, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType irt, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, IntVar y, IntRelType irt, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType irt, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, const IntVarArgs& c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x, const IntSetArgs& c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x,
const IntVarArgs& c, const IntArgs& v,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x,
const IntSetArgs& c, const IntArgs& v,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
count(Home home, const IntVarArgs& x,
const IntSet& c, const IntArgs& v,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nvalues(Home home, const IntVarArgs& x, IntRelType irt, int y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nvalues(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nvalues(Home home, const BoolVarArgs& x, IntRelType irt, int y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nvalues(Home home, const BoolVarArgs& x, IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
sequence(Home home, const IntVarArgs& x, const IntSet& s,
int q, int l, int u, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
sequence(Home home, const BoolVarArgs& x, const IntSet& s,
int q, int l, int u, IntPropLevel ipl=IPL_DEF);
class DFA : public SharedHandle {
private:
class DFAI;
GECODE_INT_EXPORT
bool equal(const DFA& d) const;
public:
class Transition {
public:
int i_state;
int symbol;
int o_state;
Transition(void);
Transition(int i_state0, int symbol0, int o_state0);
};
class Transitions {
private:
const Transition* c_trans;
const Transition* e_trans;
public:
Transitions(const DFA& d);
Transitions(const DFA& d, int n);
bool operator ()(void) const;
void operator ++(void);
int i_state(void) const;
int symbol(void) const;
int o_state(void) const;
};
class Symbols {
private:
const Transition* c_trans;
const Transition* e_trans;
public:
Symbols(const DFA& d);
bool operator ()(void) const;
void operator ++(void);
int val(void) const;
};
GECODE_INT_EXPORT
void init(int s, Transition t[], int f[], bool minimize=true);
public:
friend class Transitions;
DFA(void);
GECODE_INT_EXPORT
DFA(int s, Transition t[], int f[], bool minimize=true);
GECODE_INT_EXPORT
DFA(int s, std::initializer_list<Transition> t,
std::initializer_list<int> f, bool minimize=true);
DFA(const DFA& d);
GECODE_INT_EXPORT
bool operator ==(const DFA& d) const;
bool operator !=(const DFA& d) const;
int n_states(void) const;
int n_transitions(void) const;
unsigned int n_symbols(void) const;
unsigned int max_degree(void) const;
int final_fst(void) const;
int final_lst(void) const;
int symbol_min(void) const;
int symbol_max(void) const;
std::size_t hash(void) const;
};
}
#include <gecode/int/extensional/dfa.hpp>
namespace Gecode {
class TupleSet : public SharedHandle {
public:
typedef int* Tuple;
typedef Gecode::Support::BitSetData BitSetData;
class Range {
public:
int min;
int max;
BitSetData* s;
unsigned int width(void) const;
const BitSetData* supports(unsigned int n_words, int n) const;
};
protected:
class ValueData {
public:
unsigned int n;
Range* r;
unsigned int start(int n) const;
};
class GECODE_VTABLE_EXPORT Data : public SharedHandle::Object {
protected:
static const int n_initial_free = 1024;
public:
int arity;
unsigned int n_words;
int n_tuples;
int n_free;
int min;
int max;
std::size_t key;
int* td;
ValueData* vd;
Range* range;
BitSetData* support;
Tuple add(void);
Tuple get(int i) const;
static void set(BitSetData* d, unsigned int n);
static bool get(const BitSetData* d, unsigned int n);
unsigned int tuple2idx(Tuple t) const;
const Range* fst(int i) const;
const Range* lst(int i) const;
GECODE_INT_EXPORT
void finalize(void);
GECODE_INT_EXPORT
void resize(void);
bool finalized(void) const;
Data(int a);
GECODE_INT_EXPORT
virtual ~Data(void);
};
Data& data(void) const;
Data& raw(void) const;
GECODE_INT_EXPORT
void _add(const IntArgs& t);
GECODE_INT_EXPORT
bool equal(const TupleSet& t) const;
public:
TupleSet(void);
GECODE_INT_EXPORT
TupleSet(int a);
GECODE_INT_EXPORT
void init(int a);
GECODE_INT_EXPORT
TupleSet(const TupleSet& t);
GECODE_INT_EXPORT
TupleSet& operator =(const TupleSet& t);
GECODE_INT_EXPORT
TupleSet(int a, const DFA& dfa);
operator bool(void) const;
bool operator ==(const TupleSet& t) const;
bool operator !=(const TupleSet& t) const;
TupleSet& add(const IntArgs& t);
bool finalized(void) const;
void finalize(void);
int arity(void) const;
int tuples(void) const;
unsigned int words(void) const;
Tuple operator [](int i) const;
int min(void) const;
int max(void) const;
std::size_t hash(void) const;
const Range* fst(int i) const;
const Range* lst(int i) const;
class Ranges {
protected:
const Range* c;
const Range* l;
public:
Ranges(const TupleSet& ts, int i);
bool operator ()(void) const;
void operator ++(void);
int min(void) const;
int max(void) const;
unsigned int width(void) const;
};
};
}
#include <gecode/int/extensional/tuple-set.hpp>
namespace Gecode {
GECODE_INT_EXPORT void
extensional(Home home, const IntVarArgs& x, DFA d,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
extensional(Home home, const BoolVarArgs& x, DFA d,
IntPropLevel ipl=IPL_DEF);
void
extensional(Home home, const IntVarArgs& x, const TupleSet& t,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
extensional(Home home, const IntVarArgs& x, const TupleSet& t, bool pos,
IntPropLevel ipl=IPL_DEF);
void
extensional(Home home, const IntVarArgs& x, const TupleSet& t, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
extensional(Home home, const IntVarArgs& x, const TupleSet& t, bool pos,
Reify r,
IntPropLevel ipl=IPL_DEF);
void
extensional(Home home, const BoolVarArgs& x, const TupleSet& t,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
extensional(Home home, const BoolVarArgs& x, const TupleSet& t, bool pos,
IntPropLevel ipl=IPL_DEF);
void
extensional(Home home, const BoolVarArgs& x, const TupleSet& t, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
extensional(Home home, const BoolVarArgs& x, const TupleSet& t, bool pos,
Reify r,
IntPropLevel ipl=IPL_DEF);
}
#include <gecode/int/extensional.hpp>
namespace Gecode {
GECODE_INT_EXPORT void
min(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
min(Home home, const IntVarArgs& x, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
max(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
max(Home home, const IntVarArgs& x, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmin(Home home, const IntVarArgs& x, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmin(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmax(Home home, const IntVarArgs& x, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmax(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmin(Home home, const BoolVarArgs& x, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmin(Home home, const BoolVarArgs& x, int o, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmax(Home home, const BoolVarArgs& x, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
argmax(Home home, const BoolVarArgs& x, int o, IntVar y, bool tiebreak=true,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
abs(Home home, IntVar x0, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
mult(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
div(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
mod(Home home, IntVar x0, IntVar x1, IntVar x2,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
sqr(Home home, IntVar x0, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
sqrt(Home home, IntVar x0, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
pow(Home home, IntVar x0, int n, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nroot(Home home, IntVar x0, int n, IntVar x1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntVarArgs& x,
IntRelType irt, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntVarArgs& x,
IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntVarArgs& x,
IntRelType irt, int c, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntVarArgs& x,
IntRelType irt, IntVar y, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const IntVarArgs& x,
IntRelType irt, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const IntVarArgs& x,
IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const IntVarArgs& x,
IntRelType irt, int c, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const IntVarArgs& x,
IntRelType irt, IntVar y, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const BoolVarArgs& x,
IntRelType irt, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const BoolVarArgs& x,
IntRelType irt, int c, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const BoolVarArgs& x,
IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const BoolVarArgs& x,
IntRelType irt, IntVar y, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const BoolVarArgs& x,
IntRelType irt, int c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const BoolVarArgs& x,
IntRelType irt, int c, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const BoolVarArgs& x,
IntRelType irt, IntVar y,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
linear(Home home, const IntArgs& a, const BoolVarArgs& x,
IntRelType irt, IntVar y, Reify r,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
binpacking(Home home,
const IntVarArgs& l,
const IntVarArgs& b, const IntArgs& s,
IntPropLevel ipl=IPL_DEF);
/* \brief Post propagator for multi-dimensional bin packing
*
* In the following \a n refers to the number of items and \a m
* refers to the number of bins.
*
* The multi-dimensional bin-packing constraint enforces that
* all items are packed into bins
* \f$b_i\in\{0,\ldots,m-1\}\f$ for \f$0\leq i<n\f$
* and that the load of each bin corresponds to the items
* packed into it for each dimension \f$l_{j\cdot
* d + k} = \sum_{\{i\in\{0,\ldots,n-1\}|
* b_{j\cdot d+k}=i}\}s_{i\cdot d+k}\f$
* for \f$0\leq j<m\f$, \f$0\leq k<d\f$
* Furthermore, the load variables must satisfy the capacity
* constraints \f$l_{j\cdot d + k} \leq
* c_k\f$ for \f$0\leq j<m\f$, \f$0\leq k<d\f$.
*
* The constraint is implemented by the decomposition
* introduced in: Stefano Gualandi and Michele Lombardi. A
* simple and effective decomposition for the multidimensional
* binpacking constraint. CP 2013, pages 356--364.
*
* Posting the constraint returns a maximal set containing conflicting
* items that require pairwise different bins.
*
* Note that posting the constraint has exponential complexity in the
* number of items due to the Bron-Kerbosch algorithm used for finding
* the maximal conflict item sets.
*
* Throws the following exceptions:
* - Of type Int::ArgumentSizeMismatch if any of the following properties
* is violated: \f$|b|=n\f$, \f$|l|=m\cdot d\f$, \f$|s|=n\cdot d\f$,
* and \f$|c|=d\f$.
* - Of type Int::ArgumentSame if \a l and \a b share unassigned variables.
* - Of type Int::OutOfLimits if \a s or \a c contains a negative number.
*
* \ingroup TaskModelIntBinPacking
*/
GECODE_INT_EXPORT IntSet
binpacking(Home home, int d,
const IntVarArgs& l, const IntVarArgs& b,
const IntArgs& s, const IntArgs& c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nooverlap(Home home,
const IntVarArgs& x, const IntArgs& w,
const IntVarArgs& y, const IntArgs& h,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nooverlap(Home home,
const IntVarArgs& x, const IntArgs& w,
const IntVarArgs& y, const IntArgs& h,
const BoolVarArgs& o,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nooverlap(Home home,
const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
nooverlap(Home home,
const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
const BoolVarArgs& o,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
order(Home home, IntVar s0, int p0, IntVar s1, int p1, BoolVar b,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntVarArgs& m,
const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntVarArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntArgs& m,
const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntVarArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntVarArgs& m,
const IntVarArgs& s, const IntArgs& p,
const IntVarArgs& e, const IntVarArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntArgs& m,
const IntVarArgs& s, const IntArgs& p,
const IntVarArgs& e, const IntVarArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntVarArgs& m,
const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntArgs& m,
const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntVarArgs& m,
const IntVarArgs& s, const IntArgs& p,
const IntVarArgs& e, const IntArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulatives(Home home, const IntArgs& m,
const IntVarArgs& s, const IntArgs& p,
const IntVarArgs& e, const IntArgs& u,
const IntArgs& c, bool at_most,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unary(Home home, const IntVarArgs& s, const IntArgs& p,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unary(Home home, const IntVarArgs& s, const IntArgs& p,
const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unary(Home home, const TaskTypeArgs& t,
const IntVarArgs& flex, const IntArgs& fix, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unary(Home home, const TaskTypeArgs& t,
const IntVarArgs& flex, const IntArgs& fix,
const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, int c, const TaskTypeArgs& t,
const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, IntVar c, const TaskTypeArgs& t,
const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, int c, const TaskTypeArgs& t,
const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, IntVar c, const TaskTypeArgs& t,
const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
const IntArgs& u, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
const IntArgs& u, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
const IntArgs& u, const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
const IntArgs& u, const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntArgs& u, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntArgs& u, IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
circuit(Home home, const IntVarArgs& x,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
circuit(Home home, int offset, const IntVarArgs& x,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
circuit(Home home,
const IntArgs& c,
const IntVarArgs& x, const IntVarArgs& y, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
circuit(Home home,
const IntArgs& c, int offset,
const IntVarArgs& x, const IntVarArgs& y, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
circuit(Home home,
const IntArgs& c,
const IntVarArgs& x, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
circuit(Home home,
const IntArgs& c, int offset,
const IntVarArgs& x, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
path(Home home, const IntVarArgs& x, IntVar s, IntVar e,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
path(Home home, int offset, const IntVarArgs& x, IntVar s, IntVar e,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
path(Home home,
const IntArgs& c,
const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
path(Home home,
const IntArgs& c, int offset,
const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
path(Home home,
const IntArgs& c,
const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
path(Home home,
const IntArgs& c, int offset,
const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
wait(Home home, IntVar x, std::function<void(Space& home)> c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
wait(Home home, BoolVar x, std::function<void(Space& home)> c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
wait(Home home, const IntVarArgs& x, std::function<void(Space& home)> c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
wait(Home home, const BoolVarArgs& x,
std::function<void(Space& home)> c,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
when(Home home, BoolVar x,
std::function<void(Space& home)> t,
std::function<void(Space& home)> e,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
when(Home home, BoolVar x,
std::function<void(Space& home)> t,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unshare(Home home, IntVarArgs& x,
IntPropLevel ipl=IPL_DEF);
GECODE_INT_EXPORT void
unshare(Home home, BoolVarArgs& x,
IntPropLevel ipl=IPL_DEF);
}
namespace Gecode {
typedef std::function<bool(const Space& home, IntVar x, int i)>
IntBranchFilter;
typedef std::function<bool(const Space& home, BoolVar x, int i)>
BoolBranchFilter;
typedef std::function<double(const Space& home, IntVar x, int i)>
IntBranchMerit;
typedef std::function<double(const Space& home, BoolVar x, int i)>
BoolBranchMerit;
typedef std::function<int(const Space& home, IntVar x, int i)>
IntBranchVal;
typedef std::function<int(const Space& home, BoolVar x, int i)>
BoolBranchVal;
typedef std::function<void(Space& home, unsigned int a,
IntVar x, int i, int n)>
IntBranchCommit;
typedef std::function<void(Space& home, unsigned int a,
BoolVar x, int i, int n)>
BoolBranchCommit;
}
#include <gecode/int/branch/traits.hpp>
namespace Gecode {
class IntAFC : public AFC {
public:
IntAFC(void);
IntAFC(const IntAFC& a);
IntAFC& operator =(const IntAFC& a);
IntAFC(Home home, const IntVarArgs& x, double d=1.0, bool share=true);
void init(Home home, const IntVarArgs& x, double d=1.0, bool share=true);
};
class BoolAFC : public AFC {
public:
BoolAFC(void);
BoolAFC(const BoolAFC& a);
BoolAFC& operator =(const BoolAFC& a);
BoolAFC(Home home, const BoolVarArgs& x, double d=1.0, bool share=true);
void init(Home home, const BoolVarArgs& x, double d=1.0, bool share=true);
};
}
#include <gecode/int/branch/afc.hpp>
namespace Gecode {
class IntAction : public Action {
public:
IntAction(void);
IntAction(const IntAction& a);
IntAction& operator =(const IntAction& a);
GECODE_INT_EXPORT
IntAction(Home home, const IntVarArgs& x, double d=1.0,
IntBranchMerit bm=nullptr);
GECODE_INT_EXPORT void
init(Home home, const IntVarArgs& x, double d=1.0,
IntBranchMerit bm=nullptr);
};
class BoolAction : public Action {
public:
BoolAction(void);
BoolAction(const BoolAction& a);
BoolAction& operator =(const BoolAction& a);
GECODE_INT_EXPORT
BoolAction(Home home, const BoolVarArgs& x, double d=1.0,
BoolBranchMerit bm=nullptr);
GECODE_INT_EXPORT void
init(Home home, const BoolVarArgs& x, double d=1.0,
BoolBranchMerit bm=nullptr);
};
}
#include <gecode/int/branch/action.hpp>
namespace Gecode {
class IntCHB : public CHB {
public:
IntCHB(void);
IntCHB(const IntCHB& chb);
IntCHB& operator =(const IntCHB& chb);
GECODE_INT_EXPORT
IntCHB(Home home, const IntVarArgs& x, IntBranchMerit bm=nullptr);
GECODE_INT_EXPORT void
init(Home home, const IntVarArgs& x, IntBranchMerit bm=nullptr);
};
class BoolCHB : public CHB {
public:
BoolCHB(void);
BoolCHB(const BoolCHB& chb);
BoolCHB& operator =(const BoolCHB& chb);
GECODE_INT_EXPORT
BoolCHB(Home home, const BoolVarArgs& x, BoolBranchMerit bm=nullptr);
GECODE_INT_EXPORT void
init(Home home, const BoolVarArgs& x, BoolBranchMerit bm=nullptr);
};
}
#include <gecode/int/branch/chb.hpp>
namespace Gecode {
typedef std::function<void(const Space &home, const Brancher& b,
unsigned int a,
IntVar x, int i, const int& n,
std::ostream& o)>
IntVarValPrint;
typedef std::function<void(const Space &home, const Brancher& b,
unsigned int a,
BoolVar x, int i, const int& n,
std::ostream& o)>
BoolVarValPrint;
}
namespace Gecode {
class IntVarBranch : public VarBranch<IntVar> {
public:
enum Select {
SEL_NONE = 0,
SEL_RND,
SEL_MERIT_MIN,
SEL_MERIT_MAX,
SEL_DEGREE_MIN,
SEL_DEGREE_MAX,
SEL_AFC_MIN,
SEL_AFC_MAX,
SEL_ACTION_MIN,
SEL_ACTION_MAX,
SEL_CHB_MIN,
SEL_CHB_MAX,
SEL_MIN_MIN,
SEL_MIN_MAX,
SEL_MAX_MIN,
SEL_MAX_MAX,
SEL_SIZE_MIN,
SEL_SIZE_MAX,
SEL_DEGREE_SIZE_MIN,
SEL_DEGREE_SIZE_MAX,
SEL_AFC_SIZE_MIN,
SEL_AFC_SIZE_MAX,
SEL_ACTION_SIZE_MIN,
SEL_ACTION_SIZE_MAX,
SEL_CHB_SIZE_MIN,
SEL_CHB_SIZE_MAX,
SEL_REGRET_MIN_MIN,
SEL_REGRET_MIN_MAX,
SEL_REGRET_MAX_MIN,
SEL_REGRET_MAX_MAX
};
protected:
Select s;
public:
IntVarBranch(void);
IntVarBranch(Rnd r);
IntVarBranch(Select s, BranchTbl t);
IntVarBranch(Select s, double d, BranchTbl t);
IntVarBranch(Select s, IntAFC a, BranchTbl t);
IntVarBranch(Select s, IntAction a, BranchTbl t);
IntVarBranch(Select s, IntCHB c, BranchTbl t);
IntVarBranch(Select s, IntBranchMerit mf, BranchTbl t);
Select select(void) const;
void expand(Home home, const IntVarArgs& x);
};
class BoolVarBranch : public VarBranch<BoolVar> {
public:
enum Select {
SEL_NONE = 0,
SEL_RND,
SEL_MERIT_MIN,
SEL_MERIT_MAX,
SEL_DEGREE_MIN,
SEL_DEGREE_MAX,
SEL_AFC_MIN,
SEL_AFC_MAX,
SEL_ACTION_MIN,
SEL_ACTION_MAX,
SEL_CHB_MIN,
SEL_CHB_MAX
};
protected:
Select s;
public:
BoolVarBranch(void);
BoolVarBranch(Rnd r);
BoolVarBranch(Select s, BranchTbl t);
BoolVarBranch(Select s, double d, BranchTbl t);
BoolVarBranch(Select s, BoolAFC a, BranchTbl t);
BoolVarBranch(Select s, BoolAction a, BranchTbl t);
BoolVarBranch(Select s, BoolCHB c, BranchTbl t);
BoolVarBranch(Select s, BoolBranchMerit mf, BranchTbl t);
Select select(void) const;
void expand(Home home, const BoolVarArgs& x);
};
IntVarBranch INT_VAR_NONE(void);
IntVarBranch INT_VAR_RND(Rnd r);
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_MERIT_MAX(IntBranchMerit bm, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_MIN(IntAFC a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_MAX(IntAFC a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_MIN(IntAction a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_MAX(IntAction a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_MIN(IntCHB c, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_MAX(IntCHB c, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_MIN_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_MAX_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_SIZE_MIN(IntAFC a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_AFC_SIZE_MAX(IntAFC a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_SIZE_MIN(IntAction a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_ACTION_SIZE_MAX(IntAction a, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_SIZE_MIN(IntCHB c, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_SIZE_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_SIZE_MAX(IntCHB c, BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_CHB_SIZE_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_REGRET_MAX_MIN(BranchTbl tbl=nullptr);
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_NONE(void);
BoolVarBranch BOOL_VAR_RND(Rnd r);
BoolVarBranch BOOL_VAR_MERIT_MIN(BoolBranchMerit bm, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_MERIT_MAX(BoolBranchMerit bm, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_DEGREE_MIN(BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_DEGREE_MAX(BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_AFC_MIN(BoolAFC a, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_AFC_MAX(BoolAFC a, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_ACTION_MIN(BoolAction a, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_ACTION_MAX(BoolAction a, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_CHB_MIN(BoolCHB c, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_CHB_MIN(BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_CHB_MAX(BoolCHB c, BranchTbl tbl=nullptr);
BoolVarBranch BOOL_VAR_CHB_MAX(BranchTbl tbl=nullptr);
}
#include <gecode/int/branch/var.hpp>
namespace Gecode {
class IntValBranch : public ValBranch<IntVar> {
public:
enum Select {
SEL_MIN,
SEL_MED,
SEL_MAX,
SEL_RND,
SEL_SPLIT_MIN,
SEL_SPLIT_MAX,
SEL_RANGE_MIN,
SEL_RANGE_MAX,
SEL_VAL_COMMIT,
SEL_VALUES_MIN,
SEL_VALUES_MAX
};
protected:
Select s;
public:
IntValBranch(Select s = SEL_MIN);
IntValBranch(Rnd r);
IntValBranch(IntBranchVal v, IntBranchCommit c);
Select select(void) const;
};
class BoolValBranch : public ValBranch<BoolVar> {
public:
enum Select {
SEL_MIN,
SEL_MAX,
SEL_RND,
SEL_VAL_COMMIT
};
protected:
Select s;
public:
BoolValBranch(Select s = SEL_MIN);
BoolValBranch(Rnd r);
BoolValBranch(BoolBranchVal v, BoolBranchCommit c);
Select select(void) const;
};
IntValBranch INT_VAL_MIN(void);
IntValBranch INT_VAL_MED(void);
IntValBranch INT_VAL_MAX(void);
IntValBranch INT_VAL_RND(Rnd r);
IntValBranch INT_VAL_SPLIT_MIN(void);
IntValBranch INT_VAL_SPLIT_MAX(void);
IntValBranch INT_VAL_RANGE_MIN(void);
IntValBranch INT_VAL_RANGE_MAX(void);
IntValBranch INT_VAL(IntBranchVal v, IntBranchCommit c=nullptr);
IntValBranch INT_VALUES_MIN(void);
IntValBranch INT_VALUES_MAX(void);
BoolValBranch BOOL_VAL_MIN(void);
BoolValBranch BOOL_VAL_MAX(void);
BoolValBranch BOOL_VAL_RND(Rnd r);
BoolValBranch BOOL_VAL(BoolBranchVal v, BoolBranchCommit c=nullptr);
}
#include <gecode/int/branch/val.hpp>
namespace Gecode {
class IntAssign : public ValBranch<IntVar> {
public:
enum Select {
SEL_MIN,
SEL_MED,
SEL_MAX,
SEL_RND,
SEL_VAL_COMMIT
};
protected:
Select s;
public:
IntAssign(Select s = SEL_MIN);
IntAssign(Rnd r);
IntAssign(IntBranchVal v, IntBranchCommit c);
Select select(void) const;
};
class BoolAssign : public ValBranch<BoolVar> {
public:
enum Select {
SEL_MIN,
SEL_MAX,
SEL_RND,
SEL_VAL_COMMIT
};
protected:
Select s;
public:
BoolAssign(Select s = SEL_MIN);
BoolAssign(Rnd r);
BoolAssign(BoolBranchVal v, BoolBranchCommit c);
Select select(void) const;
};
IntAssign INT_ASSIGN_MIN(void);
IntAssign INT_ASSIGN_MED(void);
IntAssign INT_ASSIGN_MAX(void);
IntAssign INT_ASSIGN_RND(Rnd r);
IntAssign INT_ASSIGN(IntBranchVal v, IntBranchCommit c=nullptr);
BoolAssign BOOL_ASSIGN_MIN(void);
BoolAssign BOOL_ASSIGN_MAX(void);
BoolAssign BOOL_ASSIGN_RND(Rnd r);
BoolAssign BOOL_ASSIGN(BoolBranchVal v, BoolBranchCommit c=nullptr);
}
#include <gecode/int/branch/assign.hpp>
namespace Gecode {
GECODE_INT_EXPORT void
branch(Home home, const IntVarArgs& x,
IntVarBranch vars, IntValBranch vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, const IntVarArgs& x,
TieBreak<IntVarBranch> vars, IntValBranch vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, IntVar x, IntValBranch vals,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, const BoolVarArgs& x,
BoolVarBranch vars, BoolValBranch vals,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, const BoolVarArgs& x,
TieBreak<BoolVarBranch> vars, BoolValBranch vals,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, BoolVar x, BoolValBranch vals,
BoolVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
assign(Home home, const IntVarArgs& x,
IntVarBranch vars, IntAssign vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
assign(Home home, const IntVarArgs& x,
TieBreak<IntVarBranch> vars, IntAssign vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
assign(Home home, IntVar x, IntAssign vals,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
assign(Home home, const BoolVarArgs& x,
BoolVarBranch vars, BoolAssign vals,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
assign(Home home, const BoolVarArgs& x,
TieBreak<BoolVarBranch> vars, BoolAssign vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
assign(Home home, BoolVar x, BoolAssign vals,
BoolVarValPrint vvp=nullptr);
}
namespace Gecode {
void
branch(Home home, const IntVarArgs& x, IntValBranch vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
void
branch(Home home, const BoolVarArgs& x, BoolValBranch vals,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
void
assign(Home home, const IntVarArgs& x, IntAssign vals,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
void
assign(Home home, const BoolVarArgs& x, BoolAssign vals,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
}
#include <gecode/int/branch.hpp>
namespace Gecode {
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const DFA& d);
template<class Char, class Traits>
std::basic_ostream<Char,Traits>&
operator <<(std::basic_ostream<Char,Traits>& os, const TupleSet& ts);
}
// LDSB-related declarations.
namespace Gecode {
namespace Int { namespace LDSB {
class SymmetryObject;
}}
class GECODE_INT_EXPORT SymmetryHandle {
public:
Int::LDSB::SymmetryObject* ref;
void increment(void);
void decrement(void);
public:
SymmetryHandle(void);
SymmetryHandle(Int::LDSB::SymmetryObject* o);
SymmetryHandle(const SymmetryHandle& h);
const SymmetryHandle& operator=(const SymmetryHandle& h);
~SymmetryHandle(void);
};
class Symmetries;
template<>
class ArrayTraits<ArgArray<SymmetryHandle> > {
public:
typedef Symmetries StorageType;
typedef SymmetryHandle ValueType;
typedef Symmetries ArgsType;
};
class Symmetries : public ArgArray<SymmetryHandle> {};
// If this is instead a typedef, strange things happen with the
// overloading of the "branch" function.
GECODE_INT_EXPORT SymmetryHandle VariableSymmetry(const IntVarArgs& x);
GECODE_INT_EXPORT SymmetryHandle VariableSymmetry(const BoolVarArgs& x);
GECODE_INT_EXPORT SymmetryHandle VariableSymmetry(const IntVarArgs& x,
const IntArgs& indices);
GECODE_INT_EXPORT SymmetryHandle ValueSymmetry(const IntArgs& v);
GECODE_INT_EXPORT SymmetryHandle ValueSymmetry(const IntSet& v);
GECODE_INT_EXPORT SymmetryHandle ValueSymmetry(IntVar vars);
GECODE_INT_EXPORT
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs& x, int ss);
GECODE_INT_EXPORT
SymmetryHandle VariableSequenceSymmetry(const BoolVarArgs& x, int ss);
GECODE_INT_EXPORT
SymmetryHandle ValueSequenceSymmetry(const IntArgs& v, int ss);
GECODE_INT_EXPORT SymmetryHandle values_reflect(int lower, int upper);
GECODE_INT_EXPORT SymmetryHandle values_reflect(IntVar x);
GECODE_INT_EXPORT void
branch(Home home, const IntVarArgs& x,
IntVarBranch vars, IntValBranch vals,
const Symmetries& syms,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, const IntVarArgs& x,
TieBreak<IntVarBranch> vars, IntValBranch vals,
const Symmetries& syms,
IntBranchFilter bf=nullptr,
IntVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, const BoolVarArgs& x,
BoolVarBranch vars, BoolValBranch vals,
const Symmetries& syms,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
GECODE_INT_EXPORT void
branch(Home home, const BoolVarArgs& x,
TieBreak<BoolVarBranch> vars, BoolValBranch vals,
const Symmetries& syms,
BoolBranchFilter bf=nullptr,
BoolVarValPrint vvp=nullptr);
#ifdef GECODE_HAS_CBS
GECODE_INT_EXPORT void
cbsbranch(Home home, const IntVarArgs& x);
GECODE_INT_EXPORT void
cbsbranch(Home home, const BoolVarArgs& x);
#endif
}
namespace Gecode {
/*
* \brief Relaxed assignment of variables in \a x from values in \a sx
*
* The variables in \a x are assigned values from the assigned variables
* in the solution \a sx with a relaxation probability \a p. That is,
* if \$fp=0.1\f$ approximately 10% of the variables in \a x will be
* assigned a value from \a sx.
*
* The random numbers are generated from the generator \a r. At least
* one variable will not be assigned: in case the relaxation attempt
* would suggest that all variables should be assigned, a single
* variable will be selected randomly to remain unassigned.
*
* Throws an exception of type Int::ArgumentSizeMismatch, if \a x and
* \a sx are of different size.
*
* Throws an exception of type Int::OutOfLimits, if \a p is not between
* \a 0.0 and \a 1.0.
*
* \ingroup TaskModelInt
*/
GECODE_INT_EXPORT void
relax(Home home, const IntVarArgs& x, const IntVarArgs& sx,
Rnd r, double p);
/*
* \brief Relaxed assignment of variables in \a x from values in \a sx
*
* The variables in \a x are assigned values from the assigned variables
* in the solution \a sx with a relaxation probability \a p. That is,
* if \$fp=0.1\f$ approximately 10% of the variables in \a x will be
* assigned a value from \a sx.
*
* The random numbers are generated from the generator \a r. At least
* one variable will not be assigned: in case the relaxation attempt
* would suggest that all variables should be assigned, a single
* variable will be selected randomly to remain unassigned.
*
* Throws an exception of type Int::ArgumentSizeMismatch, if \a x and
* \a sx are of different size.
*
* Throws an exception of type Int::OutOfLimits, if \a p is not between
* \a 0.0 and \a 1.0.
*
* \ingroup TaskModelInt
*/
GECODE_INT_EXPORT void
relax(Home home, const BoolVarArgs& x, const BoolVarArgs& sx,
Rnd r, double p);
}
#include <gecode/int/trace/int-trace-view.hpp>
#include <gecode/int/trace/bool-trace-view.hpp>
namespace Gecode {
class IntTraceDelta
: public Iter::Ranges::Diff<Iter::Ranges::RangeList,
Int::ViewRanges<Int::IntView> > {
protected:
Int::ViewRanges<Int::IntView> rn;
Iter::Ranges::RangeList ro;
public:
IntTraceDelta(Int::IntTraceView o, Int::IntView n, const Delta& d);
};
class BoolTraceDelta {
protected:
int delta;
public:
BoolTraceDelta(Int::BoolTraceView o, Int::BoolView n, const Delta& d);
bool operator ()(void) const;
void operator ++(void);
int min(void) const;
int max(void) const;
unsigned int width(void) const;
};
}
#include <gecode/int/trace/int-delta.hpp>
#include <gecode/int/trace/bool-delta.hpp>
#include <gecode/int/trace/traits.hpp>
namespace Gecode {
typedef ViewTracer<Int::IntView> IntTracer;
typedef ViewTraceRecorder<Int::IntView> IntTraceRecorder;
class GECODE_INT_EXPORT StdIntTracer : public IntTracer {
protected:
std::ostream& os;
public:
StdIntTracer(std::ostream& os0 = std::cerr);
virtual void init(const Space& home, const IntTraceRecorder& t);
virtual void prune(const Space& home, const IntTraceRecorder& t,
const ViewTraceInfo& vti, int i, IntTraceDelta& d);
virtual void fix(const Space& home, const IntTraceRecorder& t);
virtual void fail(const Space& home, const IntTraceRecorder& t);
virtual void done(const Space& home, const IntTraceRecorder& t);
static StdIntTracer def;
};
typedef ViewTracer<Int::BoolView> BoolTracer;
typedef ViewTraceRecorder<Int::BoolView> BoolTraceRecorder;
class GECODE_INT_EXPORT StdBoolTracer : public BoolTracer {
protected:
std::ostream& os;
public:
StdBoolTracer(std::ostream& os0 = std::cerr);
virtual void init(const Space& home, const BoolTraceRecorder& t);
virtual void prune(const Space& home, const BoolTraceRecorder& t,
const ViewTraceInfo& vti, int i, BoolTraceDelta& d);
virtual void fix(const Space& home, const BoolTraceRecorder& t);
virtual void fail(const Space& home, const BoolTraceRecorder& t);
virtual void done(const Space& home, const BoolTraceRecorder& t);
static StdBoolTracer def;
};
GECODE_INT_EXPORT void
trace(Home home, const IntVarArgs& x,
TraceFilter tf,
int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
IntTracer& t = StdIntTracer::def);
void
trace(Home home, const IntVarArgs& x,
int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
IntTracer& t = StdIntTracer::def);
GECODE_INT_EXPORT void
trace(Home home, const BoolVarArgs& x,
TraceFilter tf,
int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
BoolTracer& t = StdBoolTracer::def);
void
trace(Home home, const BoolVarArgs& x,
int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
BoolTracer& t = StdBoolTracer::def);
}
#include <gecode/int/trace.hpp>
#endif
// IFDEF: GECODE_HAS_INT_VARS
// STATISTICS: int-post
auto-link.hpp
bool-delta.hpp
bool-trace-view.hpp
Gecode::AFC::AFC
AFC(void)
Construct as not yet intialized.
Definition afc.hpp:119
Gecode::Action::Action
Action(void)
Construct as not yet intialized.
Definition action.hpp:323
Gecode::ArgArrayBase< int >::a
int * a
Definition array.hpp:544
Gecode::ArgArrayBase< int >::n
int n
Definition array.hpp:540
Gecode::ArgArray
Argument array for non-primitive types.
Definition array.hpp:691
Gecode::ArgArray< int >::ArgArray
ArgArray(void)
Definition array.hpp:1750
Gecode::ArrayTraits< ArgArray< SymmetryHandle > >::ValueType
SymmetryHandle ValueType
Definition int.hh:5281
Gecode::ArrayTraits< ArgArray< SymmetryHandle > >::StorageType
Symmetries StorageType
Definition int.hh:5280
Gecode::ArrayTraits< ArgArray< SymmetryHandle > >::ArgsType
Symmetries ArgsType
Definition int.hh:5282
Gecode::ArrayTraits< ArgArray< TaskType > >::ValueType
TaskType ValueType
Definition int.hh:1022
Gecode::ArrayTraits< ArgArray< TaskType > >::StorageType
TaskTypeArgs StorageType
Definition int.hh:1021
Gecode::ArrayTraits< ArgArray< TaskType > >::ArgsType
TaskTypeArgs ArgsType
Definition int.hh:1023
Gecode::ArrayTraits
Traits of arrays in Gecode.
Definition array.hpp:94
Gecode::BoolAFC
Recording AFC information for Boolean variables.
Definition int.hh:4316
Gecode::BoolAFC::BoolAFC
BoolAFC(void)
Construct as not yet initialized.
Definition afc.hpp:61
Gecode::BoolAFC::operator=
BoolAFC & operator=(const BoolAFC &a)
Assignment operator.
Definition afc.hpp:68
Gecode::BoolAFC::init
void init(Home home, const BoolVarArgs &x, double d=1.0, bool share=true)
Initialize for Boolean variables x with decay factor d.
Definition afc.hpp:78
Gecode::BoolAction
Recording actions for Boolean variables.
Definition int.hh:4407
Gecode::BoolAction::BoolAction
BoolAction(void)
Construct as not yet initialized.
Definition action.hpp:50
Gecode::BoolAction::init
void init(Home home, const BoolVarArgs &x, double d=1.0, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x with decay factor d.
Definition action.cpp:59
Gecode::BoolAction::operator=
BoolAction & operator=(const BoolAction &a)
Assignment operator.
Definition action.hpp:57
Gecode::BoolAssign
Which values to select for assignment.
Definition int.hh:5000
Gecode::BoolAssign::Select
Select
Which value selection.
Definition int.hh:5003
Gecode::BoolAssign::SEL_VAL_COMMIT
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition int.hh:5007
Gecode::BoolAssign::SEL_MIN
@ SEL_MIN
Select smallest value.
Definition int.hh:5004
Gecode::BoolAssign::SEL_MAX
@ SEL_MAX
Select largest value.
Definition int.hh:5005
Gecode::BoolAssign::SEL_RND
@ SEL_RND
Select random value.
Definition int.hh:5006
Gecode::BoolAssign::BoolAssign
BoolAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition assign.hpp:82
Gecode::BoolAssign::select
Select select(void) const
Return selection strategy.
Definition assign.hpp:94
Gecode::BoolAssign::s
Select s
Which value to select.
Definition int.hh:5011
Gecode::BoolCHB
Recording CHB for Boolean variables.
Definition int.hh:4502
Gecode::BoolCHB::operator=
BoolCHB & operator=(const BoolCHB &chb)
Assignment operator.
Definition chb.hpp:57
Gecode::BoolCHB::init
void init(Home home, const BoolVarArgs &x, BoolBranchMerit bm=nullptr)
Initialize for Boolean variables x.
Definition chb.cpp:56
Gecode::BoolCHB::BoolCHB
BoolCHB(void)
Construct as not yet initialized.
Definition chb.hpp:50
Gecode::BoolTraceDelta
Trace delta information for Boolean variables.
Definition int.hh:5548
Gecode::BoolTraceDelta::operator++
void operator++(void)
Move iterator to next range (if possible).
Definition bool-delta.hpp:45
Gecode::BoolTraceDelta::min
int min(void) const
Return smallest value of range.
Definition bool-delta.hpp:49
Gecode::BoolTraceDelta::operator()
bool operator()(void) const
Test whether iterator is still at a range or done.
Definition bool-delta.hpp:41
Gecode::BoolTraceDelta::max
int max(void) const
Return largest value of range.
Definition bool-delta.hpp:53
Gecode::BoolTraceDelta::BoolTraceDelta
BoolTraceDelta(Int::BoolTraceView o, Int::BoolView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
Definition bool-delta.hpp:37
Gecode::BoolTraceDelta::width
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Definition bool-delta.hpp:57
Gecode::BoolTraceDelta::delta
int delta
Delta information.
Definition int.hh:5551
Gecode::BoolValBranch
Which values to select for branching first.
Definition int.hh:4889
Gecode::BoolValBranch::s
Select s
Which value to select.
Definition int.hh:4900
Gecode::BoolValBranch::Select
Select
Which value selection.
Definition int.hh:4892
Gecode::BoolValBranch::SEL_MIN
@ SEL_MIN
Select smallest value.
Definition int.hh:4893
Gecode::BoolValBranch::SEL_RND
@ SEL_RND
Select random value.
Definition int.hh:4895
Gecode::BoolValBranch::SEL_VAL_COMMIT
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition int.hh:4896
Gecode::BoolValBranch::SEL_MAX
@ SEL_MAX
Select largest value.
Definition int.hh:4894
Gecode::BoolValBranch::select
Select select(void) const
Return selection strategy.
Definition val.hpp:124
Gecode::BoolValBranch::BoolValBranch
BoolValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition val.hpp:112
Gecode::BoolVarArgs
Passing Boolean variables.
Definition int.hh:712
Gecode::BoolVarArgs::BoolVarArgs
BoolVarArgs(void)
Allocate empty array.
Definition array.hpp:114
Gecode::BoolVarArray::BoolVarArray
BoolVarArray(void)
Default constructor (array of size 0).
Definition array.hpp:159
Gecode::BoolVarBranch
Which Boolean variable to select for branching.
Definition int.hh:4656
Gecode::BoolVarBranch::expand
void expand(Home home, const BoolVarArgs &x)
Expand decay factor into AFC or action.
Definition var.hpp:345
Gecode::BoolVarBranch::select
Select select(void) const
Return selection strategy.
Definition var.hpp:340
Gecode::BoolVarBranch::BoolVarBranch
BoolVarBranch(void)
Initialize with strategy SEL_NONE.
Definition var.hpp:308
Gecode::BoolVarBranch::Select
Select
Which variable selection.
Definition int.hh:4659
Gecode::BoolVarBranch::SEL_DEGREE_MIN
@ SEL_DEGREE_MIN
With smallest degree.
Definition int.hh:4664
Gecode::BoolVarBranch::SEL_AFC_MAX
@ SEL_AFC_MAX
With largest accumulated failure count.
Definition int.hh:4667
Gecode::BoolVarBranch::SEL_CHB_MIN
@ SEL_CHB_MIN
With lowest CHB.
Definition int.hh:4670
Gecode::BoolVarBranch::SEL_MERIT_MIN
@ SEL_MERIT_MIN
With least merit.
Definition int.hh:4662
Gecode::BoolVarBranch::SEL_ACTION_MIN
@ SEL_ACTION_MIN
With lowest action.
Definition int.hh:4668
Gecode::BoolVarBranch::SEL_AFC_MIN
@ SEL_AFC_MIN
With smallest accumulated failure count.
Definition int.hh:4666
Gecode::BoolVarBranch::SEL_RND
@ SEL_RND
Random (uniform, for tie breaking).
Definition int.hh:4661
Gecode::BoolVarBranch::SEL_NONE
@ SEL_NONE
First unassigned.
Definition int.hh:4660
Gecode::BoolVarBranch::SEL_ACTION_MAX
@ SEL_ACTION_MAX
With highest action.
Definition int.hh:4669
Gecode::BoolVarBranch::SEL_CHB_MAX
@ SEL_CHB_MAX
With highest CHB.
Definition int.hh:4671
Gecode::BoolVarBranch::SEL_MERIT_MAX
@ SEL_MERIT_MAX
With highest merit.
Definition int.hh:4663
Gecode::BoolVarBranch::SEL_DEGREE_MAX
@ SEL_DEGREE_MAX
With largest degree.
Definition int.hh:4665
Gecode::BoolVarBranch::s
Select s
Which variable to select.
Definition int.hh:4675
Gecode::BoolVar
Boolean integer variables.
Definition int.hh:512
Gecode::BoolVar::one
bool one(void) const
Test whether domain is one.
Definition bool.hpp:107
Gecode::BoolVar::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition bool.hpp:81
Gecode::BoolVar::val
int val(void) const
Return assigned value.
Definition bool.hpp:57
Gecode::BoolVar::zero
bool zero(void) const
Test whether domain is zero.
Definition bool.hpp:103
Gecode::BoolVar::max
int max(void) const
Return maximum of domain.
Definition bool.hpp:71
Gecode::BoolVar::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition bool.hpp:67
Gecode::BoolVar::BoolVarArgs
friend class BoolVarArgs
Definition int.hh:514
Gecode::BoolVar::BoolVarArray
friend class BoolVarArray
Definition int.hh:513
Gecode::BoolVar::in
bool in(int n) const
Test whether n is contained in domain.
Definition bool.hpp:98
Gecode::BoolVar::BoolVar
BoolVar(void)
Default constructor.
Definition bool.hpp:48
Gecode::BoolVar::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition bool.hpp:77
Gecode::BoolVar::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition bool.hpp:85
Gecode::BoolVar::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition bool.hpp:89
Gecode::BoolVar::min
int min(void) const
Return minimum of domain.
Definition bool.hpp:63
Gecode::BoolVar::none
bool none(void) const
Test whether domain is neither zero nor one.
Definition bool.hpp:111
Gecode::BoolVar::range
bool range(void) const
Test whether domain is a range.
Definition bool.hpp:94
Gecode::Brancher
Base-class for branchers.
Definition core.hpp:1442
Gecode::CHB::CHB
CHB(void)
Construct as not yet intialized.
Definition chb.hpp:346
Gecode::DFA::DFAI
Data stored for a DFA.
Definition dfa.hpp:42
Gecode::DFA::Symbols::val
int val(void) const
Return current symbol.
Definition dfa.hpp:293
Gecode::DFA::Symbols::operator++
void operator++(void)
Move iterator to next symbol.
Definition dfa.hpp:285
Gecode::DFA::Symbols::operator()
bool operator()(void) const
Test whether iterator still at a symbol.
Definition dfa.hpp:280
Gecode::DFA::Symbols::Symbols
Symbols(const DFA &d)
Initialize to symbols of DFA d.
Definition dfa.hpp:269
Gecode::DFA::Transition
Specification of a DFA transition.
Definition int.hh:2058
Gecode::DFA::Transition::i_state
int i_state
input state
Definition int.hh:2060
Gecode::DFA::Transition::o_state
int o_state
output state Default constructor
Definition int.hh:2062
Gecode::DFA::Transition::symbol
int symbol
symbol
Definition int.hh:2061
Gecode::DFA::Transition::Transition
Transition(void)
Definition dfa.hpp:201
Gecode::DFA::Transitions
Iterator for DFA transitions (sorted by symbols).
Definition int.hh:2069
Gecode::DFA::Transitions::o_state
int o_state(void) const
Return out-state of current transition.
Definition dfa.hpp:259
Gecode::DFA::Transitions::operator++
void operator++(void)
Move iterator to next transition.
Definition dfa.hpp:244
Gecode::DFA::Transitions::operator()
bool operator()(void) const
Test whether iterator still at a transition.
Definition dfa.hpp:239
Gecode::DFA::Transitions::Transitions
Transitions(const DFA &d)
Initialize to all transitions of DFA d.
Definition dfa.hpp:213
Gecode::DFA::Transitions::i_state
int i_state(void) const
Return in-state of current transition.
Definition dfa.hpp:249
Gecode::DFA::Transitions::symbol
int symbol(void) const
Return symbol of current transition.
Definition dfa.hpp:254
Gecode::DFA
Deterministic finite automaton (DFA).
Definition int.hh:2049
Gecode::DFA::operator==
bool operator==(const DFA &d) const
Test whether DFA is equal to d.
Definition dfa.hpp:330
Gecode::DFA::symbol_max
int symbol_max(void) const
Return largest symbol in DFA.
Definition dfa.hpp:182
Gecode::DFA::Transitions
friend class Transitions
Definition int.hh:2122
Gecode::DFA::max_degree
unsigned int max_degree(void) const
Return maximal degree (in-degree and out-degree) of any state.
Definition dfa.hpp:157
Gecode::DFA::n_states
int n_states(void) const
Return the number of states.
Definition dfa.hpp:139
Gecode::DFA::symbol_min
int symbol_min(void) const
Return smallest symbol in DFA.
Definition dfa.hpp:175
Gecode::DFA::DFA
DFA(void)
Initialize for DFA accepting the empty word.
Definition dfa.hpp:131
Gecode::DFA::final_lst
int final_lst(void) const
Return the number of the last final state.
Definition dfa.hpp:169
Gecode::DFA::n_transitions
int n_transitions(void) const
Return the number of transitions.
Definition dfa.hpp:151
Gecode::DFA::n_symbols
unsigned int n_symbols(void) const
Return the number of symbols.
Definition dfa.hpp:145
Gecode::DFA::init
void init(int s, Transition t[], int f[], bool minimize=true)
Initialize DFA.
Definition dfa.cpp:152
Gecode::DFA::hash
std::size_t hash(void) const
Return hash key.
Definition dfa.hpp:189
Gecode::DFA::operator!=
bool operator!=(const DFA &d) const
Test whether DFA is not equal to d.
Definition dfa.hpp:347
Gecode::DFA::final_fst
int final_fst(void) const
Return the number of the first final state.
Definition dfa.hpp:163
Gecode::Delta
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Gecode::Home
Home class for posting propagators
Definition core.hpp:856
Gecode::IntAFC
Recording AFC information for integer variables.
Definition int.hh:4276
Gecode::IntAFC::IntAFC
IntAFC(void)
Construct as not yet initialized.
Definition afc.hpp:37
Gecode::IntAFC::init
void init(Home home, const IntVarArgs &x, double d=1.0, bool share=true)
Initialize for integer variables x with decay factor d.
Definition afc.hpp:54
Gecode::IntAFC::operator=
IntAFC & operator=(const IntAFC &a)
Assignment operator.
Definition afc.hpp:44
Gecode::IntAction
Recording actions for integer variables.
Definition int.hh:4362
Gecode::IntAction::init
void init(Home home, const IntVarArgs &x, double d=1.0, IntBranchMerit bm=nullptr)
Initialize for integer variables x with decay factor d.
Definition action.cpp:45
Gecode::IntAction::operator=
IntAction & operator=(const IntAction &a)
Assignment operator.
Definition action.hpp:44
Gecode::IntAction::IntAction
IntAction(void)
Construct as not yet initialized.
Definition action.hpp:37
Gecode::IntArgs
Passing integer arguments.
Definition int.hh:628
Gecode::IntArgs::create
static IntArgs create(int n, int start, int inc=1)
Allocate array with n elements such that for all .
Definition array.hpp:76
Gecode::IntArgs::IntArgs
IntArgs(void)
Allocate empty array.
Definition array.hpp:42
Gecode::IntAssign
Which values to select for assignment.
Definition int.hh:4971
Gecode::IntAssign::s
Select s
Which value to select.
Definition int.hh:4983
Gecode::IntAssign::select
Select select(void) const
Return selection strategy.
Definition assign.hpp:49
Gecode::IntAssign::IntAssign
IntAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition assign.hpp:37
Gecode::IntAssign::Select
Select
Which value selection.
Definition int.hh:4974
Gecode::IntAssign::SEL_VAL_COMMIT
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition int.hh:4979
Gecode::IntAssign::SEL_MIN
@ SEL_MIN
Select smallest value.
Definition int.hh:4975
Gecode::IntAssign::SEL_MED
@ SEL_MED
Select greatest value not greater than the median.
Definition int.hh:4976
Gecode::IntAssign::SEL_RND
@ SEL_RND
Select random value.
Definition int.hh:4978
Gecode::IntAssign::SEL_MAX
@ SEL_MAX
Select largest value.
Definition int.hh:4977
Gecode::IntCHB
Recording CHB for integer variables.
Definition int.hh:4458
Gecode::IntCHB::IntCHB
IntCHB(void)
Construct as not yet initialized.
Definition chb.hpp:37
Gecode::IntCHB::operator=
IntCHB & operator=(const IntCHB &chb)
Assignment operator.
Definition chb.hpp:44
Gecode::IntCHB::init
void init(Home home, const IntVarArgs &x, IntBranchMerit bm=nullptr)
Initialize for integer variables x.
Definition chb.cpp:44
Gecode::IntSetRanges::width
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Definition int-set-1.hpp:267
Gecode::IntSetRanges::operator()
bool operator()(void) const
Test whether iterator is still at a range or done.
Definition int-set-1.hpp:254
Gecode::IntSetRanges::max
int max(void) const
Return largest value of range.
Definition int-set-1.hpp:263
Gecode::IntSetRanges::operator++
void operator++(void)
Move iterator to next range (if possible).
Definition int-set-1.hpp:250
Gecode::IntSetRanges::init
void init(const IntSet &s)
Initialize with ranges for set s.
Definition int-set-1.hpp:237
Gecode::IntSetRanges::min
int min(void) const
Return smallest value of range.
Definition int-set-1.hpp:259
Gecode::IntSetRanges::IntSetRanges
IntSetRanges(void)
Default constructor.
Definition int-set-1.hpp:234
Gecode::IntSetValues::init
void init(const IntSet &s)
Initialize with values for s.
Definition int-set-1.hpp:285
Gecode::IntSetValues::IntSetValues
IntSetValues(void)
Default constructor.
Definition int-set-1.hpp:276
Gecode::IntSet
Integer sets.
Definition int.hh:174
Gecode::IntSet::min
int min(void) const
Return minimum of entire set.
Definition int-set-1.hpp:186
Gecode::IntSet::width
unsigned int width(void) const
Return width of set (distance between maximum and minimum).
Definition int-set-1.hpp:204
Gecode::IntSet::min
int min(int i) const
Return minimum of range at position i.
Definition int-set-1.hpp:152
Gecode::IntSet::in
bool in(int n) const
Return whether n is included in the set.
Definition int-set-1.hpp:177
Gecode::IntSet::max
int max(int i) const
Return maximum of range at position i.
Definition int-set-1.hpp:158
Gecode::IntSet::max
int max(void) const
Return maximum of entire set.
Definition int-set-1.hpp:192
Gecode::IntSet::IntSetRanges
friend class IntSetRanges
Definition int.hh:175
Gecode::IntSet::ranges
int ranges(void) const
Return number of ranges of the specification.
Definition int-set-1.hpp:171
Gecode::IntSet::operator==
bool operator==(const IntSet &s) const
Return whether s is equal.
Definition int-set-1.hpp:210
Gecode::IntSet::size
unsigned int size(void) const
Return size (cardinality) of set.
Definition int-set-1.hpp:198
Gecode::IntSet::IntSet
IntSet(void)
Initialize as empty set.
Definition int-set-1.hpp:43
Gecode::IntSet::empty
static const IntSet empty
Empty set.
Definition int.hh:283
Gecode::IntSet::operator!=
bool operator!=(const IntSet &s) const
Return whether s is not equal.
Definition int-set-1.hpp:223
Gecode::IntSet::IntSetInit
friend class IntSetInit
Definition int.hh:176
Gecode::IntTraceDelta
Trace delta information for integer variables.
Definition int.hh:5530
Gecode::IntTraceDelta::rn
Int::ViewRanges< Int::IntView > rn
Iterator over the new values.
Definition int.hh:5533
Gecode::IntTraceDelta::ro
Iter::Ranges::RangeList ro
Iterator over the old values.
Definition int.hh:5535
Gecode::IntTraceDelta::IntTraceDelta
IntTraceDelta(Int::IntTraceView o, Int::IntView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
Definition int-delta.hpp:37
Gecode::IntValBranch
Which values to select for branching first.
Definition int.hh:4854
Gecode::IntValBranch::Select
Select
Which value selection.
Definition int.hh:4857
Gecode::IntValBranch::SEL_VALUES_MIN
@ SEL_VALUES_MIN
Select all values starting from smallest.
Definition int.hh:4867
Gecode::IntValBranch::SEL_RND
@ SEL_RND
Select random value.
Definition int.hh:4861
Gecode::IntValBranch::SEL_SPLIT_MAX
@ SEL_SPLIT_MAX
Select values greater than mean of smallest and largest value.
Definition int.hh:4863
Gecode::IntValBranch::SEL_MIN
@ SEL_MIN
Select smallest value.
Definition int.hh:4858
Gecode::IntValBranch::SEL_MAX
@ SEL_MAX
Select largest value.
Definition int.hh:4860
Gecode::IntValBranch::SEL_RANGE_MAX
@ SEL_RANGE_MAX
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Definition int.hh:4865
Gecode::IntValBranch::SEL_RANGE_MIN
@ SEL_RANGE_MIN
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
Definition int.hh:4864
Gecode::IntValBranch::SEL_VALUES_MAX
@ SEL_VALUES_MAX
Select all values starting from largest.
Definition int.hh:4868
Gecode::IntValBranch::SEL_VAL_COMMIT
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition int.hh:4866
Gecode::IntValBranch::SEL_MED
@ SEL_MED
Select greatest value not greater than the median.
Definition int.hh:4859
Gecode::IntValBranch::SEL_SPLIT_MIN
@ SEL_SPLIT_MIN
Select values not greater than mean of smallest and largest value.
Definition int.hh:4862
Gecode::IntValBranch::select
Select select(void) const
Return selection strategy.
Definition val.hpp:49
Gecode::IntValBranch::IntValBranch
IntValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition val.hpp:37
Gecode::IntValBranch::s
Select s
Which value to select.
Definition int.hh:4872
Gecode::IntVarArgs
Passing integer variables.
Definition int.hh:656
Gecode::IntVarArgs::IntVarArgs
IntVarArgs(void)
Allocate empty array.
Definition array.hpp:85
Gecode::IntVarArray::IntVarArray
IntVarArray(void)
Default constructor (array of size 0).
Definition array.hpp:143
Gecode::IntVarBranch
Which integer variable to select for branching.
Definition int.hh:4570
Gecode::IntVarBranch::expand
void expand(Home home, const IntVarArgs &x)
Expand AFC, action, and CHB.
Definition var.hpp:74
Gecode::IntVarBranch::Select
Select
Which variable selection.
Definition int.hh:4573
Gecode::IntVarBranch::SEL_MAX_MIN
@ SEL_MAX_MIN
With smallest max.
Definition int.hh:4588
Gecode::IntVarBranch::SEL_CHB_MAX
@ SEL_CHB_MAX
With highest CHB Q-score.
Definition int.hh:4585
Gecode::IntVarBranch::SEL_AFC_SIZE_MAX
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
Definition int.hh:4595
Gecode::IntVarBranch::SEL_MIN_MIN
@ SEL_MIN_MIN
With smallest min.
Definition int.hh:4586
Gecode::IntVarBranch::SEL_ACTION_SIZE_MAX
@ SEL_ACTION_SIZE_MAX
With largest action divided by domain size.
Definition int.hh:4597
Gecode::IntVarBranch::SEL_AFC_SIZE_MIN
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
Definition int.hh:4594
Gecode::IntVarBranch::SEL_REGRET_MIN_MIN
@ SEL_REGRET_MIN_MIN
With smallest min-regret.
Definition int.hh:4605
Gecode::IntVarBranch::SEL_DEGREE_SIZE_MIN
@ SEL_DEGREE_SIZE_MIN
With smallest degree divided by domain size.
Definition int.hh:4592
Gecode::IntVarBranch::SEL_MIN_MAX
@ SEL_MIN_MAX
With largest min.
Definition int.hh:4587
Gecode::IntVarBranch::SEL_REGRET_MIN_MAX
@ SEL_REGRET_MIN_MAX
With largest min-regret.
Definition int.hh:4611
Gecode::IntVarBranch::SEL_CHB_SIZE_MAX
@ SEL_CHB_SIZE_MAX
With largest CHB Q-score divided by domain size.
Definition int.hh:4599
Gecode::IntVarBranch::SEL_MAX_MAX
@ SEL_MAX_MAX
With largest max.
Definition int.hh:4589
Gecode::IntVarBranch::SEL_AFC_MIN
@ SEL_AFC_MIN
With smallest accumulated failure count.
Definition int.hh:4580
Gecode::IntVarBranch::SEL_SIZE_MIN
@ SEL_SIZE_MIN
With smallest domain size.
Definition int.hh:4590
Gecode::IntVarBranch::SEL_AFC_MAX
@ SEL_AFC_MAX
With largest accumulated failure count.
Definition int.hh:4581
Gecode::IntVarBranch::SEL_MERIT_MAX
@ SEL_MERIT_MAX
With highest merit.
Definition int.hh:4577
Gecode::IntVarBranch::SEL_DEGREE_MAX
@ SEL_DEGREE_MAX
With largest degree.
Definition int.hh:4579
Gecode::IntVarBranch::SEL_SIZE_MAX
@ SEL_SIZE_MAX
With largest domain size.
Definition int.hh:4591
Gecode::IntVarBranch::SEL_ACTION_MIN
@ SEL_ACTION_MIN
With lowest action.
Definition int.hh:4582
Gecode::IntVarBranch::SEL_ACTION_MAX
@ SEL_ACTION_MAX
With highest action.
Definition int.hh:4583
Gecode::IntVarBranch::SEL_CHB_MIN
@ SEL_CHB_MIN
With lowest CHB Q-score.
Definition int.hh:4584
Gecode::IntVarBranch::SEL_RND
@ SEL_RND
Random (uniform, for tie breaking).
Definition int.hh:4575
Gecode::IntVarBranch::SEL_NONE
@ SEL_NONE
First unassigned.
Definition int.hh:4574
Gecode::IntVarBranch::SEL_MERIT_MIN
@ SEL_MERIT_MIN
With least merit.
Definition int.hh:4576
Gecode::IntVarBranch::SEL_REGRET_MAX_MIN
@ SEL_REGRET_MAX_MIN
With smallest max-regret.
Definition int.hh:4617
Gecode::IntVarBranch::SEL_CHB_SIZE_MIN
@ SEL_CHB_SIZE_MIN
With smallest CHB Q-score divided by domain size.
Definition int.hh:4598
Gecode::IntVarBranch::SEL_DEGREE_MIN
@ SEL_DEGREE_MIN
With smallest degree.
Definition int.hh:4578
Gecode::IntVarBranch::SEL_REGRET_MAX_MAX
@ SEL_REGRET_MAX_MAX
With largest max-regret.
Definition int.hh:4623
Gecode::IntVarBranch::SEL_ACTION_SIZE_MIN
@ SEL_ACTION_SIZE_MIN
With smallest action divided by domain size.
Definition int.hh:4596
Gecode::IntVarBranch::SEL_DEGREE_SIZE_MAX
@ SEL_DEGREE_SIZE_MAX
With largest degree divided by domain size.
Definition int.hh:4593
Gecode::IntVarBranch::s
Select s
Which variable to select.
Definition int.hh:4627
Gecode::IntVarBranch::select
Select select(void) const
Return selection strategy.
Definition var.hpp:69
Gecode::IntVarBranch::IntVarBranch
IntVarBranch(void)
Initialize with strategy SEL_NONE.
Definition var.hpp:37
Gecode::IntVarRanges::IntVarRanges
IntVarRanges(void)
Default constructor.
Definition int.hpp:106
Gecode::IntVarRanges::init
void init(const IntVar &x)
Initialize with ranges for integer variable x.
Definition int.hpp:113
Gecode::IntVarValues::IntVarValues
IntVarValues(void)
Default constructor.
Definition int.hpp:124
Gecode::IntVarValues::init
void init(const IntVar &x)
Initialize with values x.
Definition int.hpp:133
Gecode::IntVar
Integer variables.
Definition int.hh:371
Gecode::IntVar::size
unsigned int size(void) const
Return size (cardinality) of domain.
Definition int.hpp:80
Gecode::IntVar::regret_max
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value).
Definition int.hpp:88
Gecode::IntVar::min
int min(void) const
Return minimum of domain.
Definition int.hpp:62
Gecode::IntVar::IntVarArgs
friend class IntVarArgs
Definition int.hh:373
Gecode::IntVar::val
int val(void) const
Return assigned value.
Definition int.hpp:56
Gecode::IntVar::IntVar
IntVar(void)
Default constructor.
Definition int.hpp:47
Gecode::IntVar::in
bool in(int n) const
Test whether n is contained in domain.
Definition int.hpp:97
Gecode::IntVar::width
unsigned int width(void) const
Return width of domain (distance between maximum and minimum).
Definition int.hpp:76
Gecode::IntVar::range
bool range(void) const
Test whether domain is a range.
Definition int.hpp:93
Gecode::IntVar::IntVarArray
friend class IntVarArray
Definition int.hh:372
Gecode::IntVar::regret_min
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value).
Definition int.hpp:84
Gecode::IntVar::med
int med(void) const
Return median of domain (greatest element not greater than the median).
Definition int.hpp:66
Gecode::IntVar::max
int max(void) const
Return maximum of domain.
Definition int.hpp:70
Gecode::Int::BoolTraceView
Duplicate of a Boolean view.
Definition bool-trace-view.hpp:37
Gecode::Int::BoolVarImp
Boolean variable implementation.
Definition var-imp.hpp:491
Gecode::Int::BoolView
Boolean view for Boolean variables.
Definition view.hpp:1380
Gecode::Int::IntTraceView
Duplicate of an integer view.
Definition int-trace-view.hpp:37
Gecode::Int::IntVarImpFwd
Range iterator for ranges of integer variable implementation.
Definition var-imp.hpp:392
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::LDSB::SymmetryObject
Implementation of a symmetry at the modelling level.
Definition ldsb.hh:106
Gecode::Int::ViewRanges
Range iterator for integer views.
Definition view.hpp:54
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::Reify
Reification specification.
Definition int.hh:876
Gecode::Reify::x
BoolVar x
The Boolean control variable.
Definition int.hh:879
Gecode::Reify::var
BoolVar var(void) const
Return Boolean control variable.
Definition reify.hpp:48
Gecode::Reify::Reify
Reify(void)
Default constructor without proper initialization.
Definition reify.hpp:42
Gecode::Reify::mode
ReifyMode mode(void) const
Return reification mode.
Definition reify.hpp:56
Gecode::Reify::rm
ReifyMode rm
The reification mode.
Definition int.hh:881
Gecode::Rnd
Random number generator.
Definition rnd.hpp:42
Gecode::SharedArray
Shared array with arbitrary number of elements.
Definition shared-array.hpp:53
Gecode::SharedHandle::Object
The shared object.
Definition shared-object.hpp:53
Gecode::SharedHandle::SharedHandle
SharedHandle(void)
Create shared handle with no object pointing to.
Definition shared-object.hpp:122
Gecode::Space
Computation spaces.
Definition core.hpp:1742
Gecode::StdBoolTracer::init
virtual void init(const Space &home, const BoolTraceRecorder &t)
Print init information.
Definition tracer.cpp:123
Gecode::StdBoolTracer::prune
virtual void prune(const Space &home, const BoolTraceRecorder &t, const ViewTraceInfo &vti, int i, BoolTraceDelta &d)
Print prune information.
Definition tracer.cpp:132
Gecode::StdBoolTracer::os
std::ostream & os
Output stream to use.
Definition int.hh:5642
Gecode::StdBoolTracer::fix
virtual void fix(const Space &home, const BoolTraceRecorder &t)
Print fixpoint information.
Definition tracer.cpp:152
Gecode::StdBoolTracer::def
static StdBoolTracer def
Default tracer (printing to std::cerr).
Definition int.hh:5658
Gecode::StdBoolTracer::StdBoolTracer
StdBoolTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0.
Definition tracer.cpp:119
Gecode::StdBoolTracer::fail
virtual void fail(const Space &home, const BoolTraceRecorder &t)
Print failure information.
Definition tracer.cpp:170
Gecode::StdBoolTracer::done
virtual void done(const Space &home, const BoolTraceRecorder &t)
Print that trace recorder is done.
Definition tracer.cpp:188
Gecode::StdIntTracer::done
virtual void done(const Space &home, const IntTraceRecorder &t)
Print that trace recorder is done.
Definition tracer.cpp:108
Gecode::StdIntTracer::StdIntTracer
StdIntTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0 and events \ e.
Definition tracer.cpp:39
Gecode::StdIntTracer::os
std::ostream & os
Output stream to use.
Definition int.hh:5604
Gecode::StdIntTracer::prune
virtual void prune(const Space &home, const IntTraceRecorder &t, const ViewTraceInfo &vti, int i, IntTraceDelta &d)
Print prune information.
Definition tracer.cpp:52
Gecode::StdIntTracer::init
virtual void init(const Space &home, const IntTraceRecorder &t)
Print init information.
Definition tracer.cpp:43
Gecode::StdIntTracer::fail
virtual void fail(const Space &home, const IntTraceRecorder &t)
Print failure information.
Definition tracer.cpp:90
Gecode::StdIntTracer::fix
virtual void fix(const Space &home, const IntTraceRecorder &t)
Print fixpoint information.
Definition tracer.cpp:72
Gecode::StdIntTracer::def
static StdIntTracer def
Default tracer (printing to std::cerr).
Definition int.hh:5620
Gecode::Support::BitSetData
Date item for bitsets.
Definition bitset-base.hpp:65
Gecode::Symmetries
Collection of symmetries.
Definition int.hh:5292
Gecode::SymmetryHandle
A reference-counted pointer to a SymmetryObject.
Definition int.hh:5255
Gecode::SymmetryHandle::SymmetryHandle
SymmetryHandle(void)
Default constructor.
Definition sym-obj.cpp:37
Gecode::SymmetryHandle::ref
Int::LDSB::SymmetryObject * ref
Symmetry object that this handle refers to.
Definition int.hh:5258
Gecode::SymmetryHandle::decrement
void decrement(void)
Decrement counter.
Definition sym-obj.cpp:66
Gecode::SymmetryHandle::operator=
const SymmetryHandle & operator=(const SymmetryHandle &h)
Assignment operator.
Definition sym-obj.cpp:47
Gecode::SymmetryHandle::increment
void increment(void)
Increment counter.
Definition sym-obj.cpp:62
Gecode::TieBreak
Combine variable selection criteria for tie-breaking.
Definition tiebreak.hpp:38
Gecode::TraceFilter
Trace filters.
Definition filter.hpp:133
Gecode::TupleSet::Data
Data stored for a Table.
Definition int.hh:2229
Gecode::TupleSet::Data::max
int max
Largest value.
Definition int.hh:2245
Gecode::TupleSet::Data::n_free
int n_free
Number of free tuple entries of arity.
Definition int.hh:2241
Gecode::TupleSet::Data::resize
void resize(void)
Resize tuple data.
Definition tuple-set.cpp:247
Gecode::TupleSet::Data::support
BitSetData * support
Pointer to all support data.
Definition int.hh:2255
Gecode::TupleSet::Data::Data
Data(int a)
Initialize as empty tuple set with arity a.
Definition tuple-set.hpp:61
Gecode::TupleSet::Data::n_words
unsigned int n_words
Number of words for support.
Definition int.hh:2237
Gecode::TupleSet::Data::min
int min
Smallest value.
Definition int.hh:2243
Gecode::TupleSet::Data::set
static void set(BitSetData *d, unsigned int n)
Set bit n in bitset data d.
Definition tuple-set.hpp:113
Gecode::TupleSet::Data::arity
int arity
Arity.
Definition int.hh:2235
Gecode::TupleSet::Data::finalize
void finalize(void)
Finalize datastructure (disallows additions of more Tuples).
Definition tuple-set.cpp:103
Gecode::TupleSet::Data::n_tuples
int n_tuples
Number of Tuples.
Definition int.hh:2239
Gecode::TupleSet::Data::get
Tuple get(int i) const
Return tuple with number i.
Definition tuple-set.hpp:87
Gecode::TupleSet::Data::td
int * td
Tuple data.
Definition int.hh:2249
Gecode::TupleSet::Data::tuple2idx
unsigned int tuple2idx(Tuple t) const
Map tuple address to index.
Definition tuple-set.hpp:123
Gecode::TupleSet::Data::range
Range * range
Pointer to all ranges.
Definition int.hh:2253
Gecode::TupleSet::Data::lst
const Range * lst(int i) const
Return last range for position i.
Definition tuple-set.hpp:132
Gecode::TupleSet::Data::finalized
bool finalized(void) const
Is datastructure finalized.
Definition tuple-set.hpp:71
Gecode::TupleSet::Data::vd
ValueData * vd
Value data.
Definition int.hh:2251
Gecode::TupleSet::Data::fst
const Range * fst(int i) const
Return first range for position i.
Definition tuple-set.hpp:128
Gecode::TupleSet::Data::n_initial_free
static const int n_initial_free
Initial number of free tuples.
Definition int.hh:2232
Gecode::TupleSet::Data::key
std::size_t key
Hash key.
Definition int.hh:2247
Gecode::TupleSet::Data::add
Tuple add(void)
Return newly added tuple.
Definition tuple-set.hpp:76
Gecode::TupleSet::Range
Range information.
Definition int.hh:2201
Gecode::TupleSet::Range::s
BitSetData * s
Begin of supports.
Definition int.hh:2208
Gecode::TupleSet::Range::width
unsigned int width(void) const
Return the width.
Definition tuple-set.hpp:45
Gecode::TupleSet::Range::max
int max
Maximum value.
Definition int.hh:2206
Gecode::TupleSet::Range::min
int min
Minimum value.
Definition int.hh:2204
Gecode::TupleSet::Range::supports
const BitSetData * supports(unsigned int n_words, int n) const
Return the supports for value n.
Definition tuple-set.hpp:50
Gecode::TupleSet::Ranges::operator()
bool operator()(void) const
Test whether iterator is still at a range.
Definition tuple-set.hpp:266
Gecode::TupleSet::Ranges::Ranges
Ranges(const TupleSet &ts, int i)
Initialize for column i.
Definition tuple-set.hpp:260
Gecode::TupleSet::Ranges::max
int max(void) const
Return largest value of range.
Definition tuple-set.hpp:279
Gecode::TupleSet::Ranges::l
const Range * l
Last range.
Definition int.hh:2364
Gecode::TupleSet::Ranges::min
int min(void) const
Return smallest value of range.
Definition tuple-set.hpp:275
Gecode::TupleSet::Ranges::operator++
void operator++(void)
Move iterator to next range (if possible).
Definition tuple-set.hpp:270
Gecode::TupleSet::Ranges::c
const Range * c
Current range.
Definition int.hh:2362
Gecode::TupleSet::Ranges::width
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Definition tuple-set.hpp:283
Gecode::TupleSet::ValueData
Data about values in the table.
Definition int.hh:2216
Gecode::TupleSet::ValueData::start
unsigned int start(int n) const
Find start range for value n.
Definition tuple-set.hpp:93
Gecode::TupleSet::ValueData::n
unsigned int n
Number of ranges.
Definition int.hh:2219
Gecode::TupleSet::ValueData::r
Range * r
Ranges.
Definition int.hh:2221
Gecode::TupleSet
Class represeting a set of tuples.
Definition int.hh:2191
Gecode::TupleSet::TupleSet
TupleSet(void)
Construct an unitialized tuple set.
Definition tuple-set.hpp:147
Gecode::TupleSet::_add
void _add(const IntArgs &t)
Add tuple t to tuple set.
Definition tuple-set.cpp:460
Gecode::TupleSet::tuples
int tuples(void) const
Number of tuples.
Definition tuple-set.hpp:185
Gecode::TupleSet::max
int max(void) const
Return maximal value in all tuples.
Definition tuple-set.hpp:197
Gecode::TupleSet::operator!=
bool operator!=(const TupleSet &t) const
Test whether tuple set is different from t.
Definition tuple-set.hpp:177
Gecode::TupleSet::finalized
bool finalized(void) const
Is tuple set finalized.
Definition tuple-set.hpp:162
Gecode::TupleSet::add
TupleSet & add(const IntArgs &t)
Add tuple t to tuple set.
Definition tuple-set.hpp:142
Gecode::TupleSet::operator==
bool operator==(const TupleSet &t) const
Test whether tuple set is equal to t.
Definition tuple-set.hpp:214
Gecode::TupleSet::operator=
TupleSet & operator=(const TupleSet &t)
Assignment operator.
Definition tuple-set.cpp:275
Gecode::TupleSet::operator[]
Tuple operator[](int i) const
Get tuple i.
Definition tuple-set.hpp:201
Gecode::TupleSet::lst
const Range * lst(int i) const
Return last range for position i.
Definition tuple-set.hpp:209
Gecode::TupleSet::Tuple
int * Tuple
Type of a tuple.
Definition int.hh:2197
Gecode::TupleSet::hash
std::size_t hash(void) const
Return hash key.
Definition tuple-set.hpp:227
Gecode::TupleSet::finalize
void finalize(void)
Finalize tuple set.
Definition tuple-set.hpp:155
Gecode::TupleSet::equal
bool equal(const TupleSet &t) const
Test whether tuple set is equal to t.
Definition tuple-set.cpp:447
Gecode::TupleSet::fst
const Range * fst(int i) const
Return first range for position i.
Definition tuple-set.hpp:205
Gecode::TupleSet::words
unsigned int words(void) const
Return number of required bit set words.
Definition tuple-set.hpp:189
Gecode::TupleSet::min
int min(void) const
Return minimal value in all tuples.
Definition tuple-set.hpp:193
Gecode::TupleSet::raw
Data & raw(void) const
Get raw data (must be initialized).
Definition tuple-set.hpp:172
Gecode::TupleSet::BitSetData
Gecode::Support::BitSetData BitSetData
Import bit set data type.
Definition int.hh:2199
Gecode::TupleSet::data
Data & data(void) const
Get data (must be initialized and finalized).
Definition tuple-set.hpp:167
Gecode::TupleSet::init
void init(int a)
Initialize an uninitialized tuple set.
Definition tuple-set.cpp:269
Gecode::TupleSet::arity
int arity(void) const
Arity of tuple set.
Definition tuple-set.hpp:181
Gecode::ValBranch< IntVar >::ValBranch
ValBranch(void)
Definition val.hpp:72
Gecode::ValBranch< IntVar >::r
Rnd r
Definition val.hpp:49
Gecode::VarArgArray< IntVar >::VarArgArray
VarArgArray(void)
Definition array.hpp:1839
Gecode::VarArray
Variable arrays
Definition array.hpp:112
Gecode::VarArray< IntVar >::n
int n
Definition array.hpp:115
Gecode::VarArray< IntVar >::VarArray
VarArray(void)
Definition array.hpp:901
Gecode::VarBranch< IntVar >::VarBranch
VarBranch(void)
Definition var.hpp:116
Gecode::VarImpVar< Int::IntVarImp >::x
Int::IntVarImp * x
Definition var.hpp:50
Gecode::VarImpVar< Int::IntVarImp >::VarImpVar
VarImpVar(void)
Definition var.hpp:88
Gecode::ViewTraceInfo
View trace information.
Definition core.hpp:908
Gecode::ViewTraceRecorder
Propagator for recording view trace information.
Definition recorder.hpp:60
Gecode::ViewTracer
Tracer that process view trace information.
Definition tracer.hpp:51
dfa.hpp
extensional.hpp
GECODE_INT_EXPORT
#define GECODE_INT_EXPORT
Definition int.hh:81
Gecode::Int::OffsetView::offset
int offset(void) const
Integer-precision integer scale view.
Definition view.hpp:642
Gecode::trace
GECODE_FLOAT_EXPORT void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te=(TE_INIT|TE_PRUNE|TE_FIX|TE_FAIL|TE_DONE), FloatTracer &t=StdFloatTracer::def)
Create a tracer for float variables.
Definition trace.cpp:39
Gecode::IntTraceRecorder
ViewTraceRecorder< Int::IntView > IntTraceRecorder
Trace recorder for integer variables.
Definition int.hh:5595
Gecode::BoolTraceRecorder
ViewTraceRecorder< Int::BoolView > BoolTraceRecorder
Trace recorder for Boolean variables.
Definition int.hh:5633
Gecode::IntTracer
ViewTracer< Int::IntView > IntTracer
Tracer for integer variables.
Definition int.hh:5590
Gecode::BoolTracer
ViewTracer< Int::BoolView > BoolTracer
Tracer for Boolean variables.
Definition int.hh:5628
Gecode::BranchTbl
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
Definition var.hpp:48
Gecode::assign
void assign(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatAssign vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Assign all x with variable selection vars and value selection vals.
Definition branch.cpp:111
Gecode::branch
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
Definition branch.cpp:39
Gecode::linear
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
Definition linear.cpp:41
Gecode::rel
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Definition rel.cpp:68
Gecode::ite
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
Definition bool.cpp:39
Gecode::binpacking
void binpacking(Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntPropLevel ipl=IPL_DEF)
Post propagator for bin packing.
Definition bin-packing.cpp:41
Gecode::IntBranchMerit
std::function< double(const Space &home, IntVar x, int i)> IntBranchMerit
Branch merit function type for integer variables.
Definition int.hh:4198
Gecode::IntBranchFilter
std::function< bool(const Space &home, IntVar x, int i)> IntBranchFilter
Branch filter function type for integer variables.
Definition int.hh:4176
Gecode::BoolBranchFilter
std::function< bool(const Space &home, BoolVar x, int i)> BoolBranchFilter
Branch filter function type for Boolean variables.
Definition int.hh:4186
Gecode::BoolBranchVal
std::function< int(const Space &home, BoolVar x, int i)> BoolBranchVal
Branch value function type for Boolean variables.
Definition int.hh:4234
Gecode::BoolBranchMerit
std::function< double(const Space &home, BoolVar x, int i)> BoolBranchMerit
Branch merit function type for Boolean variables.
Definition int.hh:4209
Gecode::IntBranchVal
std::function< int(const Space &home, IntVar x, int i)> IntBranchVal
Branch value function type for integer variables.
Definition int.hh:4222
Gecode::BoolBranchCommit
std::function< void(Space &home, unsigned int a, BoolVar x, int i, int n)> BoolBranchCommit
Branch commit function type for Boolean variables.
Definition int.hh:4263
Gecode::IntBranchCommit
std::function< void(Space &home, unsigned int a, IntVar x, int i, int n)> IntBranchCommit
Branch commit function type for integer variables.
Definition int.hh:4249
Gecode::extensional
void extensional(Home home, const IntVarArgs &x, DFA d, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for extensional constraint described by a DFA.
Definition extensional-regular.cpp:39
Gecode::nooverlap
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel ipl=IPL_DEF)
Post propagator for rectangle packing.
Definition no-overlap.cpp:51
Gecode::precede
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel=IPL_DEF)
Post propagator that s precedes t in x.
Definition precede.cpp:43
Gecode::clause
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, BoolVar z, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...
Definition bool.cpp:955
Gecode::imp
Reify imp(BoolVar x)
Use implication for reification.
Definition reify.hpp:73
Gecode::IntRelType
IntRelType
Relation types for integers.
Definition int.hh:925
Gecode::eqv
Reify eqv(BoolVar x)
Use equivalence for reification.
Definition reify.hpp:69
Gecode::TaskType
TaskType
Type of task for scheduling constraints.
Definition int.hh:1004
Gecode::ReifyMode
ReifyMode
Mode for reification.
Definition int.hh:848
Gecode::BoolOpType
BoolOpType
Operation types for Booleans.
Definition int.hh:950
Gecode::pmi
Reify pmi(BoolVar x)
Use reverse implication for reification.
Definition reify.hpp:77
Gecode::IntPropLevel
IntPropLevel
Propagation levels for integer propagators.
Definition int.hh:974
Gecode::TaskTypeArgs
ArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
Definition int.hh:1015
Gecode::IRT_EQ
@ IRT_EQ
Equality ( ).
Definition int.hh:926
Gecode::IRT_NQ
@ IRT_NQ
Disequality ( ).
Definition int.hh:927
Gecode::IRT_GQ
@ IRT_GQ
Greater or equal ( ).
Definition int.hh:930
Gecode::IRT_LE
@ IRT_LE
Less ( ).
Definition int.hh:929
Gecode::IRT_GR
@ IRT_GR
Greater ( ).
Definition int.hh:931
Gecode::IRT_LQ
@ IRT_LQ
Less or equal ( ).
Definition int.hh:928
Gecode::TT_FIXS
@ TT_FIXS
Definition int.hh:1006
Gecode::TT_FIXE
@ TT_FIXE
Definition int.hh:1007
Gecode::TT_FIXP
@ TT_FIXP
Definition int.hh:1005
Gecode::RM_IMP
@ RM_IMP
Implication for reification.
Definition int.hh:862
Gecode::RM_PMI
@ RM_PMI
Inverse implication for reification.
Definition int.hh:869
Gecode::RM_EQV
@ RM_EQV
Equivalence for reification (default).
Definition int.hh:855
Gecode::BOT_OR
@ BOT_OR
Disjunction.
Definition int.hh:952
Gecode::BOT_EQV
@ BOT_EQV
Equivalence.
Definition int.hh:954
Gecode::BOT_IMP
@ BOT_IMP
Implication.
Definition int.hh:953
Gecode::BOT_XOR
@ BOT_XOR
Exclusive or.
Definition int.hh:955
Gecode::BOT_AND
@ BOT_AND
Conjunction.
Definition int.hh:951
Gecode::IPL_BASIC
@ IPL_BASIC
Use basic propagation algorithm.
Definition int.hh:981
Gecode::IPL_BASIC_ADVANCED
@ IPL_BASIC_ADVANCED
Use both.
Definition int.hh:983
Gecode::IPL_DOM
@ IPL_DOM
Domain propagation Options: basic versus advanced propagation.
Definition int.hh:979
Gecode::_IPL_BITS
@ _IPL_BITS
Number of bits required (internal).
Definition int.hh:984
Gecode::IPL_VAL
@ IPL_VAL
Value propagation.
Definition int.hh:977
Gecode::IPL_ADVANCED
@ IPL_ADVANCED
Use advanced propagation algorithm.
Definition int.hh:982
Gecode::IPL_DEF
@ IPL_DEF
Simple propagation levels.
Definition int.hh:976
Gecode::IPL_BND
@ IPL_BND
Bounds propagation.
Definition int.hh:978
Gecode::TE_INIT
@ TE_INIT
Trace init events.
Definition recorder.hpp:43
Gecode::TE_PRUNE
@ TE_PRUNE
Trace prune events.
Definition recorder.hpp:44
Gecode::TE_FIX
@ TE_FIX
Trace fixpoint events.
Definition recorder.hpp:45
Gecode::TE_FAIL
@ TE_FAIL
Trace fail events.
Definition recorder.hpp:46
Gecode::TE_DONE
@ TE_DONE
Trace done events.
Definition recorder.hpp:47
int-delta.hpp
int-set-1.hpp
int-set-2.hpp
int-trace-view.hpp
array-traits.hpp
array.hpp
action.hpp
afc.hpp
assign.hpp
chb.hpp
traits.hpp
val.hpp
var.hpp
branch.hpp
channel.hpp
exception.hpp
ipl.hpp
limits.hpp
traits.hpp
trace.hpp
var-imp.hpp
view.hpp
irt.hpp
iter.hh
kernel.hh
Gecode::Int::LDSB
Symmetry breaking for integer variables.
Definition int.hh:5246
Gecode::Int::Limits
Numerical limits for integer variables.
Definition int.hh:114
Gecode::Int::Limits::llmin
const long long int llmin
Smallest allowed long long integer value.
Definition int.hh:124
Gecode::Int::Limits::positive
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l.
Definition limits.hpp:57
Gecode::Int::Limits::llmax
const long long int llmax
Largest allowed long long integer value.
Definition int.hh:122
Gecode::Int::Limits::overflow_add
bool overflow_add(int n, int m)
Check whether adding n and m would overflow.
Definition limits.hpp:79
Gecode::Int::Limits::nonnegative
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l.
Definition limits.hpp:68
Gecode::Int::Limits::check
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
Definition limits.hpp:46
Gecode::Int::Limits::infinity
const int infinity
Infinity for integers.
Definition int.hh:120
Gecode::Int::Limits::overflow_mul
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
Definition limits.hpp:107
Gecode::Int::Limits::min
const int min
Smallest allowed integer value.
Definition int.hh:118
Gecode::Int::Limits::valid
bool valid(int n)
Return whether n is in range.
Definition limits.hpp:37
Gecode::Int::Limits::max
const int max
Largest allowed integer value.
Definition int.hh:116
Gecode::Int::Limits::llinfinity
const long long int llinfinity
Infinity for long long integers.
Definition int.hh:126
Gecode::Int::Limits::overflow_sub
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Definition limits.hpp:93
Gecode::Int
Finite domain integers.
Gecode
Gecode toplevel namespace
Gecode::IntSetArgs
ArgArray< IntSet > IntSetArgs
Passing set arguments.
Definition int.hh:619
Gecode::BOOL_VAR_CHB_MIN
BoolVarBranch BOOL_VAR_CHB_MIN(BoolCHB c, BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
Definition var.hpp:434
Gecode::INT_ASSIGN
IntAssign INT_ASSIGN(IntBranchVal v, IntBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c.
Definition assign.hpp:75
Gecode::INT_ASSIGN_RND
IntAssign INT_ASSIGN_RND(Rnd r)
Select random value.
Definition assign.hpp:70
Gecode::ValueSymmetry
SymmetryHandle ValueSymmetry(const IntArgs &v)
Values in v are interchangeable.
Definition ldsb.cpp:81
Gecode::INT_VAL_SPLIT_MIN
IntValBranch INT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
Definition val.hpp:75
Gecode::ValueSequenceSymmetry
SymmetryHandle ValueSequenceSymmetry(const IntArgs &v, int ss)
Value sequences in v of size ss are interchangeable.
Definition ldsb.cpp:102
Gecode::BOOL_ASSIGN_MAX
BoolAssign BOOL_ASSIGN_MAX(void)
Select largest value.
Definition assign.hpp:105
Gecode::count
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition count.cpp:40
Gecode::INT_VAL_RANGE_MIN
IntValBranch INT_VAL_RANGE_MIN(void)
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
Definition val.hpp:85
Gecode::INT_VAL_RANGE_MAX
IntValBranch INT_VAL_RANGE_MAX(void)
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Definition val.hpp:90
Gecode::BOOL_VAL
BoolValBranch BOOL_VAL(BoolBranchVal v, BoolBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
Definition val.hpp:145
Gecode::INT_VALUES_MAX
IntValBranch INT_VALUES_MAX(void)
Try all values starting from largest.
Definition val.hpp:105
Gecode::INT_VAR_AFC_SIZE_MAX
IntVarBranch INT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
Definition var.hpp:236
Gecode::values_reflect
SymmetryHandle values_reflect(int lower, int upper)
The values from lower to upper (inclusive) can be reflected.
Definition ldsb.cpp:106
Gecode::INT_VAR_CHB_SIZE_MIN
IntVarBranch INT_VAR_CHB_SIZE_MIN(IntCHB c, BranchTbl tbl=nullptr)
Select variable with smallest CHB Q-score divided by domain size.
Definition var.hpp:266
Gecode::channel
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition channel.cpp:41
Gecode::mod
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:360
Gecode::sqr
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:95
Gecode::order
void order(Home home, IntVar s0, int p0, IntVar s1, int p1, BoolVar b, IntPropLevel ipl=IPL_DEF)
Post propagators for ordering two tasks.
Definition order.cpp:41
Gecode::INT_VAR_DEGREE_MAX
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
Definition var.hpp:121
Gecode::INT_VAR_REGRET_MIN_MIN
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest min-regret.
Definition var.hpp:286
Gecode::INT_VAR_ACTION_MAX
IntVarBranch INT_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with highest action with decay factor d.
Definition var.hpp:156
Gecode::sequence
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition sequence.cpp:47
Gecode::IntSharedArray
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
Definition int.hh:1477
Gecode::INT_VAL_MED
IntValBranch INT_VAL_MED(void)
Select greatest value not greater than the median.
Definition val.hpp:60
Gecode::INT_VAL
IntValBranch INT_VAL(IntBranchVal v, IntBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
Definition val.hpp:95
Gecode::tiebreak
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
Definition tiebreak.hpp:80
Gecode::operator<<
Archive & operator<<(Archive &e, FloatNumBranch nl)
Definition val-sel.hpp:39
Gecode::sorted
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, IntPropLevel ipl=IPL_DEF)
Post propagator that y is x sorted in increasing order.
Definition sorted.cpp:58
Gecode::ba
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
Definition ipl.hpp:43
Gecode::INT_VAR_REGRET_MIN_MAX
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest min-regret.
Definition var.hpp:291
Gecode::distinct
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Post propagator for for all .
Definition distinct.cpp:46
Gecode::INT_VAR_ACTION_SIZE_MAX
IntVarBranch INT_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest action divided by domain size with decay factor d.
Definition var.hpp:256
Gecode::min
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:67
Gecode::BOOL_VAL_MIN
BoolValBranch BOOL_VAL_MIN(void)
Select smallest value.
Definition val.hpp:130
Gecode::BOOL_VAR_MERIT_MIN
BoolVarBranch BOOL_VAR_MERIT_MIN(BoolBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with least merit according to branch merit function bm.
Definition var.hpp:374
Gecode::INT_VAR_NONE
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
Definition var.hpp:96
Gecode::vbd
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Definition ipl.hpp:37
Gecode::neg
IntRelType neg(IntRelType irt)
Return negated relation type of irt.
Definition irt.hpp:52
Gecode::INT_VAR_CHB_MIN
IntVarBranch INT_VAR_CHB_MIN(IntCHB c, BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
Definition var.hpp:166
Gecode::dom
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition dom.cpp:40
Gecode::BOOL_VAR_NONE
BoolVarBranch BOOL_VAR_NONE(void)
Select first unassigned variable.
Definition var.hpp:364
Gecode::abs
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:41
Gecode::div
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:127
Gecode::element
void element(Home home, IntSharedArray n, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for .
Definition element.cpp:39
Gecode::INT_VAR_AFC_MAX
IntVarBranch INT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count with decay factor d.
Definition var.hpp:136
Gecode::argmax
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:110
Gecode::INT_VAR_AFC_MIN
IntVarBranch INT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count with decay factor d.
Definition var.hpp:126
Gecode::INT_VAR_REGRET_MAX_MAX
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest max-regret.
Definition var.hpp:301
Gecode::INT_VALUES_MIN
IntValBranch INT_VALUES_MIN(void)
Try all values starting from smallest.
Definition val.hpp:100
Gecode::mult
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:88
Gecode::divmod
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:327
Gecode::swap
IntRelType swap(IntRelType irt)
Return swapped relation type of irt.
Definition irt.hpp:37
Gecode::path
void path(Home home, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a Hamiltonian path.
Definition circuit.cpp:169
Gecode::sqrt
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition arithmetic.cpp:102
Gecode::INT_VAR_CHB_MAX
IntVarBranch INT_VAR_CHB_MAX(IntCHB c, BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score.
Definition var.hpp:176
Gecode::INT_VAL_MAX
IntValBranch INT_VAL_MAX(void)
Select largest value.
Definition val.hpp:65
Gecode::BOOL_VAL_MAX
BoolValBranch BOOL_VAL_MAX(void)
Select largest value.
Definition val.hpp:135
Gecode::BOOL_VAR_RND
BoolVarBranch BOOL_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
Definition var.hpp:369
Gecode::BOOL_VAR_ACTION_MIN
BoolVarBranch BOOL_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with lowest action with decay factor d.
Definition var.hpp:414
Gecode::when
void when(Home home, BoolVar x, std::function< void(Space &home)> t, std::function< void(Space &home)> e, IntPropLevel ipl=IPL_DEF)
Execute t (then) when x is assigned one, and e (else) otherwise.
Definition exec.cpp:70
Gecode::cumulative
void cumulative(Home home, int c, const TaskTypeArgs &t, const IntVarArgs &flex, const IntArgs &fix, const IntArgs &u, IntPropLevel ipl=IPL_DEF)
Post propagators for scheduling tasks on cumulative resources.
Definition cumulative.cpp:354
Gecode::BOOL_VAR_DEGREE_MIN
BoolVarBranch BOOL_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
Definition var.hpp:384
Gecode::cumulatives
void cumulatives(Home home, const IntVarArgs &m, const IntVarArgs &s, const IntVarArgs &p, const IntVarArgs &e, const IntVarArgs &u, const IntArgs &c, bool at_most, IntPropLevel ipl=IPL_DEF)
Post propagators for the cumulatives constraint.
Definition cumulatives.cpp:110
Gecode::BOOL_ASSIGN_RND
BoolAssign BOOL_ASSIGN_RND(Rnd r)
Select random value.
Definition assign.hpp:110
Gecode::IntVarValPrint
std::function< void(const Space &home, const Brancher &b, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)> IntVarValPrint
Function type for printing branching alternatives for integer variables.
Definition int.hh:4552
Gecode::INT_VAL_SPLIT_MAX
IntValBranch INT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
Definition val.hpp:80
Gecode::INT_VAR_MAX_MIN
IntVarBranch INT_VAR_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest max.
Definition var.hpp:196
Gecode::INT_VAL_MIN
IntValBranch INT_VAL_MIN(void)
Select smallest value.
Definition val.hpp:55
Gecode::VariableSymmetry
SymmetryHandle VariableSymmetry(const IntVarArgs &x)
Variables in x are interchangeable.
Definition ldsb.cpp:62
Gecode::INT_ASSIGN_MED
IntAssign INT_ASSIGN_MED(void)
Select greatest value not greater than the median.
Definition assign.hpp:60
Gecode::relax
GECODE_FLOAT_EXPORT void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
Definition relax.cpp:57
Gecode::BOOL_VAR_AFC_MIN
BoolVarBranch BOOL_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count with decay factor d.
Definition var.hpp:394
Gecode::BOOL_VAR_AFC_MAX
BoolVarBranch BOOL_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count with decay factor d.
Definition var.hpp:404
Gecode::BOOL_ASSIGN
BoolAssign BOOL_ASSIGN(BoolBranchVal v, BoolBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c.
Definition assign.hpp:115
Gecode::BOOL_VAR_CHB_MAX
BoolVarBranch BOOL_VAR_CHB_MAX(BoolCHB c, BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score.
Definition var.hpp:444
Gecode::INT_VAR_MAX_MAX
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest max.
Definition var.hpp:201
Gecode::wait
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
Definition exec.cpp:39
Gecode::INT_ASSIGN_MIN
IntAssign INT_ASSIGN_MIN(void)
Select smallest value.
Definition assign.hpp:55
Gecode::INT_VAR_ACTION_MIN
IntVarBranch INT_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with lowest action with decay factor d.
Definition var.hpp:146
Gecode::INT_VAR_RND
IntVarBranch INT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
Definition var.hpp:101
Gecode::INT_VAR_AFC_SIZE_MIN
IntVarBranch INT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count divided by domain size with decay factor d.
Definition var.hpp:226
Gecode::unshare
void unshare(Home home, IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Replace multiple variable occurences in x by fresh variables.
Definition unshare.cpp:136
Gecode::max
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition arithmetic.cpp:49
Gecode::INT_VAR_DEGREE_MIN
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
Definition var.hpp:116
Gecode::VariableSequenceSymmetry
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &x, int ss)
Variable sequences in x of size ss are interchangeable.
Definition ldsb.cpp:90
Gecode::BOOL_VAL_RND
BoolValBranch BOOL_VAL_RND(Rnd r)
Select random value.
Definition val.hpp:140
Gecode::INT_VAR_REGRET_MAX_MIN
IntVarBranch INT_VAR_REGRET_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest max-regret.
Definition var.hpp:296
Gecode::INT_VAR_MERIT_MIN
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with least merit according to branch merit function bm.
Definition var.hpp:106
Gecode::INT_VAR_CHB_SIZE_MAX
IntVarBranch INT_VAR_CHB_SIZE_MAX(IntCHB c, BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score divided by domain size.
Definition var.hpp:276
Gecode::argmin
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak=true, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition arithmetic.cpp:163
Gecode::nvalues
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Definition nvalues.cpp:40
Gecode::INT_VAR_DEGREE_SIZE_MAX
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree divided by domain size.
Definition var.hpp:221
Gecode::unary
void unary(Home home, const IntVarArgs &s, const IntArgs &p, IntPropLevel ipl=IPL_DEF)
Post propagators for scheduling tasks on unary resources.
Definition unary.cpp:44
Gecode::member
void member(Home home, const IntVarArgs &x, IntVar y, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for .
Definition member.cpp:39
Gecode::pow
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Definition arithmetic.cpp:109
Gecode::INT_VAR_MERIT_MAX
IntVarBranch INT_VAR_MERIT_MAX(IntBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with highest merit according to branch merit function bm.
Definition var.hpp:111
Gecode::circuit
void circuit(Home home, const IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a circuit.
Definition circuit.cpp:73
Gecode::INT_VAR_SIZE_MIN
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest domain size.
Definition var.hpp:206
Gecode::BOOL_VAR_DEGREE_MAX
BoolVarBranch BOOL_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
Definition var.hpp:389
Gecode::BoolVarValPrint
std::function< void(const Space &home, const Brancher &b, unsigned int a, BoolVar x, int i, const int &n, std::ostream &o)> BoolVarValPrint
Function type for printing branching alternatives for Boolean variables.
Definition int.hh:4559
Gecode::INT_VAR_ACTION_SIZE_MIN
IntVarBranch INT_VAR_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest action divided by domain size with decay factor d.
Definition var.hpp:246
Gecode::nroot
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Definition arithmetic.cpp:118
Gecode::BOOL_VAR_ACTION_MAX
BoolVarBranch BOOL_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with highest action with decay factor d.
Definition var.hpp:424
Gecode::BOOL_ASSIGN_MIN
BoolAssign BOOL_ASSIGN_MIN(void)
Select smallest value.
Definition assign.hpp:100
Gecode::INT_ASSIGN_MAX
IntAssign INT_ASSIGN_MAX(void)
Select largest value.
Definition assign.hpp:65
Gecode::INT_VAR_MIN_MAX
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest min.
Definition var.hpp:191
Gecode::BOOL_VAR_MERIT_MAX
BoolVarBranch BOOL_VAR_MERIT_MAX(BoolBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with highest merit according to branch merit function bm.
Definition var.hpp:379
Gecode::INT_VAR_DEGREE_SIZE_MIN
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree divided by domain size.
Definition var.hpp:216
Gecode::INT_VAR_MIN_MIN
IntVarBranch INT_VAR_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest min.
Definition var.hpp:186
Gecode::INT_VAR_SIZE_MAX
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest domain size.
Definition var.hpp:211
Gecode::INT_VAL_RND
IntValBranch INT_VAL_RND(Rnd r)
Select random value.
Definition val.hpp:70
propagator.hpp
reify.hpp
search.hh
GECODE_VTABLE_EXPORT
#define GECODE_VTABLE_EXPORT
Definition support.hh:72
tuple-set.hpp