extract_dc_distances_from_mst: Extract DC distances from an MST (minimax path weights)

View source: R/disco.R

extract_dc_distances_from_mstR Documentation

Extract DC distances from an MST (minimax path weights)

Description

Given the edges of a minimum spanning tree, computes the density-connectivity (DC) distance matrix. The DC distance between two points is the maximum edge weight on the unique path connecting them in the MST (minimax path). Edges are processed in increasing order of weight (Kruskal order): when an edge of weight w joins two groups of points A and B, every pair (a, b) with a \in A, b \in B has DC distance exactly w, so the whole block is filled at once. This replaces the breadth-first search from every node used up to version 0.1.1 and gives identical results.

Usage

extract_dc_distances_from_mst(mst_edges, n)

Arguments

mst_edges

A data.frame with columns i, j, dist as returned by get_mst_edges.

n

Integer, total number of points.

Value

A symmetric n \times n numeric matrix of DC distances.


discoCVI documentation built on Oct. 28, 2026, 1:07 a.m.