order_maxmin_exact_obs_pred: Maximum minimum distance ordering for prediction

View source: R/ordering_functions.R

order_maxmin_exact_obs_predR Documentation

Maximum minimum distance ordering for prediction

Description

Return the indices of an exact maximum-minimum distance ordering. The first point is chosen as the "center" point, minimizing L2 distance. Dimensions d=2 and d=3 handled separately, dimensions d=1 and d>3 handled similarly. Algorithm is exact and scales quasilinearly.

Usage

order_maxmin_exact_obs_pred(locs, locs_pred)

Arguments

locs

Observation locations

locs_pred

Prediction locations

Value

A vector of indices giving the ordering, i.e. the first element of this vector is the index of the first location.

Examples

n=100; locs <- cbind(runif(n),runif(n))
locs_pred = cbind(runif(n), runif(n))
ord <- order_maxmin_exact_obs_pred(locs, locs_pred)


GPvecchia documentation built on June 22, 2024, 11:13 a.m.