AIMA.Core.Search.CSP.DomainRestoreInfo.setEmptyDomainFound C# (CSharp) Method

setEmptyDomainFound() public method

public setEmptyDomainFound ( bool b ) : void
b bool
return void
        public void setEmptyDomainFound(bool b)
        {
            emptyDomainObserved = b;
        }

Usage Example

        // //////////////////////////////////////////////////////////////
        // inference algorithms

        /** : forward checking. */
        private DomainRestoreInfo doForwardChecking(Variable var,
                                                    Assignment assignment, CSP csp)
        {
            DomainRestoreInfo result = new DomainRestoreInfo();

            foreach (Constraint constraint in csp.getConstraints(var))
            {
                List <Variable> scope = constraint.getScope();
                if (scope.Count == 2)
                {
                    foreach (Variable neighbor in constraint.getScope())
                    {
                        if (!assignment.hasAssignmentFor(neighbor))
                        {
                            if (revise(neighbor, constraint, assignment, csp,
                                       result))
                            {
                                if (csp.getDomain(neighbor).isEmpty())
                                {
                                    result.setEmptyDomainFound(true);
                                    return(result);
                                }
                            }
                        }
                    }
                }
            }
            return(result);
        }
All Usage Examples Of AIMA.Core.Search.CSP.DomainRestoreInfo::setEmptyDomainFound