def MapGammaToEdgeWeights(Gamma):
    """ Computes an edge weights dictionary given the matrix representation Gamma. """
    N = Gamma.shape[0]
    edge_weights = {}
    for i in range(N):
        for j in range(N):
            if Gamma[i, j] != 0:
                edge_weights[(i, j)] = Gamma[i, j]
    return edge_weights