Exemple #1
0
        static void PathTest()
        {
            var t = new PNumber(15);
            var l = new DataTree();

            l.AddElement(new PNumber(4));
            l.AddElement(new PNumber(3));
            l.AddElement(new PNumber(1));
            var t2 = new DataTree();

            t2.AddElement(new PNumber(22));
            var t3 = new DataTree();

            t3.AddElement(new PNumber(14));
            t3.AddElement(t);
            t2.AddElement(t3);
            l.AddElement(t2);
            var d = new DataTree();

            d.AddElement(l.Copy());
            d.AddElement(l);
            d.AddElement(d.Copy());
            Print(d);
            PrintPath(t.Path);
            foreach (var temp in d.GetChildIterator())
            {
                PrintPath(temp.Path);
            }
        }