debug_distance_matrix: Debug distance matrix

View source: R/checkDM.R

debug_distance_matrixR Documentation

Debug distance matrix

Description

The debug_distance_matrix() function is used for troubleshooting.

Usage

debug_distance_matrix(m)

Arguments

m

Distance Matrix which is to be validate

Details

If distance matrix is to be used by to find points, it has to be well defined. This function checks if matrix is square, if doesn't include NA or negative values. If those conditions are not fulfilled proper information is printed.

Additionally metric rules are checked:

  1. d(x,y) = 0 <=> x = y

  2. d(x,y) = d(y,x)

  3. d(x,y) <= d(x,z) + d(y,z)

If some rule is not fulfilled indexes of points/distance which cause problems are printed


maszdev/dist2location documentation built on June 11, 2025, 11:55 a.m.