powered by
Computes the median of the set X - Y. X - Y denotes the set \(\{x - y | x \in X, y \in Y\)}.
medianDiff(x, y)
The median element of X - Y
Numeric vectors
Sheila Görz
Special case of the function kthPair.
kthPair
Johnson, D. B., & Mizoguchi, T. (1978). Selecting the K-th Element in X+Y and X_1+X_2+ ... +X_m. SIAM Journal on Computing, 7(2), 147-153.
x <- rnorm(100) y <- runif(100) medianDiff(x, y)
Run the code above in your browser using DataLab