/// <summary>
 /// Gets a collection of all relevant predecessors (backwards transitions) from the specified conditions. Lazy generated via yield return.
 /// </summary>
 /// <param name="treeRoot">Root of the operator decision tree to be traversed.</param>
 /// <param name="conditions">Original conditions.</param>
 /// <returns>Lazy generated collection of relevant predecessors.</returns>
 public IEnumerable <IPredecessor> GetPredecessors(IOperatorDecisionTreeNode treeRoot, IConditions conditions)
 {
     foreach (var simpleConditions in conditions.GetSimpleConditions())
     {
         foreach (var predecessor in treeRoot.Accept(this, conditions, simpleConditions))
         {
             yield return(predecessor);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets a collection of all possible successors (forward transitions) from the specified state. Lazy generated via yield return.
 /// </summary>
 /// <param name="treeRoot">Root of the operator decision tree to be traversed.</param>
 /// <param name="state">Reference state.</param>
 /// <returns>Lazy generated collection of successors.</returns>
 public IEnumerable <ISuccessor> GetSuccessors(IOperatorDecisionTreeNode treeRoot, IState state)
 {
     return(treeRoot.Accept(this, state));
 }