For each component of x, compute the quantile (the inverse of the CDF) at x of the univariate discrete distribution which assumes the values in v with equal probability