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