find_connected_components {fullRankMatrix}R 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)))



[Package fullRankMatrix version 0.1.0 Index]