pairwise.dist {ptm}R 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))

[Package ptm version 1.0.1 Index]