m.reject: A heuristic for deciding if initial anchor points have enough...

View source: R/m_reject.R

m.rejectR Documentation

A heuristic for deciding if initial anchor points have enough spread.

Description

This heuristic ensures that chosen anchor points are not along a straight line and, if length(m.ind)<5, that the maximum distance between the initial anchor points in the G-plane is sufficiently large i.e. over 60\% of the maximum pairwise distance of all sampling locations in the G-plane.

Usage

m.reject(m.ind, Gcoords, sphere.dis = FALSE)

Arguments

m.ind

A vector of indices denoting the anchor points in Gcoords.

Gcoords

A d by 2 matrix of G-plane sampling locations.

sphere.dis

Is Spherical distance or Euclidean distance used?

Value

1 if anchor points are rejected, 0 otherwise.

Examples

data("Aus_Heat")

Gcoords<-Aus_Heat$coords
# Set number of anchor points
m<-10
# Sample anchor points
m.ind<-sample(1:dim(Gcoords)[1],m,replace=FALSE)

reject<-m.reject(m.ind,Gcoords,sphere.dis=TRUE)
print(reject)

Jbrich95/sdfExtreme documentation built on March 24, 2022, 11:15 a.m.