% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/disco.R
\name{calculate_reachability_distance}
\alias{calculate_reachability_distance}
\title{Compute mutual-reachability (reachability) distances}
\usage{
calculate_reachability_distance(points, min_points = 5)
}
\arguments{
\item{points}{A numeric matrix of shape \eqn{n \times p}.}

\item{min_points}{A positive integer \eqn{\geq 2} giving the neighbourhood size used for
the core-distance calculation.  Corresponds to \code{MinPts} in HDBSCAN.
Default is \code{5}.}
}
\value{
A symmetric \eqn{n \times n} numeric matrix of mutual-reachability
  distances with zeros on the diagonal.
}
\description{
For every pair of points \eqn{(i, j)}, the mutual-reachability distance is
\deqn{d_{\text{reach}}(i,j) =
  \max\bigl(\text{core}_k(i),\; \text{core}_k(j),\; d(i,j)\bigr)}
where \eqn{\text{core}_k(i)} is the distance from point \eqn{i} to its
\eqn{k}-th nearest neighbour (\eqn{k = \texttt{min\_points} - 1}) and
\eqn{d(i,j)} is the Euclidean distance.
}
\keyword{internal}
