distances.from.leaves: Distances from leaves

Description Usage Arguments Value Examples

View source: R/graph.utility.R

Description

This function returns the minimum distance of each node from one of the leaves of the graph.

Usage

1

Arguments

g

a graph of class graphNEL. It represents the hierarchy of the classes.

Value

a named vector. The names are the names of the nodes of the graph g, and their values represent the distance from the leaves. A value equal to 0 is assigned to the leaves, 1 to nodes with distance 1 from a leaf and so on.

Examples

1
2
data(graph);
dist.leaves <- distances.from.leaves(g);

gecko515/HEMDAG documentation built on Oct. 18, 2019, 6:34 a.m.