getLpDistance {flintyR}R Documentation

A lppl_p^p Distance Vector Calculator

Description

Computes all pairwise lppl_p^p distances for a real matrix X\mathbf{X}, for a specified choice of Minkowski norm exponent pp.

Usage

getLpDistance(X, p)

Arguments

X

The N×PN \times P real matrix

p

The power p of lppl_p^p, i.e., xpp=(x1p+...xnp)||x||_p^p = (x_1^p+...x_n^p)

Details

Dependencies: lp_distance from fast_dist_calc.cpp

Value

A length (N2){N \choose 2} vector of pairwise lppl_p^p distances

Examples

X <- matrix(nrow = 5, ncol = 10, rnorm(50))
getLpDistance(X, p = 2)


[Package flintyR version 0.1.0 Index]