Compute the vector of weights and the vector of results