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

View source: R/scelestial.R

my.dfsR Documentation

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)

Arguments

graph

The tree

root

The starting node of DFS.

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.


RScelestial documentation built on May 29, 2024, 9:41 a.m.