% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weights.R
\name{compute_distance}
\alias{compute_distance}
\title{Compute a full pairwise distance matrix from a coordinate matrix}
\usage{
compute_distance(coords, longlat = FALSE)
}
\arguments{
\item{coords}{A numeric matrix with at least two columns (`X` and `Y`, or
the first two columns if names are absent).  Each row is one spatial unit.}

\item{longlat}{Logical.  If `TRUE`, great-circle distances (in kilometres)
are calculated using the Haversine formula.  If `FALSE` (default),
Euclidean distance is used.}
}
\value{
An n x n symmetric numeric matrix where element [i, j] is the
  distance between unit i and unit j.  Diagonal is 0.
}
\description{
Compute a full pairwise distance matrix from a coordinate matrix
}
\keyword{internal}
