choco.kernel.solver.search.checker
Class AbstractSolutionCheckerEngine

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

public abstract class AbstractSolutionCheckerEngine
extends Object
implements ISolutionCheckerEngine


Field Summary
 
Fields inherited from interface choco.kernel.solver.search.checker.ISolutionCheckerEngine
LOGGER
 
Constructor Summary
AbstractSolutionCheckerEngine()
           
 
Method Summary
 void checkConstraints(Solver solver)
          Check satisfaction of every constraints involved within the solver.
 void checkSolution(Solver solver)
          Check the current solution of the solver.
 void checkVariables(Solver solver)
          Check instantiation of every variables involved within the solver.
 boolean inspectConstraints(Solver solver)
          Inspect satisfaction of every constraints declared in solver.
 boolean inspectSolution(Solver solver)
          Inspect the current solution of solver.
 boolean inspectVariables(Solver solver)
          Inspect instantiation of every variables involved in solver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.kernel.solver.search.checker.ISolutionCheckerEngine
checkConstraint, checkVariable, inspectConstraint, inspectVariable
 

Constructor Detail

AbstractSolutionCheckerEngine

public AbstractSolutionCheckerEngine()
Method Detail

checkConstraints

public final void checkConstraints(Solver solver)
                            throws SolutionCheckerException
Check satisfaction of every constraints involved within the solver.

Specified by:
checkConstraints in interface ISolutionCheckerEngine
Parameters:
solver - containing solver
Throws:
SolutionCheckerException - if one or more constraint is not satisfied.

checkSolution

public void checkSolution(Solver solver)
                   throws SolutionCheckerException
Check the current solution of the solver. It runs over variables (check instantiation) and constraints (call isSatisfied). By defautlt, it checks the consistency and ignore the nogood recording.

Specified by:
checkSolution in interface ISolutionCheckerEngine
Parameters:
solver - involving solver
Throws:
SolutionCheckerException - if the current solution is not correct.

checkVariables

public final void checkVariables(Solver solver)
                          throws SolutionCheckerException
Check instantiation of every variables involved within the solver.

Specified by:
checkVariables in interface ISolutionCheckerEngine
Parameters:
solver - containing solver
Throws:
SolutionCheckerException - if one or more variable is not instantiated.

inspectConstraints

public final boolean inspectConstraints(Solver solver)
Inspect satisfaction of every constraints declared in solver.

Specified by:
inspectConstraints in interface ISolutionCheckerEngine
Parameters:
solver - containing solver
Returns:
false if one or more constraint is not satisfied.

inspectSolution

public boolean inspectSolution(Solver solver)
Inspect the current solution of solver. It runs over variables (check instantiation) and constraints (call isSatisfied). By defautlt, it checks the consistency and ignore the nogood recording.

Specified by:
inspectSolution in interface ISolutionCheckerEngine
Parameters:
solver - involving solver
Returns:
false if the current solution is not correct

inspectVariables

public final boolean inspectVariables(Solver solver)
Inspect instantiation of every variables involved in solver.

Specified by:
inspectVariables in interface ISolutionCheckerEngine
Parameters:
solver - containing solver.
Returns:
false if one or more variable is not instantiated.


Copyright © 2012. All Rights Reserved.