Generated on Sun Feb 17 15:24:48 2019 for Gecode by doxygen 1.6.3

Unsharing variables
[Using integer variables and constraints]

Functions

void Gecode::unshare (Home home, IntVarArgs &x, IntPropLevel ipl=IPL_DEF)
 Replace multiple variable occurences in x by fresh variables.
void Gecode::unshare (Home home, BoolVarArgs &x, IntPropLevel ipl=IPL_DEF)
 Replace multiple variable occurences in x by fresh variables.

Detailed Description

Unsharing replaces multiple occurences of the same variable by fresh yet equal (enforced through propagators for equality) variables: after unsharing a variable appears at most once. Note that this is only done for not yet assigned variables (as all propagators can handle multiple occurences of the same variable provided it is already assigned).

Unsharing is useful for constraints that only accept variable arrays without multiple occurences of the same variable, for example extensional.


Function Documentation

void Gecode::unshare ( Home  home,
IntVarArgs &  x,
IntPropLevel  ipl = IPL_DEF 
)

Replace multiple variable occurences in x by fresh variables.

Supports domain consistency (ipl = IPL_DOM, default) and bounds consistency (ipl = IPL_BND).

void Gecode::unshare ( Home  home,
BoolVarArgs &  x,
IntPropLevel   
)

Replace multiple variable occurences in x by fresh variables.