choco.cp.solver.constraints.global.ordered
Class OrderedGcc

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.global.ordered.OrderedGcc
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener

public class OrderedGcc
extends AbstractLargeIntSConstraint


Field Summary
static boolean debug
           
protected  int[] Imax
           
protected  int maxValue
           
protected  int minBot
           
protected  int minValue
           
 
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
OrderedGcc(IntDomainVar[] vars, int[] Imax, int minBot)
           
OrderedGcc(IntDomainVar[] vars, int minValue, int maxValue, int[] Imax, int minBot)
           
 
Method Summary
 void awake()
          Propagation: Propagating the constraint for the very first time until local consistency is reached.
 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 !
protected static int[] minCovering(IntDomainVar[] vars)
           
protected static int occMin(IntDomainVar[] vars, int minValue)
           
protected static int[] occurences(int[] tuple, int minValue, int maxValue)
           
protected static int[] occurencesGreater(int[] tuple, int minValue, int maxValue)
           
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnRem, awakeOnRemovals, awakeOnSup, getConstraintType, isConsistent
 
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, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

public static boolean debug

minValue

protected int minValue

maxValue

protected int maxValue

Imax

protected int[] Imax

minBot

protected int minBot
Constructor Detail

OrderedGcc

public OrderedGcc(IntDomainVar[] vars,
                  int[] Imax,
                  int minBot)

OrderedGcc

public OrderedGcc(IntDomainVar[] vars,
                  int minValue,
                  int maxValue,
                  int[] Imax,
                  int minBot)
Method Detail

minCovering

protected static int[] minCovering(IntDomainVar[] vars)

occMin

protected static int occMin(IntDomainVar[] vars,
                            int minValue)

occurences

protected static int[] occurences(int[] tuple,
                                  int minValue,
                                  int maxValue)

occurencesGreater

protected static int[] occurencesGreater(int[] tuple,
                                         int minValue,
                                         int maxValue)

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

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

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.