Beispiel #1
0
        public void GetAllEdgesTest()
        {
            MarkovChain <int> chains = new MarkovChain <int>(7);

            chains.AddEdge(0, 1, 0.2);
            chains.AddEdge(0, 2, 0.7);
            chains.AddEdge(3, 2, 0.2);
            chains.AddEdge(4, 5, 0.2);

            CollectionAssert.AreEquivalent(new List <Tuple <int, double, int> > {
                new Tuple <int, double, int>(0, 0.2, 1), new Tuple <int, double, int>(0, 0.7, 2), new Tuple <int, double, int>(3, 0.2, 2), new Tuple <int, double, int>(4, 0.2, 5)
            }, chains.GetAllEdges());
        }