42 #ifndef __GECODE_MINIMODEL_HH__ 43 #define __GECODE_MINIMODEL_HH__ 47 #ifdef GECODE_HAS_SET_VARS 50 #ifdef GECODE_HAS_FLOAT_VARS 61 #if !defined(GECODE_STATIC_LIBS) && \ 62 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 64 #ifdef GECODE_BUILD_MINIMODEL 65 #define GECODE_MINIMODEL_EXPORT __declspec( dllexport ) 67 #define GECODE_MINIMODEL_EXPORT __declspec( dllimport ) 72 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 74 #define GECODE_MINIMODEL_EXPORT __attribute__ ((visibility("default"))) 78 #define GECODE_MINIMODEL_EXPORT 84 #ifndef GECODE_BUILD_MINIMODEL 85 #define GECODE_LIBRARY_NAME "MiniModel" 92 namespace MiniModel {}
101 #ifdef GECODE_HAS_SET_VARS 104 #ifdef GECODE_HAS_FLOAT_VARS 142 #ifdef GECODE_HAS_SET_VARS 145 #ifdef GECODE_HAS_FLOAT_VARS 686 #ifdef GECODE_HAS_FLOAT_VARS 1058 #ifdef GECODE_HAS_SET_VARS 1264 BoolExpr(
const BoolExpr& e);
1267 BoolExpr(
const BoolExpr&
l,
NodeType t,
const BoolExpr&
r);
1273 BoolExpr(
const BoolExpr& e,
NodeType t);
1277 #ifdef GECODE_HAS_FLOAT_VARS 1282 #ifdef GECODE_HAS_SET_VARS 1285 BoolExpr(
const SetRel& rs);
1292 explicit BoolExpr(
Misc* m);
1301 const BoolExpr& operator =(
const BoolExpr& e);
1362 #ifdef GECODE_HAS_SET_VARS 1374 #ifdef GECODE_HAS_FLOAT_VARS 1391 #ifdef GECODE_HAS_SET_VARS 1481 #ifdef GECODE_HAS_FLOAT_VARS 1486 #ifdef GECODE_HAS_SET_VARS 1509 namespace MiniModel {
1528 std::string toString(
void)
const;
1545 const REG& operator =(
const REG&
r);
1550 REG& operator +=(
const REG&
r);
1554 REG& operator |=(
const REG&
r);
1560 REG operator ()(
unsigned int n,
unsigned int m);
1562 REG operator ()(
unsigned int n);
1564 template<
class Char,
class Traits>
1565 std::basic_ostream<Char,Traits>&
1566 print(std::basic_ostream<Char,Traits>& os)
const;
1576 template<
class Char,
class Traits>
1577 std::basic_ostream<Char,Traits>&
1578 operator <<(std::basic_ostream<Char,Traits>& os,
const REG&
r);
1607 #ifdef GECODE_HAS_FLOAT_VARS 1653 #ifdef GECODE_HAS_FLOAT_VARS 1689 #ifdef GECODE_HAS_MPFR 1754 #ifdef GECODE_HAS_FLOAT_VARS 1759 std::ceil(f.
min())));
1761 std::floor(f.
max())));
1767 #ifdef GECODE_HAS_SET_VARS 1981 rel(home,x,r,y,ipl);
1988 rel(home,x,r,y,ipl);
2001 #ifdef GECODE_HAS_SET_VARS 2074 Slice& reverse(
void);
2076 operator ArgsType(
void);
2081 operator const ArgsType(
void)
const;
2166 int width(
void)
const;
2168 int height(
void)
const;
2170 ArgsType
const get_array(
void)
const;
2177 ValueType& operator ()(
int c,
int r);
2184 const ValueType& operator ()(
int c,
int r)
const;
2207 template<
class Char,
class Traits,
class A>
2208 std::basic_ostream<Char,Traits>&
2209 operator <<(std::basic_ostream<Char,Traits>& os,
const Matrix<A>& m);
2214 template<
class Char,
class Traits,
class A>
2215 std::basic_ostream<Char,Traits>&
2216 operator <<(std::basic_ostream<Char,Traits>& os,
const Slice<A>& s);
2250 #ifdef GECODE_HAS_SET_VARS 2340 virtual void constrain(
const Space& best);
2342 virtual IntVar cost(
void)
const = 0;
2357 virtual void constrain(
const Space& best);
2359 virtual IntVar cost(
void)
const = 0;
2374 virtual void constrain(
const Space& best);
2391 virtual void constrain(
const Space& best);
2396 #ifdef GECODE_HAS_FLOAT_VARS 2418 virtual void constrain(
const Space& best);
2420 virtual FloatVar cost(
void)
const = 0;
2443 virtual void constrain(
const Space& best);
2445 virtual FloatVar cost(
void)
const = 0;
FloatVal operator-(const FloatVal &x)
SetExpr singleton(const LinIntExpr &e)
Singleton expression.
Class for minimizing integer cost.
SetRelType srt
Which relation.
SetRelType
Common relation types for sets.
void lex(Home home, const IntVarArgs &x, IntRelType r, const IntVarArgs &y, IntPropLevel ipl=IPL_DEF)
Post lexical order between x and y.
Class for lexicographically maximizing integer costs.
int size(void) const
Return size of array (number of elements)
virtual ~NonLinFloatExpr(void)
Destructor.
const int min
Smallest allowed integer in integer set.
SetExpr operator&(const SetExpr &l, const SetExpr &r)
Intersection of set expressions.
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
const FloatNum max
Largest allowed float value.
virtual ~NonLinIntExpr(void)
Destructor.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
FloatVal operator/(const FloatVal &x, const FloatVal &y)
void rfree(void *p)
Free memory block starting at p.
FloatNum max(void) const
Return maximum of domain.
Regular expressions over integer values.
Linear term with Boolean variable.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
FloatNum step
Step by which a next solution has to have lower cost.
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Node for Boolean expression
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
Linear relations over integer variables.
void atmost(Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF)
Post constraint .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Base class for non-linear expressions over integer variables.
void * ralloc(size_t s)
Allocate s bytes from heap.
Addition of linear terms.
void roots(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
SymmetryHandle columns_interchange(const Matrix< A > &m)
Interchangeable columns symmetry specification.
Linear term with variable.
Comparison relation (for two-sided comparisons)
const int max
Largest allowed integer in integer set.
Linear term with integer variable.
Class for maximizing float cost.
const int max
Largest allowed integer value.
const int min
Smallest allowed integer value.
BoolExpr operator^(const BoolExpr &l, const BoolExpr &r)
Exclusive-or of Boolean expressions.
void atleast(Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF)
Post constraint .
ArrayTraits< A >::ValueType ValueType
The type of elements of this array.
Nodes for linear expressions.
SetExpr setdunion(const SetVarArgs &x)
Disjoint union of set variables.
static IntVar result(Home home, IntVar *x)
Return fresh variable if x is NULL, x otherwise.
FloatNum min(void) const
Return minimum of domain.
int lubMax(void) const
Return maximum element of least upper bound.
Gecode::FloatVal c(-8, 8)
BoolExpr operator&&(const BoolExpr &l, const BoolExpr &r)
Conjunction of Boolean expressions.
Miscealloneous Boolean expressions.
static FloatVar result(Home home, FloatVar *x)
Return fresh variable if x is NULL, x otherwise.
Deterministic finite automaton (DFA)
int p
Number of positive literals for node type.
const FloatNum min
Smallest allowed float value.
IntRelType neg(IntRelType irt)
Return negated relation type of irt.
int n
Number of negative literals for node type.
Base class for non-linear float expressions.
Gecode::IntArgs i({1, 2, 3, 4})
A reference-counted pointer to a SymmetryObject.
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel)
Post propagator for .
Nodes for linear expressions.
IntRelType
Relation types for integers.
FloatVal operator+(const FloatVal &x)
static IntVar result(Home home, IntVar *x, IntVar y)
Constrain x to be equal to y if x is not NULL.
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatRelType
Relation types for floats.
bool operator!=(const FloatVal &x, const FloatVal &y)
Simple propagation levels.
unsigned int size(void) const
Return size (cardinality) of set.
SetExpr r
Right side of relation.
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
unsigned int size(I &i)
Size of all ranges of range iterator i.
static FloatVar result(Home home, FloatVar *x, FloatVar y)
Constrain x to be equal to y if x is not NULL.
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
Class for lexicographically minimizing integer costs.
ArrayTraits< A >::ArgsType ArgsType
The type of the Args-array type for ValueType values.
Subtraction of linear terms.
NodeType
Type of set expression.
NodeType
Type of linear expression.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
SetExpr setunion(const SetVarArgs &x)
Union of set variables.
void asin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
SetExpr l
Left side of relation.
Passing integer variables.
Passing integer arguments.
NodeType
Type of linear expression.
Passing Boolean variables.
static const IntSet empty
Empty set.
BoolVar expr(Home home, const BoolExpr &e, IntPropLevel ipl)
Post Boolean expression and return its value.
SymmetryHandle columns_reflect(const Matrix< A > &m)
Reflect columns symmetry specification.
union Gecode::@593::NNF::@62 u
Union depending on nodetype t.
Boolean integer variables.
LinIntExpr cardinality(const SetExpr &e)
Cardinality of set expression.
Post propagator for SetVar SetOpType SetVar SetRelType r
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Archive & operator>>(Archive &e, FloatNumBranch &nl)
ArrayTraits< A >::ArgsType ArgsType
The type of the Args-array type for ValueType values.
void cos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
IntPropLevel
Propagation levels for integer propagators.
void print(std::basic_ostream< Char, Traits > &s, bool assigned, IL &lb, IU &ub, unsigned int cardMin, unsigned int cardMax)
Print set view.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
Post propagator for SetVar SetOpType SetVar y
Class for maximizing integer cost.
NodeType
Type of Boolean expression.
FloatVal operator*(const FloatVal &x, const FloatVal &y)
SymmetryHandle diagonal_reflect(const Matrix< A > &m)
Reflect around main diagonal symmetry specification.
Sum of integer variables.
Linear expressions over integer variables.
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
bool operator>=(const FloatVal &x, const FloatVal &y)
Heap heap
The single global heap.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Sum of Boolean variables.
SymmetryHandle rows_interchange(const Matrix< A > &m)
Interchangeable rows symmetry specification.
Subtraction of linear terms.
BoolExpr operator!(const BoolExpr &e)
Negated Boolean expression.
void values(Home home, const IntVarArgs &x, IntSet y, IntPropLevel ipl=IPL_DEF)
Post constraint .
Post propagator for SetVar x
LinIntExpr operator%(const LinIntExpr &e0, const LinIntExpr &e1)
Return expression for .
Archive & operator<<(Archive &e, FloatNumBranch nl)
Implementation of the actual expression tree.
#define GECODE_MINIMODEL_EXPORT
Matrix-interface for arrays.
bool operator>(const FloatVal &x, const FloatVal &y)
SetExpr operator|(const SetExpr &l, const SetExpr &r)
Union of set expressions.
bool operator<(const FloatVal &x, const FloatVal &y)
bool operator==(const FloatVal &x, const FloatVal &y)
Addition of linear terms.
Traits of arrays in Gecode.
bool operator<=(const FloatVal &x, const FloatVal &y)
Class for minimizing float cost.
Gecode toplevel namespace
LinFloatExpr sum(const FloatVarArgs &x)
Construct linear float expression as sum of float variables.
void sin(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
#define GECODE_VTABLE_EXPORT
void acos(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Home class for posting propagators
Base class for heap allocated objects.
double FloatNum
Floating point number base type.
void exactly(Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF)
Post constraint .
const unsigned int slice
Size of a slice in a portfolio and scale factor for restarts(in number of failures) ...
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
FloatNum step
Step by which a next solution has to have lower cost.
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntPropLevel)
Post domain consistent propagator for .
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
BoolExpr operator||(const BoolExpr &l, const BoolExpr &r)
Disjunction of Boolean expressions.
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
SymmetryHandle rows_reflect(const Matrix< A > &m)
Reflect rows symmetry specification.