weight_matrix_cpp function

Calculate weight matrix