distanceVector: Calculate Distances Between a Reference Point and Multiple Candidates
Description
This function applies the 'metricDistance' function to calculate distances from a given reference point to each row in a matrix of candidate nearest neighbors. It is particularly useful in the situation between matrix and a vector
Usage
distanceVector(point, candidateNNs, n)
Value
Numeric vector, distances from the reference point to each of the candidate points.
Arguments
point
Numeric vector, the reference point from which distances are calculated.
candidateNNs
Matrix, rows represent candidate points to which distance from the reference point is calculated.
n
Integer, the order of the Minkowski distance to use.