choco.cp.solver.constraints.strong
Class Adapter
java.lang.Object
choco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.cp.solver.constraints.strong.Adapter
- All Implemented Interfaces:
- ISpecializedConstraint, IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener
public class Adapter
- extends AbstractIntSConstraint
- implements ISpecializedConstraint
Method Summary |
boolean |
check(int[] tuple)
|
Object |
clone()
Clone the constraint |
int |
firstSupport(int position,
int value)
|
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
boolean |
isSatisfied()
Default implementation of the isSatisfied by
delegating to the isSatisfied(int[] tuple) |
int |
nextSupport(int position,
int value,
int lastSupport)
|
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation:
Propagating the constraint until local consistency is reached. |
String |
toString()
|
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
addExtension, addListener, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
activate, awake, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Adapter
public Adapter(AbstractIntSConstraint sConstraint)
firstSupport
public int firstSupport(int position,
int value)
- Specified by:
firstSupport
in interface ISpecializedConstraint
nextSupport
public int nextSupport(int position,
int value,
int lastSupport)
- Specified by:
nextSupport
in interface ISpecializedConstraint
toString
public String toString()
- Overrides:
toString
in class AbstractSConstraint<IntDomainVar>
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()
- Description copied from class:
AbstractIntSConstraint
- 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:
- true if the constraint is satisfied
clone
public Object clone()
throws CloneNotSupportedException
- Description copied from class:
AbstractSConstraint
- Clone the constraint
- Overrides:
clone
in class AbstractSConstraint<IntDomainVar>
- Returns:
- the clone of the constraint
- Throws:
CloneNotSupportedException
- Clone not supported exception
check
public boolean check(int[] tuple)
- Specified by:
check
in interface ISpecializedConstraint
isConsistent
public boolean isConsistent()
- Description copied from class:
AbstractIntSConstraint
- tests if the constraint is consistent with respect to the current state of domains
- Overrides:
isConsistent
in class AbstractIntSConstraint
- Returns:
- true if the constraint is entailed (default approximate definition)
propagate
public void propagate()
throws ContradictionException
- Description copied from class:
Propagator
- Propagation:
Propagating the constraint until local consistency is reached.
- Specified by:
propagate
in class Propagator
- Throws:
ContradictionException
- contradiction exception
Copyright © 2012. All Rights Reserved.