int-post.cc File Reference
(Revision: 7288)
#include <cfloat>
#include <algorithm>
#include "gecode/int/rel.hh"
#include "gecode/int/linear.hh"
Go to the source code of this file.
Namespaces | |
namespace | Gecode |
namespace | Gecode::Int |
namespace | Gecode::Int::Linear |
Defines | |
#define | GECODE_INT_PL_BIN(CLASS) |
Macro for posting binary special cases for linear constraints. | |
#define | GECODE_INT_PL_TER(CLASS) |
Macro for posting ternary special cases for linear constraints. | |
Functions | |
void | Gecode::Int::Linear::eliminate (Term< IntView > *t, int &n, double &d) |
Eliminate assigned views. | |
void | Gecode::Int::Linear::rewrite (IntRelType &r, double &d, Term< IntView > *&t_p, int &n_p, Term< IntView > *&t_n, int &n_n) |
Rewrite all inequations in terms of IRT_LQ. | |
bool | Gecode::Int::Linear::precision (Term< IntView > *t_p, int n_p, Term< IntView > *t_n, int n_n, double d) |
Decide the required precision and check for overflow. | |
template<class Val, class View> | |
void | Gecode::Int::Linear::post_nary (Space *home, ViewArray< View > &x, ViewArray< View > &y, IntRelType r, Val c) |
Posting n-ary propagators. | |
void | Gecode::Int::Linear::post (Space *home, Term< IntView > *t, int n, IntRelType r, int c, IntConLevel=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for linear constraint over integers. | |
template<class Val, class View> | |
void | Gecode::Int::Linear::post_nary (Space *home, ViewArray< View > &x, ViewArray< View > &y, IntRelType r, Val c, BoolView b) |
Posting reified n-ary propagators. | |
void | Gecode::Int::Linear::post (Space *home, Term< IntView > *t, int n, IntRelType r, int c, BoolView b, IntConLevel=ICL_DEF, PropKind pk=PK_DEF) |
Post reified propagator for linear constraint. | |
Variables | |
const double | Gecode::Int::Linear::double_max = 9007199254740991.0 |
Largest double that can exactly be represented. | |
const double | Gecode::Int::Linear::double_min = -9007199254740991.0 |
Smallest double that can exactly be represented. |
Define Documentation
#define GECODE_INT_PL_BIN | ( | CLASS | ) |
Value:
switch (n_p) { \ case 2: \ GECODE_ES_FAIL(home,(CLASS<int,IntView,IntView>::post \ (home,t_p[0].x,t_p[1].x,c))); \ break; \ case 1: \ GECODE_ES_FAIL(home,(CLASS<int,IntView,MinusView>::post \ (home,t_p[0].x,t_n[0].x,c))); \ break; \ case 0: \ GECODE_ES_FAIL(home,(CLASS<int,MinusView,MinusView>::post \ (home,t_n[0].x,t_n[1].x,c))); \ break; \ default: GECODE_NEVER; \ }
Definition at line 155 of file int-post.cc.
#define GECODE_INT_PL_TER | ( | CLASS | ) |
Value:
switch (n_p) { \ case 3: \ GECODE_ES_FAIL(home,(CLASS<int,IntView,IntView,IntView>::post \ (home,t_p[0].x,t_p[1].x,t_p[2].x,c))); \ break; \ case 2: \ GECODE_ES_FAIL(home,(CLASS<int,IntView,IntView,MinusView>::post \ (home,t_p[0].x,t_p[1].x,t_n[0].x,c))); \ break; \ case 1: \ GECODE_ES_FAIL(home,(CLASS<int,IntView,MinusView,MinusView>::post \ (home,t_p[0].x,t_n[0].x,t_n[1].x,c))); \ break; \ case 0: \ GECODE_ES_FAIL(home,(CLASS<int,MinusView,MinusView,MinusView>::post \ (home,t_n[0].x,t_n[1].x,t_n[2].x,c))); \ break; \ default: GECODE_NEVER; \ }
Definition at line 173 of file int-post.cc.