splitByBranches: Split a graph into branch-free paths

View source: R/splitByBranches.R

splitByBranchesR Documentation

Split a graph into branch-free paths

Description

Split a graph (usually a MST, at least a DAG) into branch-free components, i.e., paths between branch points or terminal nodes.

Usage

splitByBranches(g)

Arguments

g

A graph object such as that produced by createClusterMST.

Details

This function implements another strategy to define paths through the MST, by simply considering all linear sections (i.e., connected by nodes of degree 2) between branch points or terminii. The idea is to enable characterisation of the continuum without external information or assumptions statements about where the root is positioned, which would otherwise be required in functions such as defineMSTPaths.

Value

A list of character vectors containins unbranched paths between branch points or terminal nodes.

Author(s)

Aaron Lun

See Also

defineMSTPaths, for the root-based method of defining paths.

Examples

library(igraph)
test.g <- make_graph(c("A", "B", "B", "C", "C", "D", 
    "D", "E", "D", "F", "F", "G"), directed=FALSE)
splitByBranches(test.g)


LTLA/TrajectoryUtils documentation built on Feb. 5, 2024, 11:56 a.m.