distLine: Euclidean distance of 'x' to all 'xp'

Description Usage Arguments Details Value

View source: R/RbfInter.R

Description

Euclidean distance of x to a line of points xp

Usage

1
distLine(x, xp)

Arguments

x

vector of dimension d

xp

n points x_i of dimension d are arranged in (n x d) matrix xp. If xp is a vector, it is interpreted as (n x 1) matrix, i.e. d=1.

Details

distLine is up to 40x faster than using dist and taking only the first row or column of the distance matrix returned.

Value

vector of length n, the Euclidean distances


SACOBRA documentation built on March 26, 2020, 7:15 p.m.