AIMA.Core.Search.Framework.QueueSearch.setCheckGoalBeforeAddingToFrontier C# (CSharp) Method

setCheckGoalBeforeAddingToFrontier() public method

public setCheckGoalBeforeAddingToFrontier ( bool checkGoalBeforeAddingToFrontier ) : void
checkGoalBeforeAddingToFrontier bool
return void
        public virtual void setCheckGoalBeforeAddingToFrontier(
                bool checkGoalBeforeAddingToFrontier)
        {
            this.checkGoalBeforeAddingToFrontier = checkGoalBeforeAddingToFrontier;
        }

Usage Example

 public BreadthFirstSearch(QueueSearch search)
 {
     // Goal test is to be applied to each node when it is generated
     // rather than when it is selected for expansion.
     search.setCheckGoalBeforeAddingToFrontier(true);
     this._search = search;
 }