44 #ifndef __GECODE_MINIMODEL_HH__ 45 #define __GECODE_MINIMODEL_HH__ 49 #ifdef GECODE_HAS_SET_VARS 52 #ifdef GECODE_HAS_FLOAT_VARS 63 #if !defined(GECODE_STATIC_LIBS) && \ 64 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 66 #ifdef GECODE_BUILD_MINIMODEL 67 #define GECODE_MINIMODEL_EXPORT __declspec( dllexport ) 69 #define GECODE_MINIMODEL_EXPORT __declspec( dllimport ) 74 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 76 #define GECODE_MINIMODEL_EXPORT __attribute__ ((visibility("default"))) 80 #define GECODE_MINIMODEL_EXPORT 86 #ifndef GECODE_BUILD_MINIMODEL 87 #define GECODE_LIBRARY_NAME "MiniModel" 94 namespace MiniModel {}
103 #ifdef GECODE_HAS_SET_VARS 106 #ifdef GECODE_HAS_FLOAT_VARS 144 #ifdef GECODE_HAS_SET_VARS 147 #ifdef GECODE_HAS_FLOAT_VARS 688 #ifdef GECODE_HAS_FLOAT_VARS 1060 #ifdef GECODE_HAS_SET_VARS 1266 BoolExpr(
const BoolExpr& e);
1269 BoolExpr(
const BoolExpr&
l,
NodeType t,
const BoolExpr&
r);
1275 BoolExpr(
const BoolExpr& e,
NodeType t);
1279 #ifdef GECODE_HAS_FLOAT_VARS 1284 #ifdef GECODE_HAS_SET_VARS 1287 BoolExpr(
const SetRel& rs);
1294 explicit BoolExpr(
Misc* m);
1303 const BoolExpr& operator =(
const BoolExpr& e);
1356 #ifdef GECODE_HAS_FLOAT_VARS 1361 #ifdef GECODE_HAS_SET_VARS 1384 namespace MiniModel {
1403 std::string toString(
void)
const;
1420 const REG& operator =(
const REG&
r);
1425 REG& operator +=(
const REG&
r);
1429 REG& operator |=(
const REG&
r);
1435 REG operator ()(
unsigned int n,
unsigned int m);
1437 REG operator ()(
unsigned int n);
1439 template<
class Char,
class Traits>
1440 std::basic_ostream<Char,Traits>&
1441 print(std::basic_ostream<Char,Traits>& os)
const;
1451 template<
class Char,
class Traits>
1452 std::basic_ostream<Char,Traits>&
1453 operator <<(std::basic_ostream<Char,Traits>& os,
const REG&
r);
1482 #ifdef GECODE_HAS_FLOAT_VARS 1528 #ifdef GECODE_HAS_FLOAT_VARS 1564 #ifdef GECODE_HAS_MPFR 1629 #ifdef GECODE_HAS_FLOAT_VARS 1634 std::ceil(f.
min())));
1636 std::floor(f.
max())));
1642 #ifdef GECODE_HAS_SET_VARS 1856 rel(home,x,r,y,ipl);
1863 rel(home,x,r,y,ipl);
1876 #ifdef GECODE_HAS_SET_VARS 1949 Slice& reverse(
void);
1951 operator ArgsType(
void);
1956 operator const ArgsType(
void)
const;
2041 int width(
void)
const;
2043 int height(
void)
const;
2045 ArgsType
const get_array(
void)
const;
2052 ValueType& operator ()(
int c,
int r);
2059 const ValueType& operator ()(
int c,
int r)
const;
2082 template<
class Char,
class Traits,
class A>
2083 std::basic_ostream<Char,Traits>&
2084 operator <<(std::basic_ostream<Char,Traits>& os,
const Matrix<A>& m);
2089 template<
class Char,
class Traits,
class A>
2090 std::basic_ostream<Char,Traits>&
2091 operator <<(std::basic_ostream<Char,Traits>& os,
const Slice<A>& s);
2125 #ifdef GECODE_HAS_SET_VARS 2215 virtual void constrain(
const Space& best);
2217 virtual IntVar cost(
void)
const = 0;
2232 virtual void constrain(
const Space& best);
2234 virtual IntVar cost(
void)
const = 0;
2249 #ifdef GECODE_HAS_FLOAT_VARS 2271 virtual void constrain(
const Space& best);
2273 virtual FloatVar cost(
void)
const = 0;
2296 virtual void constrain(
const Space& best);
2298 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.
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.
IntMinimizeSpace MinimizeSpace
Class for minimizing integer cost.
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.
IntMaximizeSpace MaximizeSpace
Class for maximizing integer cost.
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)
struct Gecode::@554::NNF::@60::@62 a
For atomic nodes.
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.
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 .
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 ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z, IntPropLevel ipl)
Post propagator for if-then-else constraint.
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.
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.
Class for maximizing integer cost.
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 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 .
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 .
struct Gecode::@554::NNF::@60::@61 b
For binary nodes (and, or, eqv)
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 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.
bool neg
Is atomic formula negative.