34 #ifndef __GECODE_FLATZINC_VARSPEC__HH__ 35 #define __GECODE_FLATZINC_VARSPEC__HH__ 42 namespace Gecode {
namespace FlatZinc {
68 : introduced(introduced0), funcDep(funcDep0) {}
76 bool introduced,
bool funcDep)
88 alias =
true;
i = eq.
v;
101 :
VarSpec(introduced,funcDep) {
102 alias =
false;
assigned =
false; domain =
d;
105 :
VarSpec(introduced,funcDep) {
109 :
VarSpec(introduced,funcDep) {
110 alias =
true;
i = eq.
v;
113 if (!alias && !
assigned && domain())
114 delete domain.
some();
123 bool introduced,
bool funcDep)
124 :
VarSpec(introduced,funcDep), domain(
d) {
128 :
VarSpec(introduced,funcDep) {
133 :
VarSpec(introduced,funcDep) {
134 alias =
true;
i = eq.
v;
147 :
VarSpec(introduced,funcDep) {
148 alias =
false;
assigned =
false; upperBound =
v;
151 :
VarSpec(introduced,funcDep) {
156 :
VarSpec(introduced,funcDep) {
157 alias =
true;
i = eq.
v;
160 if (!alias && upperBound())
161 delete upperBound.
some();
Option< AST::SetLit *> domain
IntVarSpec(int i0, bool introduced, bool funcDep)
Specification for set variables.
FloatVarSpec(Option< std::pair< double, double > > &d, bool introduced, bool funcDep)
virtual ~VarSpec(void)
Destructor.
BoolVarSpec(const Alias &eq, bool introduced, bool funcDep)
FloatVarSpec(double d, bool introduced, bool funcDep)
bool alias
Whether the variable aliases another variable.
SetVarSpec(const Option< AST::SetLit * > &v, bool introduced, bool funcDep)
Option< std::pair< double, double > > domain
SetVarSpec(AST::SetLit *v, bool introduced, bool funcDep)
Gecode::IntArgs i({1, 2, 3, 4})
SetVarSpec(const Alias &eq, bool introduced, bool funcDep)
Specification for Boolean variables.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
VarSpec(bool introduced0, bool funcDep0)
Constructor.
SetVarSpec(bool introduced, bool funcDep)
BoolVarSpec(Option< AST::SetLit * > &d, bool introduced, bool funcDep)
bool funcDep
Whether the variable functionally depends on another variable.
static Option< Val > none(void)
Option< AST::SetLit *> domain
bool assigned
Whether the variable is assigned.
bool assigned(View x, int v)
Whether x is assigned to value v.
IntVarSpec(const Option< AST::SetLit * > &d, bool introduced, bool funcDep)
Specification for floating point variables.
Base class for variable specifications.
IntVarSpec(const Alias &eq, bool introduced, bool funcDep)
Alias for a variable specification
FloatVarSpec(const Alias &eq, bool introduced, bool funcDep)
Gecode toplevel namespace
Specification for integer variables.
bool introduced
Whether the variable was introduced in the mzn2fzn translation.
const Val & some(void) const
BoolVarSpec(bool b, bool introduced, bool funcDep)
Option< AST::SetLit * > upperBound