Beispiel #1
0
        /// <summary>
        /// Counts Vertexs in this tree. For test
        /// </summary>
        /// <returns></returns>
        public int countVertexs()
        {
            int n = 1;
            if (root.OutgoingEdges == null)
                return n;

            foreach(Edge e in root.OutgoingEdges)
            {
                Tree subtree = new Tree(SplitSize, Depth - 1, VertexAttributes, EdgeAttributes);
                subtree.root = e.Bottom;
                n += subtree.countVertexs();
            }
            return n;
        }