51 void parse(
int& argc,
char* argv[]) {
61 std::cerr <<
"\t(unsigned int) default: " <<
c << std::endl
62 <<
"\t\tparameter c (number of boxes)" << std::endl
63 <<
"\t(unsigned int) default: " <<
n << std::endl
64 <<
"\t\tparameter n (number of balls)" << std::endl;
94 for (
int i=1;
i<=
n;
i++)
95 for (
int j=1;
i+j<=
n; j++)
106 os <<
"\t" <<
box << std::endl;
116 return new Schur(*
this);
127 Script::run<Schur,DFS,SchurOptions>(
opt);
int n
Number of negative literals for node type.
Parametric base-class for scripts.
void update(Space &home, VarArray< Var > &a)
Update array to be a clone of array a.
Options for Schur's Lemma
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
virtual void help(void)
Print help message.
int n
Parameters to be given on command line Initialize options for example with name s.
SchurOptions(const char *s, int c0, int n0)
int main(int argc, char *argv[])
Main-function.
virtual void print(std::ostream &os) const
Print solution.
virtual Space * copy(void)
Copy during cloning.
IntVarArray box
Array of box per ball.
Schur(const SchurOptions &opt)
Actual model.
Schur(Schur &s)
Constructor for cloning s.
void parse(int argc, char *argv[])
Parse commandline arguments.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel=IPL_DEF)
Post propagator that s precedes t in x.
GECODE_FLATZINC_EXPORT FlatZincSpace * parse(const std::string &fileName, Printer &p, std::ostream &err=std::cerr, FlatZincSpace *fzs=NULL, Rnd &rnd=defrnd)
Parse FlatZinc file fileName into fzs and return it.
void branch(Home home, const IntVarArgs &x, const BoolVarArgs &y, IntBoolVarBranch vars, IntValBranch vals)
Branch function for integer and Boolean variables.
Gecode toplevel namespace
IntVarBranch INT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
Gecode::FloatVal c(-8, 8)
Gecode::IntArgs i({1, 2, 3, 4})