Go to the documentation of this file.
67 triples(*this, noOfTriples,
IntSet::empty, 1,
n, 3U, 3U) {
69 for (
int i=0;
i<noOfTriples;
i++) {
70 for (
int j=
i+1; j<noOfTriples; j++) {
84 if (
opt.model() == MODEL_NONE) {
95 }
else if (
opt.model() == MODEL_MATCHING) {
102 }
else if (
opt.model() == MODEL_SEQ) {
123 {(
n+1)*(
n+1),
n+1, 1, -(
n+1)*(
n+1), -(
n+1), -1},
124 {x1, x2, x3, y1, y2, y3},
134 for (
int i=0;
i<noOfTriples;
i++) {
135 os <<
"\t[" <<
i <<
"] = " << triples[
i] << std::endl;
162 Script::run<Steiner,DFS,SizeOptions>(
opt);
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
Steiner(const SizeOptions &opt)
Actual model.
Use simple relation constraint.
virtual void print(std::ostream &os) const
Print solution.
unsigned int size(I &i)
Size of all ranges of range iterator i.
static const IntSet empty
Empty set.
void channelSorted(Home home, const IntVarArgs &x, SetVar y)
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
void iterations(unsigned int i)
Set default number of iterations.
SetVarBranch SET_VAR_NONE(void)
Use matching constraints.
SetExpr singleton(const LinIntExpr &e)
Singleton expression.
Steiner(Steiner &s)
Constructor for copying s.
Gecode toplevel namespace
void atmostOne(Home home, const SetVarArgs &xa, unsigned int c)
BoolVar expr(Home home, const BoolExpr &e, const IntPropLevels &ipls)
Post Boolean expression and return its value.
Parametric base-class for scripts.
int n
Order of the Steiner problem.
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
SetValBranch SET_VAL_MIN_INC(void)
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
virtual Space * copy(void)
Copy during cloning.
Use sequence constraints.
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel)
Post propagator for .
int noOfTriples
Number of Steiner triples.
void model(int v)
Set default model value.
int n
Number of negative literals for node type.
SetVarArray triples
The steiner triples.
Gecode::IntArgs i({1, 2, 3, 4})
void update(Space &home, VarArray< Var > &a)
Update array to be a clone of array a.
Options for scripts with additional size parameter
int main(int argc, char *argv[])
Main-function.