Class StateGraph
This class contains methods a number of methods related to state graph.
public static class StateGraph
- Inheritance
-
StateGraph
- Inherited Members
Methods
ExploreStateGraph(IList<IStepFunction>, IState, int, bool, Action<StateGraphNode>, Action<StateGraphNode>, Func<IState, bool>, Func<IState, IStepFunction, StepResult, bool>)
This method explores the state graph starting from the given state and applying the step functions in some order, then exploring the updated states and any step functions produced by the earlier set, and so on. It can either exhaustively explore the complete state graph (which can be very large, even infinite) or explore up to a given depth. It can be instructed to either generate the state graph and return it so the caller can inspect it and use it for further processing, or it can just traverse the state graph w/o returning it. In the latter case, the caller probably also gives a hook to run at each node of the state graph (though a hook can also be given if a state graph is requested as well),
public static StateGraphNode ExploreStateGraph(IList<IStepFunction> steps, IState startingState, int maxDepth = -1, bool generateStateGraph = true, Action<StateGraphNode> hook = null, Action<StateGraphNode> postHook = null, Func<IState, bool> stateConstraint = null, Func<IState, IStepFunction, StepResult, bool> shouldIncludeStepFunctionResult = null)
Parameters
stepsIList<IStepFunction>startingStateIStatemaxDepthintgenerateStateGraphboolhookAction<StateGraphNode>postHookAction<StateGraphNode>stateConstraintFunc<IState, bool>shouldIncludeStepFunctionResultFunc<IState, IStepFunction, StepResult, bool>