/// <summary> /// Constructs a new SearchContext. /// </summary> /// <param name="domain"><see cref="SearchContext{D, P, A, S, Sol, N}.Domain"/></param> /// <param name="source"><see cref="SearchContext{D, P, A, S, Sol, N}.Source"/></param> /// <param name="target"><see cref="SearchContext{D, P, A, S, Sol, N}.Target"/></param> /// <param name="subject"><see cref="SearchContext{D, P, A, S, Sol, N}.Subject"/></param> /// <param name="solution"><see cref="SearchContext{D, P, A, S, Sol, N}.Solution"/></param> /// <param name="status"><see cref="SearchContext{D, P, A, S, Sol, N}.Status"/></param> /// <param name="startNode"><see cref="SearchContext{D, P, A, S, Sol, N}.StartNode"/></param> /// <param name="search"><see cref="SearchContext{D, P, A, S, Sol, N}.Search"/></param> /// <param name="expansion"><see cref="SearchContext{D, P, A, S, Sol, N}.Expansion"/></param> /// <param name="application"><see cref="SearchContext{D, P, A, S, Sol, N}.Application"/></param> /// <param name="evaluation"><see cref="SearchContext{D, P, A, S, Sol, N}.Evaluation"/></param> /// <param name="goal"><see cref="SearchContext{D, P, A, S, Sol, N}.Goal"/></param> /// <param name="cloner"><see cref="SearchContext{D, P, A, S, Sol, N}.Cloner"/></param> public SearchContext(D domain, P source, P target, S subject, Sol solution, SearchStatus status, SearchNode <P, A> startNode, ISearchStrategy <D, P, A, S, Sol> search, IExpansionStrategy <D, P, A, S, Sol, A> expansion, IApplicationStrategy <D, P, A, S, Sol> application, IEvaluationStrategy <D, P, A, S, Sol> evaluation, IGoalStrategy <D, P, A, S, Sol> goal, ICloneStrategy <P> cloner) { Domain = domain; Source = source?.Copy(); Target = target?.Copy(); Subject = subject; Solution = solution; Status = status; StartNode = startNode?.Copy(); Search = search; Expansion = expansion; Application = application; Evaluation = evaluation; Goal = goal; Cloner = cloner; }
/// <summary> /// Creates a SearchContext that uses the provided search and expansion strategies. /// </summary> /// <param name="domain">The search space.</param> /// <param name="source">The position to start the search in.</param> /// <param name="target">The position that needs to be reached.</param> /// <param name="subject">An object or agent moving within the search space.</param> /// <param name="search">The search strategy to be used.</param> /// <param name="expand">The expansion strategy to be used.</param> /// <returns>A SearchContext with the provided arguments set.</returns> public static SearchContext <D, P, A, S, Sol> Context(D domain, P source, P target, S subject, ISearchStrategy <D, P, A, S, Sol> search, IExpansionStrategy <D, P, A, S, Sol, A> expand) { return(new SearchContext <D, P, A, S, Sol> { Domain = domain, Source = source, Target = target, Subject = subject, Search = search, Expansion = expand }); }
public BasicProductionStrategy(IExpansionStrategy expansionStrategy) { this.expansionStrategy = expansionStrategy; }