46 #ifndef __GECODE_MINIMODEL_HH__ 47 #define __GECODE_MINIMODEL_HH__ 51 #ifdef GECODE_HAS_SET_VARS 54 #ifdef GECODE_HAS_FLOAT_VARS 65 #if !defined(GECODE_STATIC_LIBS) && \ 66 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 68 #ifdef GECODE_BUILD_MINIMODEL 69 #define GECODE_MINIMODEL_EXPORT __declspec( dllexport ) 71 #define GECODE_MINIMODEL_EXPORT __declspec( dllimport ) 76 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 78 #define GECODE_MINIMODEL_EXPORT __attribute__ ((visibility("default"))) 82 #define GECODE_MINIMODEL_EXPORT 88 #ifndef GECODE_BUILD_MINIMODEL 89 #define GECODE_LIBRARY_NAME "MiniModel" 96 namespace MiniModel {}
105 #ifdef GECODE_HAS_SET_VARS 108 #ifdef GECODE_HAS_FLOAT_VARS 146 #ifdef GECODE_HAS_SET_VARS 149 #ifdef GECODE_HAS_FLOAT_VARS 690 #ifdef GECODE_HAS_FLOAT_VARS 1062 #ifdef GECODE_HAS_SET_VARS 1268 BoolExpr(
const BoolExpr& e);
1271 BoolExpr(
const BoolExpr&
l,
NodeType t,
const BoolExpr&
r);
1277 BoolExpr(
const BoolExpr& e,
NodeType t);
1281 #ifdef GECODE_HAS_FLOAT_VARS 1286 #ifdef GECODE_HAS_SET_VARS 1289 BoolExpr(
const SetRel& rs);
1296 explicit BoolExpr(
Misc* m);
1305 const BoolExpr& operator =(
const BoolExpr& e);
1366 #ifdef GECODE_HAS_SET_VARS 1378 #ifdef GECODE_HAS_FLOAT_VARS 1395 #ifdef GECODE_HAS_SET_VARS 1485 #ifdef GECODE_HAS_FLOAT_VARS 1490 #ifdef GECODE_HAS_SET_VARS 1513 namespace MiniModel {
1532 std::string toString(
void)
const;
1549 const REG& operator =(
const REG&
r);
1554 REG& operator +=(
const REG&
r);
1558 REG& operator |=(
const REG&
r);
1564 REG operator ()(
unsigned int n,
unsigned int m);
1566 REG operator ()(
unsigned int n);
1568 template<
class Char,
class Traits>
1569 std::basic_ostream<Char,Traits>&
1570 print(std::basic_ostream<Char,Traits>& os)
const;
1580 template<
class Char,
class Traits>
1581 std::basic_ostream<Char,Traits>&
1582 operator <<(std::basic_ostream<Char,Traits>& os,
const REG&
r);
1611 #ifdef GECODE_HAS_FLOAT_VARS 1657 #ifdef GECODE_HAS_FLOAT_VARS 1693 #ifdef GECODE_HAS_MPFR 1758 #ifdef GECODE_HAS_FLOAT_VARS 1763 std::ceil(f.
min())));
1765 std::floor(f.
max())));
1771 #ifdef GECODE_HAS_SET_VARS 1985 rel(home,x,r,y,ipl);
1992 rel(home,x,r,y,ipl);
2005 #ifdef GECODE_HAS_SET_VARS 2078 Slice& reverse(
void);
2080 operator ArgsType(
void);
2085 operator const ArgsType(
void)
const;
2170 int width(
void)
const;
2172 int height(
void)
const;
2174 ArgsType
const get_array(
void)
const;
2181 ValueType& operator ()(
int c,
int r);
2188 const ValueType& operator ()(
int c,
int r)
const;
2211 template<
class Char,
class Traits,
class A>
2212 std::basic_ostream<Char,Traits>&
2213 operator <<(std::basic_ostream<Char,Traits>& os,
const Matrix<A>& m);
2218 template<
class Char,
class Traits,
class A>
2219 std::basic_ostream<Char,Traits>&
2220 operator <<(std::basic_ostream<Char,Traits>& os,
const Slice<A>& s);
2254 #ifdef GECODE_HAS_SET_VARS 2344 virtual void constrain(
const Space& best);
2346 virtual IntVar cost(
void)
const = 0;
2361 virtual void constrain(
const Space& best);
2363 virtual IntVar cost(
void)
const = 0;
2378 virtual void constrain(
const Space& best);
2395 virtual void constrain(
const Space& best);
2400 #ifdef GECODE_HAS_FLOAT_VARS 2422 virtual void constrain(
const Space& best);
2424 virtual FloatVar cost(
void)
const = 0;
2447 virtual void constrain(
const Space& best);
2449 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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
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.
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 .
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.
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
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.
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.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
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.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
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) ...
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.