예제 #1
0
 public Transition(Graph <TNode, TTransition> graph, State fromState, State toState, TTransition label)
 {
     Graph     = graph;
     FromState = fromState;
     ToState   = toState;
     Label     = label;
 }
예제 #2
0
            void AddTransitionCore(State fromState, State toState, TTransition label)
            {
                var transaction = new Transition(Graph, fromState, toState, label);

                ((IStateEd)fromState).ToTransitions.Add(transaction);
                ((IStateEd)toState).FromTransitions.Add(transaction);
            }
예제 #3
0
            public void AddTransition(State fromState, State toState, TTransition label)
            {
                if (fromState == null)
                {
                    throw new ArgumentNullException(nameof(fromState));
                }
                if (toState == null)
                {
                    throw new ArgumentNullException(nameof(toState));
                }

                if (fromState.Graph != Graph)
                {
                    throw new ArgumentException("state1 does not belong to this graph", nameof(fromState));
                }
                if (toState.Graph != Graph)
                {
                    throw new ArgumentException("state2 does not belong to this graph", nameof(toState));
                }

                AddTransitionCore(fromState, toState, label);
            }
예제 #4
0
 public MyPushHistoryRecord(PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> pusher, PdaExtractingContext <GssNode <TStackSymbol, PdaExtractingGssData>, TTransition> child, TTransition sourceTransition) : base(pusher, child, sourceTransition)
 {
 }