123 {(
n+1)*(
n+1),
n+1, 1, -(
n+1)*(
n+1), -(
n+1), -1},
124 {x1, x2, x3, y1, y2, y3},
135 os <<
"\t[" << i <<
"] = " <<
triples[i] << std::endl;
161 opt.
parse(argc,argv);
Parametric base-class for scripts.
static void run(const Options &opt, Script *s=NULL)
static const IntSet empty
Empty set.
Options for scripts with additional size parameter
void update(Space &home, VarArray< Var > &a)
Update array to be a clone of array a.
int main(int argc, char *argv[])
Main-function.
virtual void print(std::ostream &os) const
Print solution.
Steiner(const SizeOptions &opt)
Actual model.
virtual Space * copy(void)
Copy during cloning.
Steiner(Steiner &s)
Constructor for copying s.
int n
Order of the Steiner problem.
SetVarArray triples
The steiner triples.
@ MODEL_MATCHING
Use matching constraints.
@ MODEL_SEQ
Use sequence constraints.
@ MODEL_NONE
Use simple relation constraint.
int noOfTriples
Number of Steiner triples.
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 linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Gecode toplevel namespace
Select first unassigned variable SetVarBranch SET_VAR_NONE(void)
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void channelSorted(Home home, const IntVarArgs &x, SetVar y)
void atmostOne(Home home, const SetVarArgs &xa, unsigned int c)
IntVar expr(Home home, const LinIntExpr &e, const IntPropLevels &ipls=IntPropLevels::def)
Post linear expression and return its value.
Post propagator for SetVar SetOpType SetVar y
SetExpr singleton(const LinIntExpr &)
Singleton expression.
Include smallest element SetValBranch SET_VAL_MIN_INC(void)
Post propagator for SetVar x