44 #ifndef __GECODE_MINIMODEL_HH__ 45 #define __GECODE_MINIMODEL_HH__ 49 #ifdef GECODE_HAS_SET_VARS 52 #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 {}
99 #ifdef GECODE_HAS_SET_VARS 102 #ifdef GECODE_HAS_FLOAT_VARS 140 #ifdef GECODE_HAS_SET_VARS 143 #ifdef GECODE_HAS_FLOAT_VARS 683 #ifdef GECODE_HAS_FLOAT_VARS 1067 #ifdef GECODE_HAS_SET_VARS 1259 static void*
operator new(
size_t size);
1261 static void operator delete(
void*
p,
size_t size);
1274 BoolExpr(
const BoolExpr& e);
1277 BoolExpr(
const BoolExpr&
l,
NodeType t,
const BoolExpr&
r);
1283 BoolExpr(
const BoolExpr& e,
NodeType t);
1287 #ifdef GECODE_HAS_FLOAT_VARS 1292 #ifdef GECODE_HAS_SET_VARS 1295 BoolExpr(
const SetRel& rs);
1311 const BoolExpr& operator =(
const BoolExpr& e);
1364 #ifdef GECODE_HAS_FLOAT_VARS 1369 #ifdef GECODE_HAS_SET_VARS 1392 namespace MiniModel {
1426 const REG& operator =(
const REG&
r);
1431 REG& operator +=(
const REG&
r);
1435 REG& operator |=(
const REG&
r);
1441 REG operator ()(
unsigned int n,
unsigned int m);
1443 REG operator ()(
unsigned int n);
1445 template<
class Char,
class Traits>
1446 std::basic_ostream<Char,Traits>&
1447 print(std::basic_ostream<Char,Traits>& os)
const;
1457 template<
class Char,
class Traits>
1458 std::basic_ostream<Char,Traits>&
1459 operator <<(std::basic_ostream<Char,Traits>& os,
const REG&
r);
1483 #ifdef GECODE_HAS_FLOAT_VARS 1529 #ifdef GECODE_HAS_FLOAT_VARS 1565 #ifdef GECODE_HAS_MPFR 1630 #ifdef GECODE_HAS_FLOAT_VARS 1635 std::ceil(f.
min())));
1637 std::floor(f.
max())));
1643 #ifdef GECODE_HAS_SET_VARS 1857 rel(home,x,r,y,icl);
1864 rel(home,x,r,y,icl);
1877 #ifdef GECODE_HAS_SET_VARS 1950 Slice& reverse(
void);
1952 operator ArgsType(
void);
1957 operator const ArgsType(
void)
const;
2042 int width(
void)
const;
2044 int height(
void)
const;
2046 ArgsType
const get_array(
void)
const;
2053 ValueType& operator ()(
int c,
int r);
2060 const ValueType& operator ()(
int c,
int r)
const;
2071 Slice<A> slice(
int fc,
int tc,
int fr,
int tr)
const;
2083 template<
class Char,
class Traits,
class A>
2084 std::basic_ostream<Char,Traits>&
2085 operator <<(std::basic_ostream<Char,Traits>& os,
const Matrix<A>& m);
2090 template<
class Char,
class Traits,
class A>
2091 std::basic_ostream<Char,Traits>&
2092 operator <<(std::basic_ostream<Char,Traits>& os,
const Slice<A>& s);
2126 #ifdef GECODE_HAS_SET_VARS 2216 virtual void constrain(
const Space& best);
2218 virtual IntVar cost(
void)
const = 0;
2233 virtual void constrain(
const Space& best);
2235 virtual IntVar cost(
void)
const = 0;
2250 #ifdef GECODE_HAS_FLOAT_VARS 2272 virtual void constrain(
const Space& best);
2274 virtual FloatVar cost(
void)
const = 0;
2297 virtual void constrain(
const Space& best);
2299 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.
Miscealloneous Boolean expressions.
IntConLevel
Consistency levels for integer propagators.
virtual ~NonLinFloatExpr(void)
Destructor.
SetExpr operator&(const SetExpr &l, const SetExpr &r)
Intersection of set expressions.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
const int min
Smallest allowed integer in integer set.
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.
FloatVal operator/(const FloatVal &x, const FloatVal &y)
void rfree(void *p)
Free memory block starting at p.
int size(void) const
Return size of array (number of elements)
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 pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
void atmost(Home home, const IntVarArgs &x, int n, int m, IntConLevel icl=ICL_DEF)
Post constraint .
BoolExpr operator&&(const BoolExpr &l, const BoolExpr &r)
Conjunction of Boolean expressions.
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.
IntMinimizeSpace MinimizeSpace
Class for minimizing integer cost.
Linear term with integer variable.
Class for maximizing float cost.
const int max
Largest allowed integer value.
FloatNum max(void) const
Return maximum of domain.
void atleast(Home home, const IntVarArgs &x, int n, int m, IntConLevel icl=ICL_DEF)
Post constraint .
const int min
Smallest allowed integer value.
BoolExpr operator^(const BoolExpr &l, const BoolExpr &r)
Exclusive-or of Boolean expressions.
ArrayTraits< A >::ValueType ValueType
The type of elements of this array.
Nodes for linear expressions.
Heap heap
The single global heap.
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.
IntMaximizeSpace MaximizeSpace
Class for maximizing integer cost.
Gecode::FloatVal c(-8, 8)
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.
int n
Number of negative literals for node type.
Base class for non-linear float expressions.
A reference-counted pointer to a SymmetryObject.
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.
int lubMax(void) const
Return maximum element of least upper bound.
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatRelType
Relation types for floats.
bool operator!=(const FloatVal &x, const FloatVal &y)
void lex(Home home, const IntVarArgs &x, IntRelType r, const IntVarArgs &y, IntConLevel icl=ICL_DEF)
Post lexical order between x and y.
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 .
struct Gecode::@519::NNF::@60::@62 a
For atomic nodes.
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.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntConLevel)
Post domain consistent propagator for .
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.
unsigned int size(void) const
Return size (cardinality) of set.
Passing integer variables.
void ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z, IntConLevel icl)
Post propagator for if-then-else constraint.
Passing integer arguments.
NodeType
Type of linear expression.
Passing Boolean variables.
void exactly(Home home, const IntVarArgs &x, int n, int m, IntConLevel icl=ICL_DEF)
Post constraint .
static const IntSet empty
Empty set.
SymmetryHandle columns_reflect(const Matrix< A > &m)
Reflect columns symmetry specification.
Boolean integer variables.
LinIntExpr cardinality(const SetExpr &e)
Cardinality of set expression.
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 .
void print(std::basic_ostream< Char, Traits > &s, bool assigned, IL &lb, IU &ub, unsigned int cardMin, unsigned int cardMax)
Print set view.
void values(Home home, const IntVarArgs &x, IntSet y, IntConLevel icl=ICL_DEF)
Post constraint .
struct Gecode::@519::NNF::@60::@61 b
For binary nodes (and, or, eqv)
Class for maximizing integer cost.
BoolVar expr(Home home, const BoolExpr &e, IntConLevel icl)
Post Boolean expression and return its value.
NodeType
Type of Boolean expression.
FloatVal operator*(const FloatVal &x, const FloatVal &y)
Node * x
Pointer to corresponding Boolean expression node.
SymmetryHandle diagonal_reflect(const Matrix< A > &m)
Reflect around main diagonal symmetry specification.
Sum of integer variables.
Linear expressions over integer variables.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntConLevel)
Post propagator for .
void tan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
FloatNum min(void) const
Return minimum of domain.
bool operator>=(const FloatVal &x, const FloatVal &y)
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
The default consistency for a constraint.
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.
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
double FloatNum
Floating point number base type.
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntConLevel)
Post propagator for .
FloatNum step
Step by which a next solution has to have lower cost.
void atan(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
BoolExpr operator||(const BoolExpr &l, const BoolExpr &r)
Disjunction of Boolean expressions.
SymmetryHandle rows_reflect(const Matrix< A > &m)
Reflect rows symmetry specification.
bool neg
Is atomic formula negative.