예제 #1
0
        private MarkovChainNode <T> GetNode(T value)
        {
            var node = this.nodes.SingleOrDefault(n => comparer.Equals(n.Value, value));

            if (node == null)
            {
                node = new MarkovChainNode <T>(value);
                this.nodes.Add(node);
            }
            return(node);
        }
 public void AddLink(MarkovChainNode <T> toNode)
 {
     this.links.Add(toNode);
 }