choco.cp.solver.constraints.integer.bool
Class Identity
java.lang.Object
choco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
choco.kernel.solver.constraints.integer.AbstractUnIntSConstraint
choco.cp.solver.constraints.integer.bool.Identity
- All Implemented Interfaces:
- IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener
public class Identity
- extends AbstractUnIntSConstraint
User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 18 mai 2010
Since : Choco 2.1.1
maintain v1 is true where v1 is a boolean variable, domain = {0,1}
Method Summary |
int |
getFilteredEventMask(int idx)
|
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error
to avoid bug using reified constraints in constraints
that have not been changed to fulfill this api yet ! |
AbstractSConstraint<IntDomainVar> |
opposite(Solver solver)
Get the opposite constraint |
void |
propagate()
Propagation:
Propagating the constraint until local consistency is reached. |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, pretty, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
activate, awake, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
getFilteredEventMask
public int getFilteredEventMask(int idx)
- Overrides:
getFilteredEventMask
in class Propagator
propagate
public void propagate()
throws ContradictionException
- Propagation:
Propagating the constraint until local consistency is reached.
- Specified by:
propagate
in class Propagator
- Throws:
ContradictionException
- contradiction exception
isSatisfied
public boolean isSatisfied(int[] tuple)
- Description copied from class:
AbstractIntSConstraint
- TEMPORARY: if not overriden by the constraint, throws an error
to avoid bug using reified constraints in constraints
that have not been changed to fulfill this api yet !
- Specified by:
isSatisfied
in interface IntPropagator
- Overrides:
isSatisfied
in class AbstractIntSConstraint
isEntailed
public Boolean isEntailed()
- Description copied from class:
AbstractSConstraint
- Indicates if the constraint is entailed, from now on will be always satisfied
- Overrides:
isEntailed
in class AbstractSConstraint<IntDomainVar>
- Returns:
- wether the constraint is entailed
opposite
public AbstractSConstraint<IntDomainVar> opposite(Solver solver)
- Get the opposite constraint
- Specified by:
opposite
in interface SConstraint<IntDomainVar>
- Overrides:
opposite
in class AbstractSConstraint<IntDomainVar>
- Parameters:
solver
- the current solver
- Returns:
- the opposite constraint @param solver
Copyright © 2012. All Rights Reserved.