choco.kernel.solver.search.checker
Class SolutionCheckerEngine

java.lang.Object
  extended by choco.kernel.solver.search.checker.AbstractSolutionCheckerEngine
      extended by choco.kernel.solver.search.checker.SolutionCheckerEngine
All Implemented Interfaces:
ISolutionCheckerEngine

public class SolutionCheckerEngine
extends AbstractSolutionCheckerEngine


Field Summary
 boolean enableConsistency
           
 
Fields inherited from interface choco.kernel.solver.search.checker.ISolutionCheckerEngine
LOGGER
 
Constructor Summary
SolutionCheckerEngine()
           
 
Method Summary
 void checkConstraint(SConstraint c)
          Check the satisfaction of c.
 void checkVariable(Var var)
          Check the instantiation of var.
 boolean inspectConstraint(SConstraint<?> c)
          Inspect the satisfaction of c.
 boolean inspectVariable(Var var)
          Inspect the instantiation of var.
 boolean isConsistencyEnabled()
          Return if the constraints checking enables consistency.
protected  boolean isSatisfied(AbstractIntSConstraint ic)
          Check isSatisfied on ic.
protected  boolean isSatisfied(SConstraint<?> c)
          Check if c is satisfied.
 void setEnableConsistency(boolean enableConsistency)
          Enable consistency for constraints checking.
 
Methods inherited from class choco.kernel.solver.search.checker.AbstractSolutionCheckerEngine
checkConstraints, checkSolution, checkVariables, inspectConstraints, inspectSolution, inspectVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enableConsistency

public boolean enableConsistency
Constructor Detail

SolutionCheckerEngine

public SolutionCheckerEngine()
Method Detail

isConsistencyEnabled

public final boolean isConsistencyEnabled()
Return if the constraints checking enables consistency.

Returns:
true if consistency is checked.

setEnableConsistency

public final void setEnableConsistency(boolean enableConsistency)
Enable consistency for constraints checking.

Parameters:
enableConsistency - true if constraint consistency must be check

inspectVariable

public boolean inspectVariable(Var var)
Inspect the instantiation of var.

Parameters:
var - variable to check
Returns:
false if the variable is not instantiated.

checkVariable

public void checkVariable(Var var)
                   throws SolutionCheckerException
Check the instantiation of var.

Parameters:
var - variable to check
Throws:
SolutionCheckerException - if var is not instantiated.

checkConstraint

public void checkConstraint(SConstraint c)
                     throws SolutionCheckerException
Check the satisfaction of c.

Parameters:
c - constraint to check
Throws:
SolutionCheckerException - if c is not satisfied

inspectConstraint

public boolean inspectConstraint(SConstraint<?> c)
Inspect the satisfaction of c.

Parameters:
c - contraint to check
Returns:
false if the constraint is not satisfied.

isSatisfied

protected boolean isSatisfied(SConstraint<?> c)
Check if c is satisfied.

Parameters:
c - constraint to check.
Returns:
false if the c is not satisfied.

isSatisfied

protected boolean isSatisfied(AbstractIntSConstraint ic)
                       throws UnsupportedOperationException
Check isSatisfied on ic. ic is an integer constraint and allows consistency checking (with tuple).

Parameters:
ic - integer constraint to check
Returns:
false if the c is satisfied
Throws:
UnsupportedOperationException - if ic doesn't allow consistency checking.


Copyright © 2012. All Rights Reserved.