private void AddReductionsToState(State <T> State, ISituationCollection <T> Situations) { Reduce <T> reduce; foreach (Situation <T> situation in Situations.GetReductionSituations()) { reduce = new Reduce <T>(situation.Rule.Name, situation.Rule.IsAxiom, situation.Input, situation.Rule.Attributes); State.Add(reduce); } }
public AutomatonTableTuple(IState <T> State, ISituationCollection <T> Situations) { if (State == null) { throw new ArgumentNullException(); } if (Situations == null) { throw new ArgumentNullException(); } this.State = State; this.Situations = Situations; }
public IAutomatonTableTuple <T> CreateTuple(IState <T> State, ISituationCollection <T> Situations) { AutomatonTableTuple <T> tuple; //IEnumerable<Situation<T>> reduceSituations; //Reduce<T> reduceAction; tuple = new AutomatonTableTuple <T>(); tuple.State = State; tuple.Situations = Situations; tupleCollections.Add(tuple); return(tuple); }
public IAutomatonTableTuple <T> GetTuple(ISituationCollection <T> Situations) { return(tupleCollections.FirstOrDefault(item => item.Situations.Equals(Situations))); }