rthdist: Parallel Computation of Distances

Description Usage Arguments Details Value Examples

View source: R/rthdist.R

Description

Similar to R's dist().

Usage

1

Arguments

m

Matrix/data frame for between-rows distance computation.

nthreads

An optional argument for specifying the number of threads (in the case of OpenMP or TBB backends) that the routine should (at most) use. Does nothing with a CUDA backend. See nthreads.

Details

Calling rthdist() on the matrix m returns the euclidean distances between all pairs of rows in m.

Value

Object of R class "matrix". Duplicate computation is avoided in rthdist() but the entire matrix is constructed.

Examples

1
2
3
4
5
6
7
## Not run: 
library(Rth)
m1 <- rbind(1:2,3:4)
m1
rthdist(m1)

## End(Not run)

matloff/Rth documentation built on May 21, 2019, 12:55 p.m.