compute_p_distance {gor} | R Documentation |
Distance-p between two-dimensional points
Description
It computes the distance- between two-dimensional points.
Usage
compute_p_distance(x, y, p = 2)
Arguments
x |
A two-dimensional point |
y |
A two-dimensional point |
p |
The |
Details
The distance- is defined by
.
Value
The distance- between points
and
.
Author(s)
Cesar Asensio
See Also
compute_distance_matrix computes the distance matrix of a set of two-dimensional points, compute_tour_distance computes tour distances.
Examples
compute_p_distance(c(1,2),c(3,4)) # 2.8284
compute_p_distance(c(1,2),c(3,4),p=1) # 4
[Package gor version 1.0 Index]