find_connected_components: Find connected components in a graph

View source: R/find_connected_components.R

find_connected_componentsR Documentation

Find connected components in a graph

Description

The function performs a depths-first search to find all connected components.

Usage

find_connected_components(connections)

Arguments

connections

a list where each element is a vector with connected nodes. Each node must be either a character or an integer.

Value

a list where each element is a set of connected items.

Examples

  find_connected_components(list(c(1,2), c(1,3), c(4,5)))



fullRankMatrix documentation built on July 3, 2024, 5:12 p.m.