Given the occurrence points in two point processes, this function calculates
for each point in the first process, the distance to the nearest occurrence point in the second process.
Usage
nearestdist(posx, posy)
Arguments
posx
Numeric vector. Occurrence times of the points in the first point process.
posy
Numeric vector. Occurrence times of the points in the second point process.
Value
Vector of the distances to the nearest point in the second process for each point in the
first process.
Details
The distance between two points \(x_i\) and \(y_i\) in a point process in time, is the absolute value of their
difference: \(|x_i-y_i|\).
To obtain the vector of nearest points, this function applies to each point in posx,
the function pdist, which calculates the distance to its nearest point in posy.