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); }
public MarkovChainVisitor(MarkovState <T> initialState) { Guard.NotNull(initialState, nameof(initialState)); _initialState = initialState; }