def compute_sum_enh(adj, row_indices, column_indices):
    """Computes number number of links and weights given nodes indices.

    :param adj: Adjacency matrix.
    :type adj: numpy.ndarray
    :param row_indices: Row indices.
    :type row_indices: numpy.ndarray
    :param column_indices: Columns indices.
    :type column_indices: numpy.ndarray
    :return: Total links/weights
    :rtype: float
    """
    n_link = 0.0
    weigth = 0.0
    for ii in row_indices:
        for jj in column_indices:
            if adj[ii, jj]:
                weigth += adj[ii, jj]
                n_link += 1
    return n_link, weigth