splitByBranches: Split a graph into branch-free paths

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/splitByBranches.R

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

1

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

1
2
3
4
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 Aug. 8, 2021, 8:51 a.m.