public class PropJoinFunction extends solver.constraints.Propagator<solver.variables.Variable>
Join a unary set relation with a binary function. This propagator is a
specialized version of PropJoinRelation
. The take
variable is
the unary relation and the ref
variables are the function. The
to
variable is the result of the join.
Here is how the binary function is encoded. Consider the function:
(0, 1), (1, 3), (2, 1)
. This is encoded as 3 different ref
variables: ref0={1}, ref1={3}, ref2={1}
.
Constructor and Description |
---|
PropJoinFunction(solver.variables.SetVar take,
solver.variables.IntVar[] refs,
solver.variables.SetVar to) |
Modifier and Type | Method and Description |
---|---|
boolean |
advise(int idxVarInProp,
int mask) |
int |
getPropagationConditions(int vIdx) |
util.ESat |
isEntailed() |
void |
propagate(int evtmask) |
void |
propagate(int idxVarInProp,
int mask) |
String |
toString() |
addVariable, arity, clearMask, compareTo, contradiction, decNbPendingEvt, defineIn, dynPriority, explain, flushPendingEvt, forcePropagate, getConstraint, getId, getMask, getNbPendingEvt, getNbVars, getPriority, getSolver, getVar, getVars, getVIndices, hashCode, incNbPendingEvt, isActive, isCompletelyInstantiated, isPassive, isReifiedAndSilent, isStateLess, setActive, setPassive, setReifiedSilent, setReifiedTrue, setVIndices, updateMask
public PropJoinFunction(solver.variables.SetVar take, solver.variables.IntVar[] refs, solver.variables.SetVar to)
public boolean advise(int idxVarInProp, int mask)
advise
in class solver.constraints.Propagator<solver.variables.Variable>
public int getPropagationConditions(int vIdx)
getPropagationConditions
in class solver.constraints.Propagator<solver.variables.Variable>
public void propagate(int evtmask) throws solver.exception.ContradictionException
propagate
in class solver.constraints.Propagator<solver.variables.Variable>
solver.exception.ContradictionException
public void propagate(int idxVarInProp, int mask) throws solver.exception.ContradictionException
propagate
in class solver.constraints.Propagator<solver.variables.Variable>
solver.exception.ContradictionException
public util.ESat isEntailed()
isEntailed
in class solver.constraints.Propagator<solver.variables.Variable>
Copyright © 2013. All Rights Reserved.