52 static const int n = 26;
67 g(
le[ 6]), h(
le[ 7]), i(
le[ 8]), j(
le[ 9]), k(
le[10]),
72 rel(*
this,
b+
a+
l+
l+e+
t == 45, opt.ipl());
73 rel(*
this, c+e+
l+
l+o == 43, opt.ipl());
74 rel(*
this, c+o+
n+c+e+
r+
t == 74, opt.ipl());
75 rel(*
this, f+
l+
u+
t+e == 30, opt.ipl());
76 rel(*
this, f+
u+g+
u+e == 50, opt.ipl());
77 rel(*
this, g+
l+e+e == 66, opt.ipl());
78 rel(*
this, j+
a+
z+
z == 58, opt.ipl());
79 rel(*
this,
l+
y+
r+e == 47, opt.ipl());
80 rel(*
this, o+
b+o+e == 53, opt.ipl());
81 rel(*
this, o+
p+e+
r+
a == 65, opt.ipl());
82 rel(*
this,
p+o+
l+k+
a == 59, opt.ipl());
83 rel(*
this, q+
u+
a+
r+
t+e+
t == 50, opt.ipl());
84 rel(*
this, s+
a+
x+o+
p+h+o+
n+e == 134, opt.ipl());
85 rel(*
this, s+c+
a+
l+e == 51, 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());
90 rel(*
this, v+i+o+
l+i+
n == 100, opt.ipl());
91 rel(*
this, w+
a+
l+
t+
z == 34, opt.ipl());
95 switch (opt.branching()) {
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);
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
union Gecode::@603::NNF::@65 u
Union depending on nodetype t.
int p
Number of positive literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
IntVarArray le
Array for letters.
int main(int argc, char *argv[])
Main-function.
Alpha(const Options &opt)
Actual model.
virtual Space * copy(void)
Copy during cloning.
@ BRANCH_NONE
Choose variable left to right.
@ BRANCH_INVERSE
Choose variable right to left.
@ BRANCH_SIZE
Choose variable with smallest size.
Alpha(Alpha &s)
Constructor for cloning s.
static const int n
Alphabet has 26 letters.
virtual void print(std::ostream &os) const
Print solution.
Parametric base-class for scripts.
static void run(const Options &opt, Script *s=NULL)
ArrayTraits< VarArgArray< Var > >::ArgsType slice(int start, int inc=1, int n=-1)
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 parse(int argc, char *argv[])
Parse commandline arguments.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
Post propagator for for all .
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Post propagator for SetVar SetOpType SetVar y
IntValBranch INT_VAL_MIN(void)
Select smallest value.
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest domain size.
Post propagator for SetVar x