56 static const int n = 26;
69 a(le[ 0]),
b(le[ 1]),
c(le[ 2]), e(le[ 4]), f(le[ 5]),
70 g(le[ 6]), h(le[ 7]),
i(le[ 8]), j(le[ 9]), k(le[10]),
71 l(le[11]), m(le[12]),
n(le[13]), o(le[14]),
p(le[15]),
72 q(le[16]),
r(le[17]), s(le[18]),
t(le[19]),
u(le[20]),
73 v(le[21]), w(le[22]),
x(le[23]), y(le[24]), z(le[25]);
79 rel(*
this, f+
u+g+
u+e == 50, opt.
icl());
80 rel(*
this, g+
l+e+e == 66, opt.
icl());
81 rel(*
this, j+
a+z+z == 58, opt.
icl());
82 rel(*
this,
l+y+
r+e == 47, opt.
icl());
83 rel(*
this, o+
b+o+e == 53, opt.
icl());
87 rel(*
this, s+
a+
x+o+
p+h+o+n+e == 134, opt.
icl());
89 rel(*
this, s+o+
l+o == 37, opt.
icl());
90 rel(*
this, s+o+n+g == 61, opt.
icl());
91 rel(*
this, s+o+
p+
r+
a+n+o == 82, opt.
icl());
92 rel(*
this,
t+h+e+m+e == 72, opt.
icl());
118 return new Alpha(share,*
this);
124 for (
int i = 0;
i <
n;
i++) {
125 os << ((char) (
i+
'a')) <<
'=' << le[
i] << ((
i<n-1)?
", ":
"\n");
127 os << std::endl <<
"\t";
145 opt.
parse(argc,argv);
146 Script::run<Alpha,DFS,Options>(
opt);
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
Choose variable right to left.
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
IntVarArray le
Array for letters.
Parametric base-class for scripts.
void iterations(unsigned int i)
Set default number of iterations.
void update(Space &, bool share, VarArray< Var > &a)
Update array to be a clone of array a.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Choose variable left to right.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
Choose variable with smallest size.
void branching(int v)
Set default branching value.
ArrayTraits< VarArgArray< Var > >::ArgsType slice(int start, int inc=1, int n=-1)
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
Alpha(bool share, Alpha &s)
Constructor for cloning s.
Node * x
Pointer to corresponding Boolean expression node.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
void distinct(Home home, const IntVarArgs &x, IntConLevel icl)
Post propagator for for all .
void solutions(unsigned int n)
Set default number of solutions to search for.
virtual Space * copy(bool share)
Copy during cloning.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
BrancherHandle branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
int size(void) const
Return size of array (number of elements)
virtual void print(std::ostream &os) const
Print solution.
void icl(IntConLevel i)
Set default integer consistency level.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
Alpha(const Options &opt)
Actual model.
int main(int argc, char *argv[])
Main-function.