/**
* Primitive operation, which tries to prune out values from the CSP which
* are not possible anymore when extending the given assignment to a
* solution.
*
* @return An object which provides informations about (1) whether changes
* have been performed, (2) possibly inferred empty domains , and
* (3) how to restore the domains.
*/
protected override DomainRestoreInfo inference(Variable var, Assignment assignment,
CSP csp)
{
switch (inferenceStrategy)
{
case FORWARD_CHECKING:
return(doForwardChecking(var, assignment, csp));
case AC3:
return(new AC3Strategy().reduceDomains(var, assignment
.getAssignment(var), csp));
default:
return(new DomainRestoreInfo().compactify());
}
}