Learn R Programming

roots (version 1.0)

fastDist: Fast vectorised Euclidean distance calculator

Description

Fast vectorised Euclidean distance calculator

Usage

fastDist(x, squared = FALSE)

Arguments

x

Matrix with vectors in columns.

squared

Will not perform the square root, i.e. will return the squared `L2-norm'.

Value

Returns a matrix of pairwise distances

Details

Calculates Euclidean distances between vectors arranged as columns in a matrix.

Examples

Run this code
# NOT RUN {
dist <- fastDist(x)
# }

Run the code above in your browser using DataLab