lp_distance {flintyR} | R Documentation |
Fast
Distance Vector Computation
Description
Takes in a double matrix , whose transpose
has
rows, and computes a vector recording all
pairwise
distances of
,
ordered lexicographically.
Usage
lp_distance(X, p)
Arguments
X |
double matrix (arma::mat class) |
p |
numeric Minkowski power (double class) |
Value
vector of distances (arma::vec class)
Examples
# X = [[0.5,0.5],[0,1],[0.3,0.7]] --> lPVec = [x,y,z]
# with x = (0.5^p + 0.5^p)
[Package flintyR version 0.1.0 Index]