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)))



Pweidemueller/fullRankMatrix documentation built on July 8, 2024, 2:46 a.m.