Пример #1
0
        public static void Example2()
        {
            List <Link> links = new List <Link>();

            links.Add(new Link(0, 1));
            links.Add(new Link(0, 2));
            links.Add(new Link(0, 3));
            links.Add(new Link(1, 0));
            links.Add(new Link(1, 3));
            links.Add(new Link(2, 2));  // note, this needs to be restart. A trapping problem.
            links.Add(new Link(3, 1));
            links.Add(new Link(3, 2));

            PageRank pr = new PageRank(4);

            pr.Train(links, 100);
        }
Пример #2
0
        public static void Example()
        {
            List <Link> links = new List <Link>();

            links.Add(new Link(0, 1));
            links.Add(new Link(0, 2));
            links.Add(new Link(0, 3));
            links.Add(new Link(1, 0));
            links.Add(new Link(1, 3));
            links.Add(new Link(2, 0));  // try to comment this edge? all PR would be zero. A missing problem
            links.Add(new Link(3, 1));
            links.Add(new Link(3, 2));

            PageRank pr = new PageRank(4);

            pr.Train(links, 100);
        }