choco.cp.solver.constraints.reified
Class IfThenElse

java.lang.Object
  extended by choco.kernel.solver.propagation.Propagator
      extended by choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
          extended by choco.kernel.solver.constraints.integer.AbstractIntSConstraint
              extended by choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
                  extended by choco.cp.solver.constraints.reified.ReifiedIntSConstraint
                      extended by choco.cp.solver.constraints.reified.IfThenElse
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener

public final class IfThenElse
extends ReifiedIntSConstraint

A constraint to state : if (bool = 1) cons else othercons


Field Summary
 
Fields inherited from class choco.cp.solver.constraints.reified.ReifiedIntSConstraint
scopeCons, scopeOCons
 
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint
cIndices, constraintType, extensions, vars
 
Fields inherited from class choco.kernel.solver.propagation.Propagator
active, constAwakeEvent, priority, propagationEngine
 
Fields inherited from interface choco.kernel.solver.constraints.SConstraint
LOGGER
 
Constructor Summary
IfThenElse(IntDomainVar bool, AbstractIntSConstraint cons, AbstractIntSConstraint othercons)
           
 
Method Summary
 void filterReifiedConstraintFromCons()
           
 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 !
 
Methods inherited from class choco.cp.solver.constraints.reified.ReifiedIntSConstraint
addExtension, addListener, awake, awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnRem, awakeOnRemovals, awakeOnSup, filter, getFilteredEventMask, pretty, propagate, setPropagationEngine
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
getConstraintType, isConsistent, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IfThenElse

public IfThenElse(IntDomainVar bool,
                  AbstractIntSConstraint cons,
                  AbstractIntSConstraint othercons)
Method Detail

filterReifiedConstraintFromCons

public void filterReifiedConstraintFromCons()
                                     throws ContradictionException
Overrides:
filterReifiedConstraintFromCons in class ReifiedIntSConstraint
Throws:
ContradictionException

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 ReifiedIntSConstraint
Parameters:
tuple -
Returns:


Copyright © 2012. All Rights Reserved.