71 (opt.size() < 31) ? (1 << (opt.size()-1))-1 : Int::Limits::
max) {
81 const int n_d = (
n*
n-
n)/2;
87 for (
int k=0, i=0; i<
n-1; i++)
88 for (
int j=i+1; j<
n; j++, k++)
110 os <<
"\tm[" <<
m.
size() <<
"] = " <<
m << std::endl;
134 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)
Passing integer variables.
Options for scripts with additional size parameter
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.
Example: Finding optimal Golomb rulers
int main(int argc, char *argv[])
Main-function.
virtual Space * copy(void)
Copy during cloning.
virtual void print(std::ostream &os) const
Print solution.
IntVarArray m
Array for ruler marks.
GolombRuler(const SizeOptions &opt)
Actual model.
GolombRuler(GolombRuler &s)
Constructor for cloning s.
virtual IntVar cost(void) const
Return cost.
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 .
@ IRT_GQ
Greater or equal ( )
@ IPL_BND
Bounds propagation.
Gecode toplevel namespace
IntVar expr(Home home, const LinIntExpr &e, const IntPropLevels &ipls=IntPropLevels::def)
Post linear expression and return its value.
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.
IntValBranch INT_VAL_MIN(void)
Select smallest value.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .