예제 #1
0
        public bool Next()
        {
            if (CurrentState == null)
            {
                CurrentState = _initialState;
                return(true);
            }

            if (!CurrentState.Links.Any())
            {
                CurrentState = null;
                return(false);
            }

            CurrentState = Picker.Pick(CurrentState.Links);
            return(true);
        }
예제 #2
0
        public MarkovChainVisitor(MarkovState <T> initialState)
        {
            Guard.NotNull(initialState, nameof(initialState));

            _initialState = initialState;
        }