pairwise.dist: Compute Euclidean Distances

View source: R/distances.R

pairwise.distR Documentation

Compute Euclidean Distances

Description

Computes the pairwise distance matrix between two sets of points

Usage

pairwise.dist(a, b, squared = TRUE)

Arguments

a, b

matrices (NxD) and (MxD), respectively, where each row represents a D-dimensional point.

squared

return containing squared Euclidean distance

Value

Euclidean distance matrix (NxM). An attribute "squared" set to the value of param squared is provided.

Examples

pairwise.dist(matrix(1:9, ncol = 3), matrix(9:1, ncol = 3))

ptm documentation built on May 29, 2024, 11:50 a.m.