Learn R Programming

RScelestial (version 1.0.4)

my.dfs: Runs DFS on tree and calculates parent of each node as well as depth and upper-depth of nodes.

Description

It is used for internal purposes.

Usage

my.dfs(graph, root = NULL)

Value

a list with father representing the parent node, and

balance.depth representing the distance between the node and the farthest node to it, as the elements.

Arguments

graph

The tree

root

The starting node of DFS.