52 static const int n = 26;
64 :
Script(opt), le(*this,n,1,n) {
66 a(le[ 0]),
b(le[ 1]),
c(le[ 2]), e(le[ 4]),
f(le[ 5]),
67 g(le[ 6]), h(le[ 7]),
i(le[ 8]), j(le[ 9]), k(le[10]),
68 l(le[11]), m(le[12]),
n(le[13]), o(le[14]),
p(le[15]),
69 q(le[16]),
r(le[17]), s(le[18]),
t(le[19]),
u(le[20]),
70 v(le[21]), w(le[22]),
x(le[23]),
y(le[24]),
z(le[25]);
77 rel(*
this, g+
l+e+e == 66, opt.
ipl());
78 rel(*
this, j+
a+z+z == 58, opt.
ipl());
80 rel(*
this, o+
b+o+e == 53, opt.
ipl());
84 rel(*
this, s+
a+
x+o+
p+h+o+n+e == 134, opt.
ipl());
86 rel(*
this, s+o+
l+o == 37, opt.
ipl());
87 rel(*
this, s+o+n+g == 61, opt.
ipl());
88 rel(*
this, s+o+
p+
r+
a+n+o == 82, opt.
ipl());
89 rel(*
this,
t+h+e+m+e == 72, opt.
ipl());
115 return new Alpha(*
this);
121 for (
int i = 0;
i <
n;
i++) {
122 os << ((char) (
i+
'a')) <<
'=' << le[
i] << ((
i<n-1)?
", ":
"\n");
124 os << std::endl <<
"\t";
142 opt.
parse(argc,argv);
143 Script::run<Alpha,DFS,Options>(
opt);
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
Alpha(Alpha &s)
Constructor for cloning s.
void 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)
void update(Space &home, VarArray< Var > &a)
Update array to be a clone of array a.
void ipl(IntPropLevel i)
Set default integer propagation level.
IntVarArray le
Array for letters.
Parametric base-class for scripts.
void iterations(unsigned int i)
Set default number of iterations.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
Choose variable with smallest size.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
virtual void print(std::ostream &os) const
Print solution.
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl)
Post propagator for for all .
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
void branching(int v)
Set default branching value.
ArrayTraits< VarArgArray< Var > >::ArgsType slice(int start, int inc=1, int n=-1)
virtual Space * copy(void)
Copy during cloning.
union Gecode::@593::NNF::@62 u
Union depending on nodetype t.
Choose variable left to right.
Post propagator for SetVar SetOpType SetVar SetRelType r
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
Post propagator for SetVar SetOpType SetVar y
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
void solutions(unsigned int n)
Set default number of solutions to search for.
Post propagator for SetVar x
Gecode toplevel namespace
Choose variable right to left.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
Alpha(const Options &opt)
Actual model.
int main(int argc, char *argv[])
Main-function.