sq_dist {deepgp} | R Documentation |
Calculates squared pairwise euclidean distances using C.
sq_dist(X1, X2 = NULL)
X1 |
matrix of input locations |
X2 |
matrix of second input locations (if |
C code derived from the "laGP" package (Robert B Gramacy and Furong Sun).
symmetric matrix of squared euclidean distances
Gramacy, RB and F Sun. (2016). laGP: Large-Scale Spatial Modeling via Local Approximate Gaussian Processes in R. Journal of Statistical Software 72 (1), 1-46. doi:10.18637/jss.v072.i01
x <- seq(0, 1, length = 10)
d2 <- sq_dist(x)