choco.cp.solver.constraints.integer
Class MemberEnum
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.MemberEnum
- All Implemented Interfaces:
- IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener
public final class MemberEnum
- extends AbstractUnIntSConstraint
User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 22 f�vr. 2010
Since : Choco 2.1.1
Method Summary |
Boolean |
isEntailed()
Indicates if the constraint is entailed, from now on will be always satisfied |
boolean |
isSatisfied()
Default implementation of the isSatisfied by
delegating to the isSatisfied(int[] tuple) |
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 |
String |
pretty()
pretty printing of the object. |
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, setConstraintIndex, setExtension, setVar, toString |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
activate, awake, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
MemberEnum
public MemberEnum(IntDomainVar v0,
int[] values)
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
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
pretty
public String pretty()
- Description copied from interface:
IPretty
- pretty printing of the object. This String is not constant and may depend on the context.
- Specified by:
pretty
in interface IPretty
- Overrides:
pretty
in class AbstractSConstraint<IntDomainVar>
- Returns:
- a readable string representation of the object
isSatisfied
public 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 !
- Specified by:
isSatisfied
in interface IntPropagator
- Overrides:
isSatisfied
in class AbstractIntSConstraint
- Parameters:
tuple
-
- Returns:
isSatisfied
public boolean isSatisfied()
- Default implementation of the isSatisfied by
delegating to the isSatisfied(int[] tuple)
- Specified by:
isSatisfied
in interface SConstraint<IntDomainVar>
- Overrides:
isSatisfied
in class AbstractIntSConstraint
- Returns:
isEntailed
public Boolean isEntailed()
- 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
Copyright © 2012. All Rights Reserved.