medianDiff: Median of the set X - Y

View source: R/medianDiff.R

medianDiffR Documentation

Median of the set X - Y

Description

Computes the median of the set X - Y. X - Y denotes the set \{x - y | x \in X, y \in Y}.

Usage

medianDiff(x, y)

Arguments

x, y

Numeric vectors

Details

Special case of the function kthPair.

Value

The median element of X - Y

Author(s)

Sheila Görz

References

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.

Examples

x <- rnorm(100)
y <- runif(100)
medianDiff(x, y)

robcp documentation built on April 11, 2025, 6:18 p.m.