orderCoordinatesMMD {BayesNSGP}R Documentation

Order coordinates according to a maximum-minimum distance criterion.

Description

orderCoordinatesMMD orders an array of (x,y) spatial coordinates according to the "maximum minimum distance" (MMD), as described in Guinness, 2018. (Points are selected to maximize their minimum distance to already- selected points).

Usage

orderCoordinatesMMD(coords, exact = FALSE)

Arguments

coords

N x 2 array of N 2-dimensional (x,y) spatial coordinates.

exact

Logical; FALSE uses a fast approximation to MMD ordering (and is almost always recommended), while TRUE uses exact MMD ordering but is infeasible for large number of locations.

Value

A list of distances matrices, with the following components:

orderedCoords

N x 2 matrix; contains the ordered spatial coordinates as coords.

orderedIndicesNoNA

N-vector; contains the ordered indices with any NA values removed.

Examples

coords <- cbind(runif(100), runif(100))
orderCoordinatesMMD(coords)


[Package BayesNSGP version 0.1.2 Index]