choco.cp.solver.constraints.strong
Class AbstractStrongConsistency<MyVariable extends SCVariable<? extends SCConstraint>>

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.strong.AbstractStrongConsistency<MyVariable>
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener
Direct Known Subclasses:
MaxRPCrm

public abstract class AbstractStrongConsistency<MyVariable extends SCVariable<? extends SCConstraint>>
extends AbstractLargeIntSConstraint


Field Summary
protected  SCConstraint[] constraints
           
protected  Map<IntDomainVar,MyVariable> variablesMap
           
 
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
AbstractStrongConsistency(IntDomainVar[] vars, ISpecializedConstraint[] constraints, Class<? extends MyVariable> myVariable, Class<? extends SCConstraint> myConstraint)
           
 
Method Summary
 void awake()
          Propagation: Propagating the constraint for the very first time until local consistency is reached.
 MyVariable getVariable(int id)
           
 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.kernel.solver.constraints.integer.AbstractIntSConstraint
awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnRem, awakeOnRemovals, awakeOnSup, getConstraintType, isConsistent, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, propagate, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

constraints

protected final SCConstraint[] constraints

variablesMap

protected final Map<IntDomainVar,MyVariable extends SCVariable<? extends SCConstraint>> variablesMap
Constructor Detail

AbstractStrongConsistency

public AbstractStrongConsistency(IntDomainVar[] vars,
                                 ISpecializedConstraint[] constraints,
                                 Class<? extends MyVariable> myVariable,
                                 Class<? extends SCConstraint> myConstraint)
Method Detail

getVariable

public MyVariable getVariable(int id)

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

awake

public void awake()
           throws ContradictionException
Description copied from class: Propagator
Propagation: Propagating the constraint for the very first time until local consistency is reached.

Overrides:
awake in class Propagator
Throws:
ContradictionException - contradiction exception


Copyright © 2012. All Rights Reserved.