Get weighted median for matrix
.getWeightedMedian(mat, w = rep(1, nrow(mat)))
mat
input matrix
w
weights
column-wise weighted means.