dfs: Depth First Search

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Finds the elements in the component of root

Usage

1
dfs(adj, root)

Arguments

adj

A named adjacency list of a decomposable grah

root

The node from which the component should be found

Value

All nodes connected to root

Examples

1
2
3
x <- list(a = c("b", "d"), b = c("a", "d"), c = c("b", "a"),
          d = c("e", "f"), e = c("d", "f"), f = c("d", "e"))
dfs(x, "a")

mlindsk/ess documentation built on Oct. 15, 2021, 9:12 a.m.