51 void parse(
int& argc,
char* argv[]) {
52 Options::parse(argc,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);
126 opt.
parse(argc,argv);
int n
Number of negative literals for node type.
Parametric base-class for scripts.
static void run(const Options &opt, Script *s=NULL)
static IntArgs create(int n, int start, int inc=1)
Allocate array with n elements such that for all .
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 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 .
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel=IPL_DEF)
Post propagator that s precedes t in x.
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.