[gecode-users] Documentation question
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Tue Jun 30 11:51:48 CEST 2009
You are quite right that the functions do not exist, this should be
fixed in the documentation.
To get the same effect, you could use a decomposition with a temporary
set variable:
{
SetVar tmp(*this, glb, lub);
rel(*this,SOT_UNION,supliers,SRT_SUB,tmp);
rel(*this, tmp, SRT_SUB, nT);
}
for some appropriate glb and lub.
Cheers,
Mikael
2009/6/30 Gustavo Gutiérrez <gutierrez.gustavo at uclouvain.be>:
> Hello,
> In the document "Modeling with Gecode", section 5.2.3 "Set operations" you
> say that:
> rel(home, SOT_UNION, x, SRT_SUP, y);
> Enforces a union relation of all the elements of x (an array of set
> variables) to be a subset of set variable y. When I tried to use this
> constraint I got an error from the compiler saying that such a function does
> not exist:
> error: no matching function for call to 'rel(GdPIPSolver&,
> Gecode::SetOpType, Gecode::SetVarArray&, Gecode::SetRelType,
> Gecode::SetVar&)'
> The line in my code producing the error is:
> rel(*this,SOT_UNION,supliers,SRT_SUB,nT);
> being suppliers the array of set variables and nT a set variable.
> When I open the documentation (the part linked from the first paragraph of
> the section 5.2.3) I notice that the only methods that take a SetOpType as a
> second parameter are:
> void Gecode::rel (Space &home, SetOpType op, const SetVarArgs &x, SetVar y)
> Post propagator for $ y = \diamond_{\mathit{op}} x$.
> void Gecode::rel (Space &home, SetOpType op, const SetVarArgs &x, const
> IntSet &z, SetVar y)
> Post propagator for $ y = \diamond_{\mathit{op}} x \diamond_{\mathit{op}}
> z$.
> Which of course do not match with the documented function. Am I missing
> something?, probably I am looking at the wrong place an is an stupid
> mistake.
>
> Regards,
> Gustavo
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
>
--
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
More information about the gecode-users
mailing list