public getAssignment ( |
||
var | ||
return | Object |
/** * 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()); } }
public override bool isSatisfiedWith(Assignment assignment) { Object value1 = assignment.getAssignment(var1); return value1 == null || !value1.Equals(assignment.getAssignment(var2)); }
public override bool isSatisfiedWith(Assignment assignment) { Object value1 = assignment.getAssignment(var1); return(value1 == null || !value1.Equals(assignment.getAssignment(var2))); }
/** * 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(); } }