Update modularity2_matrix_directed.r