choco.cp.solver.constraints.integer.intlincomb
Class IntLinCombLEQ

java.lang.Object
  extended by choco.cp.solver.constraints.integer.intlincomb.IntLinCombOp
      extended by choco.cp.solver.constraints.integer.intlincomb.IntLinCombLEQ

public final class IntLinCombLEQ
extends IntLinCombOp

User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 11 mars 2010
Since : Choco 2.1.1


Constructor Summary
IntLinCombLEQ(int[] coeffs, int nbPosVars, int cste, IntDomainVar[] vars, AbstractSConstraint constraint)
           
 
Method Summary
 boolean filterOnImprovedLowerBound()
          Checks a new lower bound.
 boolean filterOnImprovedUpperBound()
          Checks a new upper bound.
protected  String getOperator()
           
 boolean isConsistent()
          Tests if the constraint is consistent with respect to the current state of domains.
 Boolean isEntailed()
          Checks if the constraint is entailed.
 boolean isSatisfied(int[] tuple)
          Checks if the constraint is satisfied when all variables are instantiated.
 AbstractSConstraint opposite(Solver solver)
          Computes the opposite of this constraint.
 
Methods inherited from class choco.cp.solver.constraints.integer.intlincomb.IntLinCombOp
compute, filter, hasConsistentUpperBound, pretty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntLinCombLEQ

public IntLinCombLEQ(int[] coeffs,
                     int nbPosVars,
                     int cste,
                     IntDomainVar[] vars,
                     AbstractSConstraint constraint)
Method Detail

isEntailed

public Boolean isEntailed()
Checks if the constraint is entailed.

Specified by:
isEntailed in class IntLinCombOp
Returns:
Boolean.TRUE if the constraint is satisfied, Boolean.FALSE if it is violated, and null if the filtering algorithm cannot infer yet.

isSatisfied

public boolean isSatisfied(int[] tuple)
Checks if the constraint is satisfied when all variables are instantiated.

Specified by:
isSatisfied in class IntLinCombOp
Parameters:
tuple - array of values
Returns:
true if the constraint is satisfied

filterOnImprovedLowerBound

public boolean filterOnImprovedLowerBound()
                                   throws ContradictionException
Checks a new lower bound.

Specified by:
filterOnImprovedLowerBound in class IntLinCombOp
Returns:
true if filtering has been infered
Throws:
ContradictionException - if a domain empties or a contradiction is infered

filterOnImprovedUpperBound

public boolean filterOnImprovedUpperBound()
                                   throws ContradictionException
Checks a new upper bound.

Specified by:
filterOnImprovedUpperBound in class IntLinCombOp
Returns:
true if filtering has been infered
Throws:
ContradictionException - if a domain empties or a contradiction is infered

isConsistent

public boolean isConsistent()
Tests if the constraint is consistent with respect to the current state of domains.

Specified by:
isConsistent in class IntLinCombOp
Returns:
true iff the constraint is bound consistent (weaker than arc consistent)

opposite

public AbstractSConstraint opposite(Solver solver)
Computes the opposite of this constraint.

Specified by:
opposite in class IntLinCombOp
Parameters:
solver - containing solver
Returns:
a constraint with the opposite semantic @param solver

getOperator

protected String getOperator()
Specified by:
getOperator in class IntLinCombOp


Copyright © 2012. All Rights Reserved.