rthpdist: Parallel Computaiton of Dinctances Between Matricies

Description Usage Arguments Value Examples

View source: R/rthpdist.R

Description

Similar to R's pdist(). The call rthpdist(m1,m2) returns the distance from all rows of m1 to all in m2.

Usage

1

Arguments

m1

First matrix/data frame for between-matrices distance computation.

m2

Second matrix/data frame for between-matrices 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.

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
8
9
## Not run: 
library(Rth)
m1 <- rbind(1:2,3:4)
m2 <- matrix(c(1,0,1,6),ncol=2)
m1
m2
rthpdist(m1,m2)

## End(Not run)

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